]>
Commit | Line | Data |
---|---|---|
d0c2d3b3 | 1 | /* BSD `setjmp' entry point to `sigsetjmp (..., 1)'. MIPS64 version. |
2b778ceb | 2 | Copyright (C) 1996-2021 Free Software Foundation, Inc. |
d0c2d3b3 UD |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
3214b89b AJ |
6 | modify it under the terms of the GNU Lesser General Public |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
d0c2d3b3 UD |
9 | |
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
3214b89b | 13 | Lesser General Public License for more details. |
d0c2d3b3 | 14 | |
3214b89b | 15 | You should have received a copy of the GNU Lesser General Public |
ab84e3ff | 16 | License along with the GNU C Library. If not, see |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
d0c2d3b3 UD |
18 | |
19 | /* This just does a tail-call to `__sigsetjmp (ARG, 1)'. | |
20 | We cannot do it in C because it must be a tail-call, so frame-unwinding | |
21 | in setjmp doesn't clobber the state restored by longjmp. */ | |
22 | ||
b8ddf7a1 | 23 | #include <sgidefs.h> |
d0c2d3b3 | 24 | #include <sysdep.h> |
ca2b264c | 25 | #include <sys/asm.h> |
d0c2d3b3 UD |
26 | |
27 | #ifdef PIC | |
28 | .option pic2 | |
29 | #endif | |
30 | ENTRY (setjmp) | |
ca2b264c AO |
31 | #ifdef __PIC__ |
32 | SETUP_GP | |
d0c2d3b3 | 33 | #endif |
aea7a9b9 | 34 | SETUP_GP64_REG (v0, C_SYMBOL_NAME (setjmp)) |
ca2b264c | 35 | PTR_LA t9, C_SYMBOL_NAME (__sigsetjmp) |
b8ddf7a1 | 36 | #if _MIPS_SIM == _ABIO32 |
d0c2d3b3 | 37 | nop |
5556231d | 38 | #endif |
aea7a9b9 | 39 | RESTORE_GP64_REG |
d0c2d3b3 | 40 | dli a1, 1 /* Pass a second argument of one. */ |
ca2b264c AO |
41 | #ifdef __PIC__ |
42 | jr t9 | |
43 | #else | |
44 | j C_SYMBOL_NAME (__sigsetjmp) | |
45 | #endif | |
a6ee1783 | 46 | END (setjmp) |