1 /* 2 * This file is auto-generated. Modifications will be lost. 3 * 4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/ 5 * for more information. 6 */ 7 #ifndef _UAPI_ASM_X86_SIGCONTEXT_H 8 #define _UAPI_ASM_X86_SIGCONTEXT_H 9 #include <linux/compiler.h> 10 #include <linux/types.h> 11 #define FP_XSTATE_MAGIC1 0x46505853U 12 #define FP_XSTATE_MAGIC2 0x46505845U 13 #define FP_XSTATE_MAGIC2_SIZE sizeof(FP_XSTATE_MAGIC2) 14 struct _fpx_sw_bytes { 15 __u32 magic1; 16 __u32 extended_size; 17 __u64 xfeatures; 18 __u32 xstate_size; 19 __u32 padding[7]; 20 }; 21 struct _fpreg { 22 __u16 significand[4]; 23 __u16 exponent; 24 }; 25 struct _fpxreg { 26 __u16 significand[4]; 27 __u16 exponent; 28 __u16 padding[3]; 29 }; 30 struct _xmmreg { 31 __u32 element[4]; 32 }; 33 #define X86_FXSR_MAGIC 0x0000 34 struct _fpstate_32 { 35 __u32 cw; 36 __u32 sw; 37 __u32 tag; 38 __u32 ipoff; 39 __u32 cssel; 40 __u32 dataoff; 41 __u32 datasel; 42 struct _fpreg _st[8]; 43 __u16 status; 44 __u16 magic; 45 __u32 _fxsr_env[6]; 46 __u32 mxcsr; 47 __u32 reserved; 48 struct _fpxreg _fxsr_st[8]; 49 struct _xmmreg _xmm[8]; 50 union { 51 __u32 padding1[44]; 52 __u32 padding[44]; 53 }; 54 union { 55 __u32 padding2[12]; 56 struct _fpx_sw_bytes sw_reserved; 57 }; 58 }; 59 struct _fpstate_64 { 60 __u16 cwd; 61 __u16 swd; 62 __u16 twd; 63 __u16 fop; 64 __u64 rip; 65 __u64 rdp; 66 __u32 mxcsr; 67 __u32 mxcsr_mask; 68 __u32 st_space[32]; 69 __u32 xmm_space[64]; 70 __u32 reserved2[12]; 71 union { 72 __u32 reserved3[12]; 73 struct _fpx_sw_bytes sw_reserved; 74 }; 75 }; 76 #ifdef __i386__ 77 #define _fpstate _fpstate_32 78 #else 79 #define _fpstate _fpstate_64 80 #endif 81 struct _header { 82 __u64 xfeatures; 83 __u64 reserved1[2]; 84 __u64 reserved2[5]; 85 }; 86 struct _ymmh_state { 87 __u32 ymmh_space[64]; 88 }; 89 struct _xstate { 90 struct _fpstate fpstate; 91 struct _header xstate_hdr; 92 struct _ymmh_state ymmh; 93 }; 94 struct sigcontext_32 { 95 __u16 gs, __gsh; 96 __u16 fs, __fsh; 97 __u16 es, __esh; 98 __u16 ds, __dsh; 99 __u32 di; 100 __u32 si; 101 __u32 bp; 102 __u32 sp; 103 __u32 bx; 104 __u32 dx; 105 __u32 cx; 106 __u32 ax; 107 __u32 trapno; 108 __u32 err; 109 __u32 ip; 110 __u16 cs, __csh; 111 __u32 flags; 112 __u32 sp_at_signal; 113 __u16 ss, __ssh; 114 __u32 fpstate; 115 __u32 oldmask; 116 __u32 cr2; 117 }; 118 struct sigcontext_64 { 119 __u64 r8; 120 __u64 r9; 121 __u64 r10; 122 __u64 r11; 123 __u64 r12; 124 __u64 r13; 125 __u64 r14; 126 __u64 r15; 127 __u64 di; 128 __u64 si; 129 __u64 bp; 130 __u64 bx; 131 __u64 dx; 132 __u64 ax; 133 __u64 cx; 134 __u64 sp; 135 __u64 ip; 136 __u64 flags; 137 __u16 cs; 138 __u16 gs; 139 __u16 fs; 140 __u16 ss; 141 __u64 err; 142 __u64 trapno; 143 __u64 oldmask; 144 __u64 cr2; 145 __u64 fpstate; 146 __u64 reserved1[8]; 147 }; 148 #define _fpstate_ia32 _fpstate_32 149 #define sigcontext_ia32 sigcontext_32 150 #ifdef __i386__ 151 struct sigcontext { 152 __u16 gs, __gsh; 153 __u16 fs, __fsh; 154 __u16 es, __esh; 155 __u16 ds, __dsh; 156 __u32 edi; 157 __u32 esi; 158 __u32 ebp; 159 __u32 esp; 160 __u32 ebx; 161 __u32 edx; 162 __u32 ecx; 163 __u32 eax; 164 __u32 trapno; 165 __u32 err; 166 __u32 eip; 167 __u16 cs, __csh; 168 __u32 eflags; 169 __u32 esp_at_signal; 170 __u16 ss, __ssh; 171 struct _fpstate * fpstate; 172 __u32 oldmask; 173 __u32 cr2; 174 }; 175 #else 176 struct sigcontext { 177 __u64 r8; 178 __u64 r9; 179 __u64 r10; 180 __u64 r11; 181 __u64 r12; 182 __u64 r13; 183 __u64 r14; 184 __u64 r15; 185 __u64 rdi; 186 __u64 rsi; 187 __u64 rbp; 188 __u64 rbx; 189 __u64 rdx; 190 __u64 rax; 191 __u64 rcx; 192 __u64 rsp; 193 __u64 rip; 194 __u64 eflags; 195 __u16 cs; 196 __u16 gs; 197 __u16 fs; 198 union { 199 __u16 ss; 200 __u16 __pad0; 201 }; 202 __u64 err; 203 __u64 trapno; 204 __u64 oldmask; 205 __u64 cr2; 206 struct _fpstate * fpstate; 207 #ifdef __ILP32__ 208 __u32 __fpstate_pad; 209 #endif 210 __u64 reserved1[8]; 211 }; 212 #endif 213 #endif 214