From a3dca4517e9784339384538e7fa2cb5e49299224 Mon Sep 17 00:00:00 2001 From: Daniel Eischen Date: Mon, 2 Dec 2002 19:58:55 +0000 Subject: 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) --- sys/amd64/include/ucontext.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'sys/amd64/include/ucontext.h') diff --git a/sys/amd64/include/ucontext.h b/sys/amd64/include/ucontext.h index ea6f0b6b1b8f..ec3e0eefaea2 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 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; -- cgit v1.3