1 /* Copyright (C) 1997-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 License as
7 published by the Free Software Foundation; either version 2.1 of the
8 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/>. */
21 /* This source produces 3 functions:
22 __sigsetjmp (jmpbuf,savemask)
23 setjmp (jmpbuf) - equivalent to __sigsetjump (jmpbuf, 1)
24 _setjmp (jmpbuf) - equivalent to __sigsetjump (jmpbuf, 0)
28 # define setjmp_name __sigsetjmp
31 # define SET_MASK_ARG addik r6,r0,SAVEMASK
59 /* Make a tail call to __sigjmp_save; it takes the same args. */
61 /* We cannot use the PLT, because it requires that r20 be set, but
62 we can't save and restore our caller's value. Instead, we do an
63 indirect jump through the GOT, using the temporary register
64 %ecx, which is call-clobbered. */
66 addik r12,r12,_GLOBAL_OFFSET_TABLE_+8
67 lwi r12,r12,__sigjmp_save@GOT
75 libc_hidden_def (setjmp_name)