public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* x86 stack alignment redux
@ 1997-11-13  9:28 Dave Love
  1997-12-11 23:10 ` Jeffrey A Law
  0 siblings, 1 reply; 11+ messages in thread
From: Dave Love @ 1997-11-13  9:28 UTC (permalink / raw)
  To: egcs

It's a while since I tried to get something like this in for the
benefit of people doing double precision fortran calculations, at
least...

With this change, a glibc2-based system such as is now apparently
becoming usable, and -malign-double, g77 users running on GNUish
686-based boxes should no longer suffer an average 50% perfromance hit
because doubles on the stack only get word-aligned (or a smaller hit
on 586).  Previous discussion suggested it's a bug if STACK_BOUNDARY
doesn't agree with the initial stack pointer alignment and glibc2
ensures initial double alignment.

This really is important to serious scientific users with high-profile
projects of the sort I understand have just been slagging off g77/gcc
at a high-performance computing meeting here.

1997-11-13  Dave Love  <d.love@dl.ac.uk>

	* config/i386/linux.h (STACK_BOUNDARY): Define as 64 for glibc2.
	* config/i386/gnu.h (STACK_BOUNDARY): Define as 64.

*** config/i386/linux.h	1997/11/02 15:23:02	1.1
--- config/i386/linux.h	1997/11/13 16:45:40
***************
*** 37,42 ****
--- 37,48 ----
  #undef DEFAULT_PCC_STRUCT_RETURN
  #define DEFAULT_PCC_STRUCT_RETURN 1
  
+ #ifndef USE_GNULIBC_1
+ #undef STACK_BOUNDARY
+ #define STACK_BOUNDARY 64       /* glibc2's crt ensures this, libc5
+                                    only gives you 32 */
+ #endif
+ 
  /* This is how to output an element of a case-vector that is relative.
     This is only used for PIC code.  See comments by the `casesi' insn in
     i386.md for an explanation of the expression this outputs. */
*** config/i386/gnu.h	1997/11/13 16:46:29	1.1
--- config/i386/gnu.h	1997/11/13 16:47:18
***************
*** 3,8 ****
--- 3,11 ----
  /* This does it mostly for us.  */
  #include <i386/linux.h>
  
+ #undef STACK_BOUNDARY
+ #define STACK_BOUNDARY 64       /* glibc2's crt ensures this */
+ 
  #undef CPP_PREDEFINES
  #define CPP_PREDEFINES GNU_CPP_PREDEFINES("i386")
  

^ permalink raw reply	[flat|nested] 11+ messages in thread
* Re: x86 stack alignment redux
@ 1997-12-12 13:04 Mike Stump
  0 siblings, 0 replies; 11+ messages in thread
From: Mike Stump @ 1997-12-12 13:04 UTC (permalink / raw)
  To: egcs

> Date: Fri, 12 Dec 1997 16:59:55 +0100
> From: Marc Lehmann <pcg@goof.com>
> To: egcs@cygnus.com

> I sent the assignment to the fsf a month ago.. it shouldn't take
> months from germany to the us, so I suspect it got lost (Oh habe I
> good luck all the time).

> should I send it again?

They are up to 11-18 now, so chances are they haven't processed it
yet.  You can ask assign@gnu.ai.mit.edu (or is it at gnu.org now?) if
he has it in his next batch.  If he says yes, then no need to send in
a new one.  If he says no, then you should.

It just takes longer than one thinks it should...  It's real paper
after all!

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~1997-12-14 22:41 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-11-13  9:28 x86 stack alignment redux Dave Love
1997-12-11 23:10 ` Jeffrey A Law
1997-12-11 23:40   ` H.J. Lu
1997-12-12  0:18     ` Jeffrey A Law
1997-12-12  7:28       ` H.J. Lu
1997-12-12 10:18       ` Marc Lehmann
1997-12-12 13:04       ` Dave Love
1997-12-14 22:36         ` Jeffrey A Law
1997-12-12 13:04     ` Marc Lehmann
1997-12-14 22:41       ` Jeffrey A Law
1997-12-12 13:04 Mike Stump

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).