iconv: prevent compiler warning during initialization with jis0208
[uclibc-ng.git] / libc / sysdeps / linux / nds32 / bsd-setjmp.S
blobe1f7c83fc67ef958e73fc633a0db20f5ef8115fc
1 /*
2  * Copyright (C) 2016 Andes Technology, Inc.
3  * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
4  */
6 /* This just does a tail-call to `__sigsetjmp (ARG, 1)'.
7    We cannot do it in C because it must be a tail-call, so frame-unwinding
8    in setjmp doesn't clobber the state restored by longjmp.  */
10 #include <sysdep.h>
12 ENTRY(setjmp)
13         move    $r1, #1
15 /* Make a tail call to __sigsetjmp.  */
16 #ifdef PIC
17         /* Initialize $r2 as $gp value.  */
18         sethi   $r2, hi20(_GLOBAL_OFFSET_TABLE_-8)
19         ori     $r2, $r2, lo12(_GLOBAL_OFFSET_TABLE_-4)
20         mfusr   $r15, $pc
21         add     $r2, $r15, $r2
23         ! la    $r3, __sigsetjmp@PLT
24         sethi   $r3, hi20(HIDDEN_JUMPTARGET(__sigsetjmp)@PLT)
25         ori     $r3, $r3, lo12(HIDDEN_JUMPTARGET(__sigsetjmp)@PLT)
26         add     $r3, $r3, $r2
28         jr      $r3
29 #else /* NOT PIC */
30         la      $r15, C_SYMBOL_NAME(__sigsetjmp)
31         jr      $r15
32 #endif
34 END (setjmp)