2 * ARM AArch64 specific signal definitions for bsd-user
4 * Copyright (c) 2015 Stacey D. Son <sson at FreeBSD>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, see <http://www.gnu.org/licenses/>.
20 #ifndef TARGET_ARCH_SIGNAL_H
21 #define TARGET_ARCH_SIGNAL_H
25 #define TARGET_REG_X0 0
26 #define TARGET_REG_X30 30
27 #define TARGET_REG_X31 31
28 #define TARGET_REG_LR TARGET_REG_X30
29 #define TARGET_REG_SP TARGET_REG_X31
31 #define TARGET_INSN_SIZE 4 /* arm64 instruction size */
33 /* Size of the signal trampolin code. See _sigtramp(). */
34 #define TARGET_SZSIGCODE ((abi_ulong)(9 * TARGET_INSN_SIZE))
36 /* compare to sys/arm64/include/_limits.h */
37 #define TARGET_MINSIGSTKSZ (1024 * 4) /* min sig stack size */
38 #define TARGET_SIGSTKSZ (TARGET_MINSIGSTKSZ + 32768) /* recommended size */
40 /* struct __mcontext in sys/arm64/include/ucontext.h */
42 struct target_gpregs
{
51 struct target_fpregs
{
59 struct target__mcontext
{
60 struct target_gpregs mc_gpregs
;
61 struct target_fpregs mc_fpregs
;
63 #define TARGET_MC_FP_VALID 0x1
68 typedef struct target__mcontext target_mcontext_t
;
70 #define TARGET_MCONTEXT_SIZE 880
71 #define TARGET_UCONTEXT_SIZE 960
73 #include "target_os_ucontext.h"
75 struct target_sigframe
{
76 target_siginfo_t sf_si
; /* saved siginfo */
77 target_ucontext_t sf_uc
; /* saved ucontext */
80 #define TARGET_SIGSTACK_ALIGN 16
82 #endif /* TARGET_ARCH_SIGNAL_H */