public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
* ia64: make jmp_buf declaration compiler-independent
@ 2003-03-28 13:05 David Mosberger
  0 siblings, 0 replies; only message in thread
From: David Mosberger @ 2003-03-28 13:05 UTC (permalink / raw)
  To: libc-hacker

The patch below changes the __jmp_buf declaration to be
compiler-independent by taking advantage of the fact that on ia64
platforms "long double" (pretty much) universally gives a 128-bit
aligned type (it doesn't matter whether it's a float80 or a float128,
as would be the case with the HP compiler).  The itanium software
conventions manual specifies a type of __float80, but GCC doesn't
support that.

(The very first version of gcc/ia64 (egcs, actually) didn't handle
"long double" correctly, but I seriously doubt anyone is still using
such an old compiler; if they do: high time to upgrade.)

I reran "make check" after the change and there were no new regressions.

	--david

Index: sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h,v
retrieving revision 1.2
diff -u -r1.2 setjmp.h
--- sysdeps/unix/sysv/linux/ia64/bits/setjmp.h	6 Jul 2001 04:56:17 -0000	1.2
+++ sysdeps/unix/sysv/linux/ia64/bits/setjmp.h	28 Mar 2003 02:41:07 -0000
@@ -24,10 +24,10 @@
 
 /* User code must not depend on the internal representation of jmp_buf. */
 
-#define _JBLEN	70
+#define _JBLEN	35
 
 /* the __jmp_buf element type should be __float80 per ABI... */
-typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
+typedef long double __jmp_buf[_JBLEN]; /* guarantees 128-bit alignment! */
 
 /* Test if longjmp to JMPBUF would unwind the frame containing a local
    variable at ADDRESS.  */

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-03-28  2:47 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-28 13:05 ia64: make jmp_buf declaration compiler-independent David Mosberger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).