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