diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-06-30 19:04:52 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2010-06-30 19:04:52 +0000 |
commit | 93c4ee391ae8e2d74a7c1307b854f4a282104031 (patch) | |
tree | 6cf695eddbd493b7a4490a0d4a34ba5e5f4d1ca8 /lib/libpthread | |
parent | c002370e6d2ac868c778fa017e4c4963076c1535 (diff) |
Use __attribute__ ((aligned (16)), to make sure the FPU state is aligned
on a 128-bit boundary like we do on amd64. The padding within the struct
made sure the state was properly aligned *within* the struct, but since the
alignment restriction on the struct itself was only 64-bit, the required
alignment was not guaranteed. We just got lucky.
ok oga@, guenther@
Diffstat (limited to 'lib/libpthread')
-rw-r--r-- | lib/libpthread/arch/i386/uthread_machdep.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libpthread/arch/i386/uthread_machdep.h b/lib/libpthread/arch/i386/uthread_machdep.h index 58b1425a75c..becb026755f 100644 --- a/lib/libpthread/arch/i386/uthread_machdep.h +++ b/lib/libpthread/arch/i386/uthread_machdep.h @@ -1,10 +1,10 @@ -/* $OpenBSD: uthread_machdep.h,v 1.9 2004/02/21 22:55:20 deraadt Exp $ */ +/* $OpenBSD: uthread_machdep.h,v 1.10 2010/06/30 19:04:51 kettenis Exp $ */ /* David Leonard, <d@csee.uq.edu.au>. Public domain. */ #include <machine/npx.h> struct _machdep_state { int esp; - int pad[3]; - union savefpu fpreg; /* must be 128-bit aligned */ + /* must be 128-bit aligned */ + union savefpu fpreg __attribute__ ((aligned (16))); }; |