x86/headers: Clean up uapi/asm/sigcontext32.h
Clean up sigcontext32.h a bit: - use consistent and readable vertical spacing - fix, harmonize and extend comments No field name has been changed, user-space might be relying on them. Acked-by: Mikko Rapeli <mikko.rapeli@iki.fi> Cc: Andy Lutomirski <luto@amacapital.net> Cc: Borislav Petkov <bp@alien8.de> Cc: Brian Gerst <brgerst@gmail.com> Cc: Denys Vlasenko <dvlasenk@redhat.com> Cc: H. Peter Anvin <hpa@zytor.com> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-kernel@vger.kernel.org Link: http://lkml.kernel.org/r/1441438363-9999-3-git-send-email-mingo@kernel.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -1,79 +1,85 @@
|
|||||||
#ifndef _ASM_X86_SIGCONTEXT32_H
|
#ifndef _ASM_X86_SIGCONTEXT32_H
|
||||||
#define _ASM_X86_SIGCONTEXT32_H
|
#define _ASM_X86_SIGCONTEXT32_H
|
||||||
|
|
||||||
|
/* Signal context definitions for compat 32-bit programs: */
|
||||||
|
|
||||||
#include <linux/types.h>
|
#include <linux/types.h>
|
||||||
|
|
||||||
#include <asm/sigcontext.h>
|
#include <asm/sigcontext.h>
|
||||||
|
|
||||||
/* signal context for 32bit programs. */
|
/* 10-byte legacy floating point register: */
|
||||||
|
|
||||||
#define X86_FXSR_MAGIC 0x0000
|
|
||||||
|
|
||||||
struct _fpreg {
|
struct _fpreg {
|
||||||
unsigned short significand[4];
|
unsigned short significand[4];
|
||||||
unsigned short exponent;
|
unsigned short exponent;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* 16-byte floating point register: */
|
||||||
struct _fpxreg {
|
struct _fpxreg {
|
||||||
unsigned short significand[4];
|
unsigned short significand[4];
|
||||||
unsigned short exponent;
|
unsigned short exponent;
|
||||||
unsigned short padding[3];
|
unsigned short padding[3];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* 16-byte XMM vector register: */
|
||||||
struct _xmmreg {
|
struct _xmmreg {
|
||||||
__u32 element[4];
|
__u32 element[4];
|
||||||
};
|
};
|
||||||
|
|
||||||
/* FSAVE frame with extensions */
|
#define X86_FXSR_MAGIC 0x0000
|
||||||
struct _fpstate_ia32 {
|
|
||||||
/* Regular FPU environment */
|
|
||||||
__u32 cw;
|
|
||||||
__u32 sw;
|
|
||||||
__u32 tag; /* not compatible to 64bit twd */
|
|
||||||
__u32 ipoff;
|
|
||||||
__u32 cssel;
|
|
||||||
__u32 dataoff;
|
|
||||||
__u32 datasel;
|
|
||||||
struct _fpreg _st[8];
|
|
||||||
unsigned short status;
|
|
||||||
unsigned short magic; /* 0xffff = regular FPU data only */
|
|
||||||
|
|
||||||
/* FXSR FPU environment */
|
/* FXSAVE frame: FSAVE frame with extensions */
|
||||||
__u32 _fxsr_env[6];
|
struct _fpstate_ia32 {
|
||||||
__u32 mxcsr;
|
/* Regular FPU environment: */
|
||||||
__u32 reserved;
|
__u32 cw;
|
||||||
struct _fpxreg _fxsr_st[8];
|
__u32 sw;
|
||||||
struct _xmmreg _xmm[8]; /* It's actually 16 */
|
__u32 tag; /* Not compatible with the 64-bit frame */
|
||||||
__u32 padding[44];
|
__u32 ipoff;
|
||||||
|
__u32 cssel;
|
||||||
|
__u32 dataoff;
|
||||||
|
__u32 datasel;
|
||||||
|
struct _fpreg _st[8];
|
||||||
|
unsigned short status;
|
||||||
|
unsigned short magic; /* 0xffff: regular FPU data only */
|
||||||
|
/* 0x0000: FXSR data */
|
||||||
|
|
||||||
|
/* 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 */
|
||||||
union {
|
union {
|
||||||
__u32 padding2[12];
|
__u32 padding2[12];
|
||||||
struct _fpx_sw_bytes sw_reserved;
|
/* Might encode xstate extensions, see asm/sigcontext.h: */
|
||||||
|
struct _fpx_sw_bytes sw_reserved;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/* 32-bit compat sigcontext: */
|
||||||
struct sigcontext_ia32 {
|
struct sigcontext_ia32 {
|
||||||
unsigned short gs, __gsh;
|
unsigned short gs, __gsh;
|
||||||
unsigned short fs, __fsh;
|
unsigned short fs, __fsh;
|
||||||
unsigned short es, __esh;
|
unsigned short es, __esh;
|
||||||
unsigned short ds, __dsh;
|
unsigned short ds, __dsh;
|
||||||
unsigned int di;
|
unsigned int di;
|
||||||
unsigned int si;
|
unsigned int si;
|
||||||
unsigned int bp;
|
unsigned int bp;
|
||||||
unsigned int sp;
|
unsigned int sp;
|
||||||
unsigned int bx;
|
unsigned int bx;
|
||||||
unsigned int dx;
|
unsigned int dx;
|
||||||
unsigned int cx;
|
unsigned int cx;
|
||||||
unsigned int ax;
|
unsigned int ax;
|
||||||
unsigned int trapno;
|
unsigned int trapno;
|
||||||
unsigned int err;
|
unsigned int err;
|
||||||
unsigned int ip;
|
unsigned int ip;
|
||||||
unsigned short cs, __csh;
|
unsigned short cs, __csh;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
unsigned int sp_at_signal;
|
unsigned int sp_at_signal;
|
||||||
unsigned short ss, __ssh;
|
unsigned short ss, __ssh;
|
||||||
unsigned int fpstate; /* really (struct _fpstate_ia32 *) */
|
unsigned int fpstate; /* Pointer to 'struct _fpstate_ia32' */
|
||||||
unsigned int oldmask;
|
unsigned int oldmask;
|
||||||
unsigned int cr2;
|
unsigned int cr2;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _ASM_X86_SIGCONTEXT32_H */
|
#endif /* _ASM_X86_SIGCONTEXT32_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user