xref: /haiku/headers/posix/arch/x86_64/signal.h (revision 1e60bdeab63fa7a57bc9a55b032052e95a18bd2c)
1 /*
2  * Copyright 2002-2012 Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _ARCH_SIGNAL_H_
6 #define _ARCH_SIGNAL_H_
7 
8 
9 /*
10  * Architecture-specific structure passed to signal handlers
11  */
12 
13 #if __x86_64__
14 
15 
16 struct fp_stack {
17 	unsigned char		st0[10];
18 	unsigned char		_reserved_42_47[6];
19 	unsigned char		st1[10];
20 	unsigned char		_reserved_58_63[6];
21 	unsigned char		st2[10];
22 	unsigned char		_reserved_74_79[6];
23 	unsigned char		st3[10];
24 	unsigned char		_reserved_90_95[6];
25 	unsigned char		st4[10];
26 	unsigned char		_reserved_106_111[6];
27 	unsigned char		st5[10];
28 	unsigned char		_reserved_122_127[6];
29 	unsigned char		st6[10];
30 	unsigned char		_reserved_138_143[6];
31 	unsigned char		st7[10];
32 	unsigned char		_reserved_154_159[6];
33 };
34 
35 struct mmx_regs {
36 	unsigned char		mm0[10];
37 	unsigned char		_reserved_42_47[6];
38 	unsigned char		mm1[10];
39 	unsigned char		_reserved_58_63[6];
40 	unsigned char		mm2[10];
41 	unsigned char		_reserved_74_79[6];
42 	unsigned char		mm3[10];
43 	unsigned char		_reserved_90_95[6];
44 	unsigned char		mm4[10];
45 	unsigned char		_reserved_106_111[6];
46 	unsigned char		mm5[10];
47 	unsigned char		_reserved_122_127[6];
48 	unsigned char		mm6[10];
49 	unsigned char		_reserved_138_143[6];
50 	unsigned char		mm7[10];
51 	unsigned char		_reserved_154_159[6];
52 };
53 
54 struct xmm_regs {
55 	unsigned char		xmm0[16];
56 	unsigned char		xmm1[16];
57 	unsigned char		xmm2[16];
58 	unsigned char		xmm3[16];
59 	unsigned char		xmm4[16];
60 	unsigned char		xmm5[16];
61 	unsigned char		xmm6[16];
62 	unsigned char		xmm7[16];
63 	unsigned char		xmm8[16];
64 	unsigned char		xmm9[16];
65 	unsigned char		xmm10[16];
66 	unsigned char		xmm11[16];
67 	unsigned char		xmm12[16];
68 	unsigned char		xmm13[16];
69 	unsigned char		xmm14[16];
70 	unsigned char		xmm15[16];
71 };
72 
73 struct fpu_state {
74 	unsigned short		control;
75 	unsigned short		status;
76 	unsigned short		tag;
77 	unsigned short		opcode;
78 	unsigned long		rip;
79 	unsigned long		rdp;
80 	unsigned int		mxcsr;
81 	unsigned int		mscsr_mask;
82 
83 	union {
84 		struct fp_stack	fp;
85 		struct mmx_regs	mmx;
86 	};
87 
88 	struct xmm_regs		xmm;
89 	unsigned char		_reserved_416_511[96];
90 };
91 
92 struct vregs {
93 	unsigned long		rax;
94 	unsigned long		rbx;
95 	unsigned long		rcx;
96 	unsigned long		rdx;
97 	unsigned long		rdi;
98 	unsigned long		rsi;
99 	unsigned long		rbp;
100 	unsigned long		r8;
101 	unsigned long		r9;
102 	unsigned long		r10;
103 	unsigned long		r11;
104 	unsigned long		r12;
105 	unsigned long		r13;
106 	unsigned long		r14;
107 	unsigned long		r15;
108 
109 	unsigned long		rsp;
110 	unsigned long		rip;
111 	unsigned long		rflags;
112 
113 	struct fpu_state	fpu;
114 };
115 
116 
117 #endif /* __x86_64__ */
118 
119 #endif /* _ARCH_SIGNAL_H_ */
120