2 Copyright (C) 1991-2023 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
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.
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
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library. If not, see
17 <https://www.gnu.org/licenses/>. */
20 #include <pointer_guard.h>
21 #include <jmpbuf-offsets.h>
33 libc_hidden_def (_setjmp)
35 /* Save the current program position in ENV and return 0. */
40 stw r16, (JB_R16*4)(r4)
41 stw r17, (JB_R17*4)(r4)
42 stw r18, (JB_R18*4)(r4)
43 stw r19, (JB_R19*4)(r4)
44 stw r20, (JB_R20*4)(r4)
45 stw r21, (JB_R21*4)(r4)
46 stw r22, (JB_R22*4)(r4)
49 PTR_MANGLE (r6, ra, r9)
50 PTR_MANGLE (r7, sp, r9)
58 /* In ld.so we never save the signal mask. */
62 /* Save the signal mask if requested. */
63 #if defined(__PIC__) || defined(PIC)
65 1: movhi r3, %hiadj(__sigjmp_save - 1b)
66 addi r3, r3, %lo(__sigjmp_save - 1b)
74 libc_hidden_def (__sigsetjmp)