Blame sysdeps/sh/sh3/setjmp.S
|
Packit Service |
82fcde |
/* setjmp for SH3.
|
|
Packit Service |
82fcde |
Copyright (C) 1999-2018 Free Software Foundation, Inc.
|
|
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
|
|
Packit Service |
82fcde |
License as published by the Free Software Foundation; either
|
|
Packit Service |
82fcde |
version 2.1 of the 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 |
#include <jmpbuf-offsets.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ENTRY (__sigsetjmp)
|
|
Packit Service |
82fcde |
/* Save registers */
|
|
Packit Service |
82fcde |
add #(JB_SIZE - 4 * 5), r4
|
|
Packit Service |
82fcde |
stc.l gbr, @-r4
|
|
Packit Service |
82fcde |
#ifdef PTR_MANGLE
|
|
Packit Service |
82fcde |
sts pr, r2
|
|
Packit Service |
82fcde |
PTR_MANGLE (r2, r1)
|
|
Packit Service |
82fcde |
mov.l r2, @-r4
|
|
Packit Service |
82fcde |
mov r15, r2
|
|
Packit Service |
82fcde |
PTR_MANGLE2 (r2, r1)
|
|
Packit Service |
82fcde |
mov.l r2, @-r4
|
|
Packit Service |
82fcde |
mov r14, r2
|
|
Packit Service |
82fcde |
PTR_MANGLE2 (r2, r1)
|
|
Packit Service |
82fcde |
mov.l r2, @-r4
|
|
Packit Service |
82fcde |
mov #0, r1
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
sts.l pr, @-r4
|
|
Packit Service |
82fcde |
mov.l r15, @-r4
|
|
Packit Service |
82fcde |
mov.l r14, @-r4
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
mov.l r13, @-r4
|
|
Packit Service |
82fcde |
mov.l r12, @-r4
|
|
Packit Service |
82fcde |
mov.l r11, @-r4
|
|
Packit Service |
82fcde |
mov.l r10, @-r4
|
|
Packit Service |
82fcde |
mov.l r9, @-r4
|
|
Packit Service |
82fcde |
mov.l r8, @-r4
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#if IS_IN (rtld)
|
|
Packit Service |
82fcde |
/* In ld.so we never save the signal mask. */
|
|
Packit Service |
82fcde |
rts
|
|
Packit Service |
82fcde |
mov #0, r0
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
/* Make a tail call to __sigjmp_save; it takes the same args. */
|
|
Packit Service |
82fcde |
# ifdef SHARED
|
|
Packit Service |
82fcde |
mov.l 1f, r1
|
|
Packit Service |
82fcde |
mova 1f, r0
|
|
Packit Service |
82fcde |
bra 2f
|
|
Packit Service |
82fcde |
add r1, r0
|
|
Packit Service |
82fcde |
.align 2
|
|
Packit Service |
82fcde |
1:
|
|
Packit Service |
82fcde |
.long _GLOBAL_OFFSET_TABLE_
|
|
Packit Service |
82fcde |
2:
|
|
Packit Service |
82fcde |
mov.l .L1, r1
|
|
Packit Service |
82fcde |
mov.l @(r0,r1), r1
|
|
Packit Service |
82fcde |
jmp @r1
|
|
Packit Service |
82fcde |
nop
|
|
Packit Service |
82fcde |
.align 2
|
|
Packit Service |
82fcde |
.L1:
|
|
Packit Service |
82fcde |
.long C_SYMBOL_NAME(__sigjmp_save@GOT)
|
|
Packit Service |
82fcde |
# else
|
|
Packit Service |
82fcde |
mov.l .L1, r1
|
|
Packit Service |
82fcde |
jmp @r1
|
|
Packit Service |
82fcde |
nop
|
|
Packit Service |
82fcde |
.align 2
|
|
Packit Service |
82fcde |
.L1:
|
|
Packit Service |
82fcde |
.long C_SYMBOL_NAME(__sigjmp_save)
|
|
Packit Service |
82fcde |
# endif
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
END (__sigsetjmp)
|
|
Packit Service |
82fcde |
hidden_def (__sigsetjmp)
|