From 93c4ee391ae8e2d74a7c1307b854f4a282104031 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Wed, 30 Jun 2010 19:04:52 +0000 Subject: 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@ --- lib/libpthread/arch/i386/uthread_machdep.h | 6 +++--- 1 file 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, . Public domain. */ #include 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))); }; -- cgit v1.2.3