This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Stack alignment on x86-darwin


This is what was causing every C++ and execute testcase to fail on
i386-darwin9.

It is apparently not the cause of the libjava build failure during the
bootstrap.  I guess I need to keep debugging...

Bootstrapped (up to libjava) and tested on i386-darwin9, including
libstdc++.

-- 
- Geoffrey Keating <geoffk@apple.com>

===File ~/patches/gcc-i386-darwinstackalign.patch===========
2007-06-07  Geoffrey Keating  <geoffk@apple.com>

	* config/i386/darwin.h (STACK_BOUNDARY): Define.

Index: gcc/config/i386/darwin.h
===================================================================
--- gcc/config/i386/darwin.h	(revision 125538)
+++ gcc/config/i386/darwin.h	(working copy)
@@ -69,6 +69,12 @@
 #undef TARGET_KEEPS_VECTOR_ALIGNED_STACK
 #define TARGET_KEEPS_VECTOR_ALIGNED_STACK 1
 
+/* On Darwin, the stack is 128-bit aligned at the point of every call.
+   Failure to ensure this will lead to a crash in the system libraries
+   or dynamic loader.  */
+#undef STACK_BOUNDARY
+#define STACK_BOUNDARY 128
+
 /* We want -fPIC by default, unless we're using -static to compile for
    the kernel or some such.  */
 
============================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]