[Vm-dev] [commit] r2436 - Fix linux Alien call-out crashes. Linux x86 must use standard 16-byte alignment

commits at squeakvm.org commits at squeakvm.org
Sun Jun 19 22:10:00 UTC 2011


Author: eliot
Date: 2011-06-19 15:10:00 -0700 (Sun, 19 Jun 2011)
New Revision: 2436

Modified:
   trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
   trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c
Log:
Fix linux Alien call-out crashes.  Linux x86 must use standard 16-byte alignment


Modified: trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h
===================================================================
--- trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h	2011-06-17 20:50:12 UTC (rev 2435)
+++ trunk/platforms/Cross/plugins/IA32ABI/dabusiness.h	2011-06-19 22:10:00 UTC (rev 2436)
@@ -45,11 +45,10 @@
 	argstart = argvec;
 #else
 	argvec = alloca(moduloPOT(sizeof(long),size));
-# if (defined(__MINGW32__) && (__GNUC__ >= 3)) || defined(__linux__)
+# if defined(__MINGW32__) && (__GNUC__ >= 3)
 	/*
 	 * cygwin & MinGW's gcc 3.4.x's alloca is a library routine that answers
 	 * %esp + 4, so the outgoing stack is offset by one word if uncorrected.
-	 * Apparently the same can be said for 4.x linux implementations.
 	 * Grab the actual stack pointer to correct.
 	 */
 	argvec = getsp();

Modified: trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c
===================================================================
--- trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c	2011-06-17 20:50:12 UTC (rev 2435)
+++ trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c	2011-06-19 22:10:00 UTC (rev 2436)
@@ -62,6 +62,8 @@
 #endif
 #if __APPLE__ && __MACH__ && __i386__
 # define STACK_ALIGN_BYTES 16
+#elif __linux__ && __i386__
+# define STACK_ALIGN_BYTES 16
 #endif
 
 #if !defined(setsp)



More information about the Vm-dev mailing list