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  ****************************************************************************
     11  ****************************************************************************/
     12 #ifndef _ASM_X86_SIGCONTEXT_H
     13 #define _ASM_X86_SIGCONTEXT_H
     14 
     15 #include <linux/compiler.h>
     16 #include <asm/types.h>
     17 
     18 #ifdef __i386__
     19 
     20 struct _fpreg {
     21  unsigned short significand[4];
     22  unsigned short exponent;
     23 };
     24 
     25 struct _fpxreg {
     26  unsigned short significand[4];
     27  unsigned short exponent;
     28  unsigned short padding[3];
     29 };
     30 
     31 struct _xmmreg {
     32  unsigned long element[4];
     33 };
     34 
     35 struct _fpstate {
     36 
     37  unsigned long cw;
     38  unsigned long sw;
     39  unsigned long tag;
     40  unsigned long ipoff;
     41  unsigned long cssel;
     42  unsigned long dataoff;
     43  unsigned long datasel;
     44  struct _fpreg _st[8];
     45  unsigned short status;
     46  unsigned short magic;
     47 
     48  unsigned long _fxsr_env[6];
     49  unsigned long mxcsr;
     50  unsigned long reserved;
     51  struct _fpxreg _fxsr_st[8];
     52  struct _xmmreg _xmm[8];
     53  unsigned long padding[56];
     54 };
     55 
     56 #define X86_FXSR_MAGIC 0x0000
     57 
     58 struct sigcontext {
     59  unsigned short gs, __gsh;
     60  unsigned short fs, __fsh;
     61  unsigned short es, __esh;
     62  unsigned short ds, __dsh;
     63  unsigned long edi;
     64  unsigned long esi;
     65  unsigned long ebp;
     66  unsigned long esp;
     67  unsigned long ebx;
     68  unsigned long edx;
     69  unsigned long ecx;
     70  unsigned long eax;
     71  unsigned long trapno;
     72  unsigned long err;
     73  unsigned long eip;
     74  unsigned short cs, __csh;
     75  unsigned long eflags;
     76  unsigned long esp_at_signal;
     77  unsigned short ss, __ssh;
     78  struct _fpstate __user * fpstate;
     79  unsigned long oldmask;
     80  unsigned long cr2;
     81 };
     82 
     83 #else
     84 
     85 struct _fpstate {
     86  __u16 cwd;
     87  __u16 swd;
     88  __u16 twd;
     89  __u16 fop;
     90  __u64 rip;
     91  __u64 rdp;
     92  __u32 mxcsr;
     93  __u32 mxcsr_mask;
     94  __u32 st_space[32];
     95  __u32 xmm_space[64];
     96  __u32 reserved2[24];
     97 };
     98 
     99 struct sigcontext {
    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  unsigned long rdi;
    109  unsigned long rsi;
    110  unsigned long rbp;
    111  unsigned long rbx;
    112  unsigned long rdx;
    113  unsigned long rax;
    114  unsigned long rcx;
    115  unsigned long rsp;
    116  unsigned long rip;
    117  unsigned long eflags;
    118  unsigned short cs;
    119  unsigned short gs;
    120  unsigned short fs;
    121  unsigned short __pad0;
    122  unsigned long err;
    123  unsigned long trapno;
    124  unsigned long oldmask;
    125  unsigned long cr2;
    126  struct _fpstate __user *fpstate;
    127  unsigned long reserved1[8];
    128 };
    129 
    130 #endif
    131 
    132 #endif
    133