[Vm-dev] [commit][3179] Add x86_64 support for Alien callbacks and hack Alien callouts.

commits at squeakvm.org commits at squeakvm.org
Sat Dec 13 01:05:57 UTC 2014


Revision: 3179
Author:   eliot
Date:     2014-12-12 17:05:57 -0800 (Fri, 12 Dec 2014)
Log Message:
-----------
Add x86_64 support for Alien callbacks and hack Alien callouts.

Modified Paths:
--------------
    trunk/platforms/Cross/plugins/IA32ABI/ia32abi.h
    trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c

Property Changed:
----------------
    trunk/platforms/Cross/plugins/sqPluginsSCCSVersion.h

Modified: trunk/platforms/Cross/plugins/IA32ABI/ia32abi.h
===================================================================
--- trunk/platforms/Cross/plugins/IA32ABI/ia32abi.h	2014-12-13 00:42:55 UTC (rev 3178)
+++ trunk/platforms/Cross/plugins/IA32ABI/ia32abi.h	2014-12-13 01:05:57 UTC (rev 3179)
@@ -33,7 +33,15 @@
 extern sqInt callIA32IntegralReturn(SIGNATURE);
 extern sqInt callIA32FloatReturn   (SIGNATURE);
 extern sqInt callIA32DoubleReturn  (SIGNATURE);
-extern long  thunkEntry            (void *thunkp, long *stackp);
+
+#if defined(i386) || defined(__i386) || defined(__i386__)
+# define INT_REG_ARGS /* none */
+#elif defined(__amd64__) || defined(__x86_64__) || defined(__amd64) || defined(__x86_64)
+# define INT_REG_ARGS long,long,long,long,long,long,
+#elif defined(__powerpc__) || defined(PPC) || defined(_POWER) || defined(_IBMR2) || defined(__ppc__)
+# define INT_REG_ARGS long,long,long,long,long,long,long,long,
+#endif
+extern long  thunkEntry (INT_REG_ARGS void *,long *);
 extern void *allocateExecutablePage(long *pagesize);
 extern VMCallbackContext *getMostRecentCallbackContext(void);
 

Modified: trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c
===================================================================
--- trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c	2014-12-13 00:42:55 UTC (rev 3178)
+++ trunk/platforms/Cross/plugins/IA32ABI/ia32abicc.c	2014-12-13 01:05:57 UTC (rev 3179)
@@ -49,7 +49,7 @@
 #endif
 #if __GNUC__
 # define setsp(sp) asm volatile ("movl %0,%%esp" : : "m"(sp))
-# define getsp() ({ void *esp; asm volatile ("movl %%esp,%0" : "=r"(esp) : ); esp;})
+# define getsp() ({ void *sp; asm volatile ("movl %%esp,%0" : "=r"(sp) : ); sp;})
 #endif
 #if __APPLE__ && __MACH__ && __i386__
 # define STACK_ALIGN_BYTES 16


Property changes on: trunk/platforms/Cross/plugins/sqPluginsSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Fri Dec 12 11:53:17 PST 2014
   + Fri Dec 12 17:06:09 PST 2014



More information about the Vm-dev mailing list