|
Packit Service |
82fcde |
/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
This file is part of the GNU C Library.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is free software; you can redistribute it and/or
|
|
Packit Service |
82fcde |
modify it under the terms of the GNU Lesser General Public License as
|
|
Packit Service |
82fcde |
published by the Free Software Foundation; either version 2.1 of the
|
|
Packit Service |
82fcde |
License, or (at your option) any later version.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
The GNU C Library is distributed in the hope that it will be useful,
|
|
Packit Service |
82fcde |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
Packit Service |
82fcde |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
Packit Service |
82fcde |
Lesser General Public License for more details.
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
82fcde |
License along with the GNU C Library. If not, see
|
|
Packit Service |
82fcde |
<http://www.gnu.org/licenses/>. */
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#include <sysdep.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* This source produces 3 functions:
|
|
Packit Service |
82fcde |
__sigsetjmp (jmpbuf,savemask)
|
|
Packit Service |
82fcde |
setjmp (jmpbuf) - equivalent to __sigsetjump (jmpbuf, 1)
|
|
Packit Service |
82fcde |
_setjmp (jmpbuf) - equivalent to __sigsetjump (jmpbuf, 0)
|
|
Packit Service |
82fcde |
*/
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifndef setjmp_name
|
|
Packit Service |
82fcde |
# define setjmp_name __sigsetjmp
|
|
Packit Service |
82fcde |
# define SET_MASK_ARG
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
# define SET_MASK_ARG addik r6,r0,SAVEMASK
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ENTRY (setjmp_name)
|
|
Packit Service |
82fcde |
swi r1,r5,0
|
|
Packit Service |
82fcde |
swi r2,r5,4
|
|
Packit Service |
82fcde |
swi r13,r5,8
|
|
Packit Service |
82fcde |
swi r14,r5,12
|
|
Packit Service |
82fcde |
swi r15,r5,16
|
|
Packit Service |
82fcde |
swi r16,r5,20
|
|
Packit Service |
82fcde |
swi r17,r5,24
|
|
Packit Service |
82fcde |
swi r18,r5,28
|
|
Packit Service |
82fcde |
swi r19,r5,32
|
|
Packit Service |
82fcde |
swi r20,r5,36
|
|
Packit Service |
82fcde |
swi r21,r5,40
|
|
Packit Service |
82fcde |
swi r22,r5,44
|
|
Packit Service |
82fcde |
swi r23,r5,48
|
|
Packit Service |
82fcde |
swi r24,r5,52
|
|
Packit Service |
82fcde |
swi r25,r5,56
|
|
Packit Service |
82fcde |
swi r26,r5,60
|
|
Packit Service |
82fcde |
swi r27,r5,64
|
|
Packit Service |
82fcde |
swi r28,r5,68
|
|
Packit Service |
82fcde |
swi r29,r5,72
|
|
Packit Service |
82fcde |
swi r30,r5,76
|
|
Packit Service |
82fcde |
swi r31,r5,80
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
SET_MASK_ARG
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Make a tail call to __sigjmp_save; it takes the same args. */
|
|
Packit Service |
82fcde |
#ifdef PIC
|
|
Packit Service |
82fcde |
/* We cannot use the PLT, because it requires that r20 be set, but
|
|
Packit Service |
82fcde |
we can't save and restore our caller's value. Instead, we do an
|
|
Packit Service |
82fcde |
indirect jump through the GOT, using the temporary register
|
|
Packit Service |
82fcde |
%ecx, which is call-clobbered. */
|
|
Packit Service |
82fcde |
mfs r12,rpc
|
|
Packit Service |
82fcde |
addik r12,r12,_GLOBAL_OFFSET_TABLE_+8
|
|
Packit Service |
82fcde |
lwi r12,r12,__sigjmp_save@GOT
|
|
Packit Service |
82fcde |
brad r12
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
brid __sigjmp_save
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
nop
|
|
Packit Service |
82fcde |
END (setjmp_name)
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
libc_hidden_def (setjmp_name)
|