sigcontext32.h 1.9 KB
Newer Older
H
H. Peter Anvin 已提交
1 2
#ifndef _ASM_X86_SIGCONTEXT32_H
#define _ASM_X86_SIGCONTEXT32_H
L
Linus Torvalds 已提交
3

4 5
/* Signal context definitions for compat 32-bit programs: */

6 7
#include <linux/types.h>

8 9
#include <asm/sigcontext.h>

10
/* 10-byte legacy floating point register: */
L
Linus Torvalds 已提交
11
struct _fpreg {
12 13
	__u16				significand[4];
	__u16				exponent;
L
Linus Torvalds 已提交
14 15
};

16
/* 16-byte floating point register: */
L
Linus Torvalds 已提交
17
struct _fpxreg {
18 19 20
	__u16				significand[4];
	__u16				exponent;
	__u16				padding[3];
L
Linus Torvalds 已提交
21 22
};

23
/* 16-byte XMM vector register: */
L
Linus Torvalds 已提交
24 25 26 27
struct _xmmreg {
	__u32	element[4];
};

28 29 30
#define X86_FXSR_MAGIC			0x0000

/* FXSAVE frame: FSAVE frame with extensions */
L
Linus Torvalds 已提交
31
struct _fpstate_ia32 {
32 33 34 35 36 37 38 39 40
	/* Regular FPU environment: */
	__u32				cw;
	__u32				sw;
	__u32				tag;		/* Not compatible with the 64-bit frame */
	__u32				ipoff;
	__u32				cssel;
	__u32				dataoff;
	__u32				datasel;
	struct _fpreg			_st[8];
41 42
	__u16				status;
	__u16				magic;		/* 0xffff: regular FPU data only */
43
							/* 0x0000: FXSR data */
L
Linus Torvalds 已提交
44

45 46 47 48 49 50 51
	/* Extended FXSR FPU environment: */
	__u32				_fxsr_env[6];
	__u32				mxcsr;
	__u32				reserved;
	struct _fpxreg			_fxsr_st[8];
	struct _xmmreg			_xmm[8];	/* The first  8 XMM registers */
	__u32				padding[44];	/* The second 8 XMM registers plus padding */
52
	union {
53 54 55
		__u32			padding2[12];
		/* Might encode xstate extensions, see asm/sigcontext.h: */
		struct _fpx_sw_bytes	sw_reserved;
56
	};
L
Linus Torvalds 已提交
57 58
};

59
/* 32-bit compat sigcontext: */
L
Linus Torvalds 已提交
60
struct sigcontext_ia32 {
61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82
       __u16				gs, __gsh;
       __u16				fs, __fsh;
       __u16				es, __esh;
       __u16				ds, __dsh;
       __u32				di;
       __u32				si;
       __u32				bp;
       __u32				sp;
       __u32				bx;
       __u32				dx;
       __u32				cx;
       __u32				ax;
       __u32				trapno;
       __u32				err;
       __u32				ip;
       __u16				cs, __csh;
       __u32				flags;
       __u32				sp_at_signal;
       __u16				ss, __ssh;
       __u32				fpstate;	/* Pointer to 'struct _fpstate_ia32' */
       __u32				oldmask;
       __u32				cr2;
L
Linus Torvalds 已提交
83 84
};

H
H. Peter Anvin 已提交
85
#endif /* _ASM_X86_SIGCONTEXT32_H */