|
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 |
#include <jmpbuf-offsets.h>
|
|
Packit Service |
82fcde |
#include <stap-probe.h>
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
/* Keep traditional entry points in with sigsetjmp(). */
|
|
Packit Service |
82fcde |
ENTRY (setjmp)
|
|
Packit Service |
82fcde |
mov x1, #1
|
|
Packit Service |
82fcde |
b 1f
|
|
Packit Service |
82fcde |
END (setjmp)
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ENTRY (_setjmp)
|
|
Packit Service |
82fcde |
mov x1, #0
|
|
Packit Service |
82fcde |
b 1f
|
|
Packit Service |
82fcde |
END (_setjmp)
|
|
Packit Service |
82fcde |
libc_hidden_def (_setjmp)
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
ENTRY (__sigsetjmp)
|
|
Packit Service |
82fcde |
DELOUSE (0)
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
1:
|
|
Packit Service |
82fcde |
stp x19, x20, [x0, #JB_X19<<3]
|
|
Packit Service |
82fcde |
stp x21, x22, [x0, #JB_X21<<3]
|
|
Packit Service |
82fcde |
stp x23, x24, [x0, #JB_X23<<3]
|
|
Packit Service |
82fcde |
stp x25, x26, [x0, #JB_X25<<3]
|
|
Packit Service |
82fcde |
stp x27, x28, [x0, #JB_X27<<3]
|
|
Packit Service |
82fcde |
|
|
Packit Service |
82fcde |
#ifdef PTR_MANGLE
|
|
Packit Service |
82fcde |
PTR_MANGLE (4, 30, 3, 2)
|
|
Packit Service |
82fcde |
stp x29, x4, [x0, #JB_X29<<3]
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
stp x29, x30, [x0, #JB_X29<<3]
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
/* setjmp probe takes 3 arguments, address of jump buffer
|
|
Packit Service |
82fcde |
first argument (8@x0), return value second argument (-4@x1),
|
|
Packit Service |
82fcde |
and target address (8@x30), respectively. */
|
|
Packit Service |
82fcde |
LIBC_PROBE (setjmp, 3, 8@x0, -4@x1, 8@x30)
|
|
Packit Service |
82fcde |
stp d8, d9, [x0, #JB_D8<<3]
|
|
Packit Service |
82fcde |
stp d10, d11, [x0, #JB_D10<<3]
|
|
Packit Service |
82fcde |
stp d12, d13, [x0, #JB_D12<<3]
|
|
Packit Service |
82fcde |
stp d14, d15, [x0, #JB_D14<<3]
|
|
Packit Service |
82fcde |
#ifdef PTR_MANGLE
|
|
Packit Service |
82fcde |
mov x4, sp
|
|
Packit Service |
82fcde |
PTR_MANGLE (5, 4, 3, 2)
|
|
Packit Service |
82fcde |
str x5, [x0, #JB_SP<<3]
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
mov x2, sp
|
|
Packit Service |
82fcde |
str x2, [x0, #JB_SP<<3]
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
#if IS_IN (rtld)
|
|
Packit Service |
82fcde |
/* In ld.so we never save the signal mask */
|
|
Packit Service |
82fcde |
mov w0, #0
|
|
Packit Service |
82fcde |
RET
|
|
Packit Service |
82fcde |
#else
|
|
Packit Service |
82fcde |
b C_SYMBOL_NAME(__sigjmp_save)
|
|
Packit Service |
82fcde |
#endif
|
|
Packit Service |
82fcde |
END (__sigsetjmp)
|
|
Packit Service |
82fcde |
hidden_def (__sigsetjmp)
|