From fa920178b0731bbdb6dc2accc40f9d1eb134b83c Mon Sep 17 00:00:00 2001 From: marcel Date: Sat, 26 Jul 2003 08:03:43 +0000 Subject: Avoid using __aligned(16). Instead define the jmp_buf in terms of long doubles. This gives us 16-byte alignment. Add a CTASSERT for the size of the jmp_buf to detect ABI breakages. --- sys/ia64/include/setjmp.h | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'sys') diff --git a/sys/ia64/include/setjmp.h b/sys/ia64/include/setjmp.h index d7ca9f6..0e7641e 100644 --- a/sys/ia64/include/setjmp.h +++ b/sys/ia64/include/setjmp.h @@ -90,11 +90,7 @@ #define J_SIGSET 0x1e0 #endif /* __BSD_VISIBLE */ -/* - * We only have 16 bytes left for future use, but it's a nice round, - * but above all large number. Size is in bytes. - */ -#define _JMPBUFSZ 0x200 +#define _JBLEN 0x20 /* Size in long doubles */ /* * XXX this check is wrong, since LOCORE is in the application namespace and @@ -113,16 +109,22 @@ */ #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE struct _sigjmp_buf { - char _Buffer[_JMPBUFSZ]; -} __aligned(16); + long double buf[_JBLEN]; +}; typedef struct _sigjmp_buf sigjmp_buf[1]; #endif struct _jmp_buf { - char _Buffer[_JMPBUFSZ]; -} __aligned(16); + long double buf[_JBLEN]; +}; typedef struct _jmp_buf jmp_buf[1]; +#ifdef _KERNEL +#ifdef CTASSERT +CTASSERT(sizeof(struct _jmp_buf) == 512); +#endif +#endif + #endif /* !LOCORE */ #endif /* !_MACHINE_SETJMP_H_ */ -- cgit v1.1