diff options
author | deischen <deischen@FreeBSD.org> | 2002-12-02 19:58:55 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2002-12-02 19:58:55 +0000 |
commit | 88d7b8f56badfe1166bf9c4ca3fe30a8e9e4b306 (patch) | |
tree | c46b44c418609ede008e86880bbd07544a9f2fa9 /sys/amd64/include | |
parent | 09074e808047049fdcb245eb25886bc976452efa (diff) | |
download | FreeBSD-src-88d7b8f56badfe1166bf9c4ca3fe30a8e9e4b306.zip FreeBSD-src-88d7b8f56badfe1166bf9c4ca3fe30a8e9e4b306.tar.gz |
Align the FPU state in the ucontext and sigcontext to 16 bytes
to accomodate the new SSE/XMM floating point save/restore
instructions.
This commit is mostly from bde and includes some style nits.
Approved by: re (jhb)
Diffstat (limited to 'sys/amd64/include')
-rw-r--r-- | sys/amd64/include/signal.h | 4 | ||||
-rw-r--r-- | sys/amd64/include/ucontext.h | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/amd64/include/signal.h b/sys/amd64/include/signal.h index efc7ef0..fb2d82c 100644 --- a/sys/amd64/include/signal.h +++ b/sys/amd64/include/signal.h @@ -100,7 +100,7 @@ struct osigcontext { struct sigcontext { struct __sigset sc_mask; /* signal mask to restore */ int sc_onstack; /* sigstack state to restore */ - int sc_gs; /* machine state (struct trapframe): */ + int sc_gs; /* machine state (struct trapframe) */ int sc_fs; int sc_es; int sc_ds; @@ -127,7 +127,7 @@ struct sigcontext { int sc_fpformat; int sc_ownedfp; int sc_spare1[1]; - int sc_fpstate[128]; + int sc_fpstate[128] __aligned(16); int sc_spare2[8]; }; diff --git a/sys/amd64/include/ucontext.h b/sys/amd64/include/ucontext.h index ea6f0b6..ec3e0ee 100644 --- a/sys/amd64/include/ucontext.h +++ b/sys/amd64/include/ucontext.h @@ -38,7 +38,7 @@ typedef struct __mcontext { * and ucontext_t at the same time. */ int mc_onstack; /* XXX - sigcontext compat. */ - int mc_gs; /* machine state (trapframe) */ + int mc_gs; /* machine state (struct trapframe) */ int mc_fs; int mc_es; int mc_ds; @@ -68,15 +68,17 @@ typedef struct __mcontext { #define _MC_FPOWNED_PCB 0x20002 /* FP state came from PCB */ int mc_ownedfp; int mc_spare1[1]; /* align next field to 16 bytes */ - int mc_fpstate[128]; /* must be multiple of 16 bytes */ + /* + * See <machine/npx.h> for the internals of mc_fpstate[]. + */ + int mc_fpstate[128] __aligned(16); int mc_spare2[8]; } mcontext_t; #if defined(_KERNEL) && defined(COMPAT_FREEBSD4) -/* For 4.x binaries */ struct mcontext4 { int mc_onstack; /* XXX - sigcontext compat. */ - int mc_gs; + int mc_gs; /* machine state (struct trapframe) */ int mc_fs; int mc_es; int mc_ds; |