1 #ifndef ALPHA_TARGET_SIGNAL_H
2 #define ALPHA_TARGET_SIGNAL_H
3 
4 #include "cpu.h"
5 
6 /* this struct defines a stack used during syscall handling */
7 
8 typedef struct target_sigaltstack {
9     abi_ulong ss_sp;
10     int32_t ss_flags;
11     int32_t dummy;
12     abi_ulong ss_size;
13 } target_stack_t;
14 
15 
16 /*
17  * sigaltstack controls
18  */
19 #define TARGET_SS_ONSTACK	1
20 #define TARGET_SS_DISABLE	2
21 
22 #define TARGET_MINSIGSTKSZ	4096
23 #define TARGET_SIGSTKSZ		16384
24 
25 static inline abi_ulong get_sp_from_cpustate(CPUAlphaState *state)
26 {
27     return state->ir[IR_SP];
28 }
29 
30 
31 /* From <asm/gentrap.h>.  */
32 #define TARGET_GEN_INTOVF      -1      /* integer overflow */
33 #define TARGET_GEN_INTDIV      -2      /* integer division by zero */
34 #define TARGET_GEN_FLTOVF      -3      /* fp overflow */
35 #define TARGET_GEN_FLTDIV      -4      /* fp division by zero */
36 #define TARGET_GEN_FLTUND      -5      /* fp underflow */
37 #define TARGET_GEN_FLTINV      -6      /* invalid fp operand */
38 #define TARGET_GEN_FLTINE      -7      /* inexact fp operand */
39 #define TARGET_GEN_DECOVF      -8      /* decimal overflow (for COBOL??) */
40 #define TARGET_GEN_DECDIV      -9      /* decimal division by zero */
41 #define TARGET_GEN_DECINV      -10     /* invalid decimal operand */
42 #define TARGET_GEN_ROPRAND     -11     /* reserved operand */
43 #define TARGET_GEN_ASSERTERR   -12     /* assertion error */
44 #define TARGET_GEN_NULPTRERR   -13     /* null pointer error */
45 #define TARGET_GEN_STKOVF      -14     /* stack overflow */
46 #define TARGET_GEN_STRLENERR   -15     /* string length error */
47 #define TARGET_GEN_SUBSTRERR   -16     /* substring error */
48 #define TARGET_GEN_RANGERR     -17     /* range error */
49 #define TARGET_GEN_SUBRNG      -18
50 #define TARGET_GEN_SUBRNG1     -19
51 #define TARGET_GEN_SUBRNG2     -20
52 #define TARGET_GEN_SUBRNG3     -21
53 #define TARGET_GEN_SUBRNG4     -22
54 #define TARGET_GEN_SUBRNG5     -23
55 #define TARGET_GEN_SUBRNG6     -24
56 #define TARGET_GEN_SUBRNG7     -25
57 
58 #endif /* ALPHA_TARGET_SIGNAL_H */
59