blob: bbb06e5463084ae8b4829342f159614ffd5a6a03 [file] [log] [blame]
Markus Armbruster9c93ae12016-06-29 16:09:50 +02001#ifndef ALPHA_TARGET_SIGNAL_H
2#define ALPHA_TARGET_SIGNAL_H
thsa04e1342007-09-27 13:57:58 +00003
Laurent Vivier3e511152018-05-29 21:42:05 +02004#define TARGET_SIGHUP 1
5#define TARGET_SIGINT 2
6#define TARGET_SIGQUIT 3
7#define TARGET_SIGILL 4
8#define TARGET_SIGTRAP 5
9#define TARGET_SIGABRT 6
10#define TARGET_SIGSTKFLT 7 /* actually SIGEMT */
11#define TARGET_SIGFPE 8
12#define TARGET_SIGKILL 9
13#define TARGET_SIGBUS 10
14#define TARGET_SIGSEGV 11
15#define TARGET_SIGSYS 12
16#define TARGET_SIGPIPE 13
17#define TARGET_SIGALRM 14
18#define TARGET_SIGTERM 15
19#define TARGET_SIGURG 16
20#define TARGET_SIGSTOP 17
21#define TARGET_SIGTSTP 18
22#define TARGET_SIGCONT 19
23#define TARGET_SIGCHLD 20
24#define TARGET_SIGTTIN 21
25#define TARGET_SIGTTOU 22
26#define TARGET_SIGIO 23
27#define TARGET_SIGXCPU 24
28#define TARGET_SIGXFSZ 25
29#define TARGET_SIGVTALRM 26
30#define TARGET_SIGPROF 27
31#define TARGET_SIGWINCH 28
32#define TARGET_SIGPWR 29 /* actually SIGINFO */
33#define TARGET_SIGUSR1 30
34#define TARGET_SIGUSR2 31
35#define TARGET_SIGRTMIN 32
36
37#define TARGET_SIG_BLOCK 1
38#define TARGET_SIG_UNBLOCK 2
39#define TARGET_SIG_SETMASK 3
40
thsa04e1342007-09-27 13:57:58 +000041/* this struct defines a stack used during syscall handling */
42
43typedef struct target_sigaltstack {
Richard Hendersonb7fb2312012-09-14 15:59:24 -070044 abi_ulong ss_sp;
LemonBoyce437482020-11-05 16:52:51 +010045 abi_int ss_flags;
Richard Hendersonb7fb2312012-09-14 15:59:24 -070046 abi_ulong ss_size;
Anthony Liguoric227f092009-10-01 16:12:16 -050047} target_stack_t;
thsa04e1342007-09-27 13:57:58 +000048
49
50/*
51 * sigaltstack controls
52 */
53#define TARGET_SS_ONSTACK 1
54#define TARGET_SS_DISABLE 2
55
Laurent Vivier3e511152018-05-29 21:42:05 +020056#define TARGET_SA_ONSTACK 0x00000001
57#define TARGET_SA_RESTART 0x00000002
58#define TARGET_SA_NOCLDSTOP 0x00000004
59#define TARGET_SA_NODEFER 0x00000008
60#define TARGET_SA_RESETHAND 0x00000010
61#define TARGET_SA_NOCLDWAIT 0x00000020 /* not supported yet */
62#define TARGET_SA_SIGINFO 0x00000040
63
thsa04e1342007-09-27 13:57:58 +000064#define TARGET_MINSIGSTKSZ 4096
thsa04e1342007-09-27 13:57:58 +000065
Richard Henderson6049f4f2009-12-27 18:30:03 -080066/* From <asm/gentrap.h>. */
67#define TARGET_GEN_INTOVF -1 /* integer overflow */
68#define TARGET_GEN_INTDIV -2 /* integer division by zero */
69#define TARGET_GEN_FLTOVF -3 /* fp overflow */
70#define TARGET_GEN_FLTDIV -4 /* fp division by zero */
71#define TARGET_GEN_FLTUND -5 /* fp underflow */
72#define TARGET_GEN_FLTINV -6 /* invalid fp operand */
73#define TARGET_GEN_FLTINE -7 /* inexact fp operand */
74#define TARGET_GEN_DECOVF -8 /* decimal overflow (for COBOL??) */
75#define TARGET_GEN_DECDIV -9 /* decimal division by zero */
76#define TARGET_GEN_DECINV -10 /* invalid decimal operand */
77#define TARGET_GEN_ROPRAND -11 /* reserved operand */
78#define TARGET_GEN_ASSERTERR -12 /* assertion error */
79#define TARGET_GEN_NULPTRERR -13 /* null pointer error */
80#define TARGET_GEN_STKOVF -14 /* stack overflow */
81#define TARGET_GEN_STRLENERR -15 /* string length error */
82#define TARGET_GEN_SUBSTRERR -16 /* substring error */
83#define TARGET_GEN_RANGERR -17 /* range error */
84#define TARGET_GEN_SUBRNG -18
85#define TARGET_GEN_SUBRNG1 -19
86#define TARGET_GEN_SUBRNG2 -20
87#define TARGET_GEN_SUBRNG3 -21
88#define TARGET_GEN_SUBRNG4 -22
89#define TARGET_GEN_SUBRNG5 -23
90#define TARGET_GEN_SUBRNG6 -24
91#define TARGET_GEN_SUBRNG7 -25
92
Laurent Viviercb6ac802018-04-24 21:26:35 +020093#define TARGET_ARCH_HAS_SETUP_FRAME
Richard Henderson0f6f9902021-04-22 16:02:25 -070094#define TARGET_ARCH_HAS_KA_RESTORER
Richard Hendersondd55f1c2021-09-29 09:05:33 -040095#define TARGET_ARCH_HAS_SIGTRAMP_PAGE 1
Chen Gangfba08742020-10-08 12:31:05 +080096
97/* bit-flags */
98#define TARGET_SS_AUTODISARM (1U << 31) /* disable sas during sighandling */
99/* mask for all SS_xxx flags */
100#define TARGET_SS_FLAG_BITS TARGET_SS_AUTODISARM
101
Markus Armbruster9c93ae12016-06-29 16:09:50 +0200102#endif /* ALPHA_TARGET_SIGNAL_H */