[Vm-dev] [commit][2955] CogVM source as per VMMaker.oscog-eem.766

commits at squeakvm.org commits at squeakvm.org
Sat Jun 7 22:16:54 UTC 2014


Revision: 2955
Author:   eliot
Date:     2014-06-07 15:16:52 -0700 (Sat, 07 Jun 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.766

Add convenience scripts to the build.linux32x86 buids to make all configs.

Remove some compilation warnings in cogit.c.

Correct some decls in genEnsureOopInRegNotForwarded:scratchReg:

Add a pushLinkReg arg to the core trampoline generation routines.  This is true
everywhere but in the nonLocalReturn and checkForInterrupts trampolines, which on
RISCs write the link reg, and on CISCs pop the ret pc to instructionPointer.

Remove the callJumpBar: parameter; this is always true.

Remember to save and restore the link register around the
call to ceCheckProfileTick in the primitive return machinery.

Streamline the genPrimReturnEnterCogCodeEnilopmart.
Streamline genExternalizePointersForPrimitiveCall

Modified Paths:
--------------
    branches/Cog/nscogsrc/vm/cogit.c
    branches/Cog/nscogsrc/vm/cogit.h
    branches/Cog/nscogsrc/vm/cogmethod.h
    branches/Cog/nsspursrc/vm/cogit.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogmethod.h
    branches/Cog/scripts/nukeversion
    branches/Cog/sistasrc/vm/cogit.c
    branches/Cog/sistasrc/vm/cogit.h
    branches/Cog/sistasrc/vm/cogmethod.h
    branches/Cog/sistasrc/vm/cointerp.c
    branches/Cog/sistasrc/vm/cointerp.h
    branches/Cog/sistasrc/vm/gcc3x-cointerp.c
    branches/Cog/sistasrc/vm/interp.h
    branches/Cog/sistasrc/vm/vmCallback.h
    branches/Cog/spursistasrc/vm/cogit.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cogmethod.h
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/interp.h
    branches/Cog/spursistasrc/vm/vmCallback.h
    branches/Cog/spursrc/vm/cogit.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogmethod.h
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/interp.h
    branches/Cog/spursrc/vm/vmCallback.h
    branches/Cog/src/vm/cogit.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogmethod.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerpmt.c

Added Paths:
-----------
    branches/Cog/build.linux32x86/newspeak.cog.spur/makeallclean
    branches/Cog/build.linux32x86/newspeak.cog.spur/makealldirty
    branches/Cog/build.linux32x86/newspeak.cog.v3/makeallclean
    branches/Cog/build.linux32x86/newspeak.cog.v3/makealldirty
    branches/Cog/build.linux32x86/newspeak.sista.spur/makeallclean
    branches/Cog/build.linux32x86/newspeak.sista.spur/makealldirty
    branches/Cog/build.linux32x86/newspeak.sista.v3/makeallclean
    branches/Cog/build.linux32x86/newspeak.sista.v3/makealldirty
    branches/Cog/build.linux32x86/newspeak.stack.spur/makeallclean
    branches/Cog/build.linux32x86/newspeak.stack.spur/makealldirty
    branches/Cog/build.linux32x86/newspeak.stack.v3/makeallclean
    branches/Cog/build.linux32x86/newspeak.stack.v3/makealldirty
    branches/Cog/build.linux32x86/squeak.cog.spur/makeallclean
    branches/Cog/build.linux32x86/squeak.cog.spur/makealldirty
    branches/Cog/build.linux32x86/squeak.cog.v3/makeallclean
    branches/Cog/build.linux32x86/squeak.cog.v3/makealldirty
    branches/Cog/build.linux32x86/squeak.sista.spur/makeallclean
    branches/Cog/build.linux32x86/squeak.sista.spur/makealldirty
    branches/Cog/build.linux32x86/squeak.sista.v3/makeallclean
    branches/Cog/build.linux32x86/squeak.sista.v3/makealldirty
    branches/Cog/build.linux32x86/squeak.stack.spur/makeallclean
    branches/Cog/build.linux32x86/squeak.stack.spur/makealldirty
    branches/Cog/build.linux32x86/squeak.stack.v3/makeallclean
    branches/Cog/build.linux32x86/squeak.stack.v3/makealldirty
    branches/Cog/build.linux32x86/third-party/makeallclean
    branches/Cog/build.linux32x86/third-party/makealldirty

Property Changed:
----------------
    branches/Cog/platforms/Cross/vm/sqSCCSVersion.h

Added: branches/Cog/build.linux32x86/newspeak.cog.spur/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.cog.spur/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.cog.spur/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.spur/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.cog.spur/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.cog.spur/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.cog.v3/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.cog.v3/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.cog.v3/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/newspeak.cog.v3/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.cog.v3/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.cog.v3/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.sista.spur/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.sista.spur/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.sista.spur/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.spur/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.sista.spur/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.sista.spur/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.sista.v3/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.sista.v3/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.sista.v3/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/newspeak.sista.v3/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.sista.v3/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.sista.v3/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.stack.spur/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.spur/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.stack.spur/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.stack.spur/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.stack.spur/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.spur/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.stack.spur/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.stack.spur/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.stack.v3/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.v3/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.stack.v3/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.stack.v3/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/newspeak.stack.v3/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/newspeak.stack.v3/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/newspeak.stack.v3/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/newspeak.stack.v3/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.cog.spur/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/squeak.cog.spur/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.cog.spur/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.cog.spur/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.cog.spur/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/squeak.cog.spur/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.cog.spur/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.cog.spur/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.cog.v3/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/squeak.cog.v3/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.cog.v3/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.cog.v3/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.cog.v3/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/squeak.cog.v3/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.cog.v3/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.cog.v3/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.sista.spur/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/squeak.sista.spur/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.sista.spur/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.sista.spur/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.sista.spur/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/squeak.sista.spur/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.sista.spur/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.sista.spur/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.sista.v3/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/squeak.sista.v3/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.sista.v3/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.sista.v3/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.sista.v3/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/squeak.sista.v3/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.sista.v3/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.sista.v3/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.stack.spur/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/squeak.stack.spur/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.stack.spur/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.stack.spur/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.stack.spur/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/squeak.stack.spur/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.stack.spur/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.stack.spur/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.stack.v3/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/squeak.stack.v3/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.stack.v3/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.stack.v3/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/squeak.stack.v3/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/squeak.stack.v3/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/squeak.stack.v3/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/squeak.stack.v3/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/third-party/makeallclean
===================================================================
--- branches/Cog/build.linux32x86/third-party/makeallclean	                        (rev 0)
+++ branches/Cog/build.linux32x86/third-party/makeallclean	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo y | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/third-party/makeallclean
___________________________________________________________________
Added: svn:executable
   + *

Added: branches/Cog/build.linux32x86/third-party/makealldirty
===================================================================
--- branches/Cog/build.linux32x86/third-party/makealldirty	                        (rev 0)
+++ branches/Cog/build.linux32x86/third-party/makealldirty	2014-06-07 22:16:52 UTC (rev 2955)
@@ -0,0 +1,5 @@
+#!/bin/sh
+for d in `dirname $0`/build*; do
+	(cd $d
+	 echo n | ./mvm)
+done


Property changes on: branches/Cog/build.linux32x86/third-party/makealldirty
___________________________________________________________________
Added: svn:executable
   + *

Modified: branches/Cog/nscogsrc/vm/cogit.c
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.c	2014-06-07 00:00:09 UTC (rev 2954)
+++ branches/Cog/nscogsrc/vm/cogit.c	2014-06-07 22:16:52 UTC (rev 2955)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8
+	CCodeGenerator VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8
+	StackToRegisterMappingCogit VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -464,7 +464,7 @@
 static void compileOpenPICnumArgs(sqInt selector, sqInt numArgs) NoDbgRegParms;
 static sqInt compilePICProlog(sqInt numArgs) NoDbgRegParms;
 static sqInt compilePrimitive(void);
-static void compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(void *aRoutine, sqInt callJumpBar, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt resultRegOrNil) NoDbgRegParms;
+static void compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil) NoDbgRegParms;
 static void computeEntryOffsets(void);
 static sqInt computeJumpTargetOffsetPlus(AbstractInstruction * self_in_computeJumpTargetOffsetPlus, sqInt anPCOffset) NoDbgRegParms;
 static sqInt computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) NoDbgRegParms;
@@ -846,7 +846,7 @@
 static sqInt genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg) NoDbgRegParms;
 static sqInt genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg) NoDbgRegParms;
 static sqInt genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg) NoDbgRegParms;
-static sqInt genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt callJumpBar, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt resultRegOrNil, sqInt appendBoolean) NoDbgRegParms;
+static sqInt genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil, sqInt appendBoolean) NoDbgRegParms;
 static sqInt genUpArrowReturn(void);
 static AbstractInstruction * genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister) NoDbgRegParms;
 static AbstractInstruction * gen(sqInt opcode) NoDbgRegParms;
@@ -1731,7 +1731,7 @@
 static sqInt inBlock;
 static sqInt initialPC;
 static AbstractInstruction * interpretCall;
-static sqInt interpretLabel;
+static AbstractInstruction * interpretLabel;
 static int labelCounter;
 static sqInt lastSend;
 static usqInt limitAddress;
@@ -5260,7 +5260,6 @@
 }
 
 
-/*	<Boolean> */
 /*	Generate a trampoline with up to four arguments. Generate either a call or
 	a jump to aRoutine
 	as requested by callJumpBar. If generating a call and resultRegOrNil is
@@ -5268,21 +5267,22 @@
 	back in resultRegOrNil.
 	Hack: a negative value indicates an abstract register, a non-negative
 	value indicates a constant. */
-/*	If on a RISC processor the return address needs to be pushed to the
+/*	If on a RISC processor, the return address needs to be pushed to the
 	stack so that the interpreter sees the same stack layout as on CISC. */
 
 static void
-compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(void *aRoutine, sqInt callJumpBar, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt resultRegOrNil)
+compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil)
 {
-	;
+	if (pushLinkReg
+	 && (hasLinkRegister(backEnd))) {
+		/* begin PushR: */
+		genoperand(PushR, LinkReg);
+	}
 	genSmalltalkToCStackSwitch();
 	if (cStackAlignment > BytesPerWord) {
 		genAlignCStackSavingRegistersnumArgswordAlignment(backEnd, saveRegs, numArgs, ((sqInt) cStackAlignment >> 2));
 	}
 	if (saveRegs) {
-		if (!callJumpBar) {
-			error("why save registers when you're not going to return?");
-		}
 		genSaveRegisters(backEnd);
 	}
 	if (numArgs > 0) {
@@ -5317,29 +5317,26 @@
 			genPassConstasArgument(backEnd, regOrConst0, 0);
 		}
 	}
-	genoperand((callJumpBar
-		? Call
-		: Jump), ((usqInt)aRoutine));
-	if (callJumpBar) {
-		if (!(resultRegOrNil == null)) {
-			genWriteCResultIntoReg(backEnd, resultRegOrNil);
+	/* begin Call: */
+	genoperand(Call, ((usqInt)aRoutine));
+	if (!(resultRegOrNil == null)) {
+		genWriteCResultIntoReg(backEnd, resultRegOrNil);
+	}
+	if (saveRegs) {
+		if (numArgs > 0) {
+			genRemoveNArgsFromStack(backEnd, numArgs);
 		}
-		if (saveRegs) {
-			if (numArgs > 0) {
-				genRemoveNArgsFromStack(backEnd, numArgs);
-			}
-			if (resultRegOrNil == null) {
-				genRestoreRegs(backEnd);
-			}
-			else {
-				genRestoreRegsExcept(backEnd, resultRegOrNil);
-			}
+		if (resultRegOrNil == null) {
+			genRestoreRegs(backEnd);
 		}
-		genLoadStackPointers(backEnd);
-		
-		/* begin RetN: */
-		genoperand(RetN, 0);
+		else {
+			genRestoreRegsExcept(backEnd, resultRegOrNil);
+		}
 	}
+	genLoadStackPointers(backEnd);
+	
+	/* begin RetN: */
+	genoperand(RetN, 0);
 }
 
 
@@ -10861,7 +10858,7 @@
 	/* begin RetN: */
 	genoperand(RetN, 0);
 	jmpTarget(jumpSingle, gLabel());
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceActiveContext, "ceActiveContextTrampoline", 1, 0, null, null, null, null, 0, ReceiverResultReg, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceActiveContext, "ceActiveContextTrampoline", 0, null, null, null, null, 0, 1, ReceiverResultReg, 1);
 }
 
 static sqInt
@@ -10947,7 +10944,7 @@
 	address1 = instructionPointerAddress();
 	genoperandoperand(MoveRAw, TempReg, address1);
 
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceCheckForInterrupts, "ceCheckForInterruptsTrampoline", 1, 0, null, null, null, null, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCheckForInterrupts, "ceCheckForInterruptsTrampoline", 0, null, null, null, null, 0, 0, null, 1);
 }
 
 static sqInt
@@ -11462,23 +11459,21 @@
     sqInt address1;
     sqInt address2;
     sqInt address3;
+    sqInt address4;
 
 	genPushRegisterArgs();
-	/* begin MoveMw:r:R: */
-	genoperandoperandoperand(MoveMwrR, 0, SPReg, ClassReg);
-
 	/* begin MoveR:Aw: */
-	address2 = framePointerAddress();
-	genoperandoperand(MoveRAw, FPReg, address2);
-	/* begin LoadEffectiveAddressMw:r:R: */
-	genoperandoperandoperand(LoadEffectiveAddressMwrR, BytesPerWord, SPReg, TempReg);
+	address4 = framePointerAddress();
+	genoperandoperand(MoveRAw, FPReg, address4);
+	/* begin PopR: */
+	genoperand(PopR, TempReg);
 	/* begin MoveR:Aw: */
-	address1 = instructionPointerAddress();
-	genoperandoperand(MoveRAw, ClassReg, address1);
-
+	address2 = instructionPointerAddress();
+	genoperandoperand(MoveRAw, TempReg, address2);
 	/* begin MoveR:Aw: */
 	address3 = stackPointerAddress();
-	genoperandoperand(MoveRAw, TempReg, address3);
+	genoperandoperand(MoveRAw, SPReg, address3);
+
 	return 0;
 }
 
@@ -12287,7 +12282,7 @@
 	genoperandoperand(MoveRR, ClassReg, ReceiverResultReg);
 	jmpTarget(jumpItsTheReceiverStupid, gRetN(0));
 	jmpTarget(jumpMiss, gLabel());
-	ceImplicitReceiverTrampoline = genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceImplicitReceiverForreceiverclass, "ceImplicitReceiverTrampoline", 1, 3, SendNumArgsReg, ReceiverResultReg, ClassReg, null, 0, ReceiverResultReg, 1);
+	ceImplicitReceiverTrampoline = genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceImplicitReceiverForreceiverclass, "ceImplicitReceiverTrampoline", 3, SendNumArgsReg, ReceiverResultReg, ClassReg, null, 0, 1, ReceiverResultReg, 1);
 }
 
 static void
@@ -12851,9 +12846,9 @@
 	genoperandoperand(CmpCqR, 0, ClassReg);
 	/* begin JumpZero: */
 	jumpMNUCase = genoperand(JumpZero, ((sqInt)0));
-	compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(ceInterpretMethodFromPICreceiver, 1, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, null);
+	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceInterpretMethodFromPICreceiver, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, 1, null);
 	jmpTarget(jumpMNUCase, gLabel());
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceMNUFromPICMNUMethodreceiver, name, 1, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceMNUFromPICMNUMethodreceiver, name, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 }
 
 
@@ -13799,12 +13794,12 @@
 	/* begin JumpNonZero: */
 	jumpSICMiss = genoperand(JumpNonZero, ((sqInt)0));
 	
-	compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(ceStackOverflow, 1, 1, SendNumArgsReg, null, null, null, 0, null);
+	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0, 1, null);
 	jmpTarget(jumpSICMiss, gLabel());
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 1
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 1
 		? numArgs
-		: -1)), 1, 1, ReceiverResultReg, null, null, null, 0, null, 1);
+		: -1)), 1, ReceiverResultReg, null, null, null, 0, 1, null, 1);
 }
 
 static AbstractInstruction *
@@ -13824,7 +13819,7 @@
 	assert(!(shouldAnnotateObjectReference(boolean)));
 	/* begin AddCq:R: */
 	genoperandoperand(AddCqR, boolean, TempReg);
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceSendMustBeBoolean, trampolineName, 1, 1, TempReg, null, null, null, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSendMustBeBoolean, trampolineName, 1, TempReg, null, null, null, 0, 1, null, 1);
 }
 
 
@@ -13847,6 +13842,11 @@
     sqInt address;
     sqInt address1;
 
+
+	/* write the return address to the coInterpreter instructionPointerAddress;
+	   CISCs will have pushed it on the stack, so pop it first; RISCs will have it in
+	   their link register so just write it directly. */
+
 	opcodeIndex = 0;
 	/* begin PopR: */
 	genoperand(PopR, TempReg);
@@ -13854,7 +13854,7 @@
 	address1 = instructionPointerAddress();
 	genoperandoperand(MoveRAw, TempReg, address1);
 
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceNonLocalReturn, "ceNonLocalReturnTrampoline", 1, 1, ReceiverResultReg, null, null, null, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceNonLocalReturn, "ceNonLocalReturnTrampoline", 1, ReceiverResultReg, null, null, null, 0, 0, null, 1);
 }
 
 static sqInt
@@ -13903,9 +13903,9 @@
 
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgs(backEnd, numArgs);
-	genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumArgs("cePICMiss", (numArgs <= 1
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCPICMissreceiver, trampolineNamenumArgs("cePICMiss", (numArgs <= 1
 		? numArgs
-		: -1)), 1, 2, ClassReg, ReceiverResultReg, null, null, 0, null, 1);
+		: -1)), 2, ClassReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 	return startAddress;
 }
 
@@ -14760,6 +14760,7 @@
     sqInt address3;
     sqInt address4;
     sqInt address5;
+    sqInt address6;
     AbstractInstruction *continuePostSample;
     AbstractInstruction *jmpFail;
     AbstractInstruction *jmpSample;
@@ -14785,8 +14786,8 @@
 		continuePostSample = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
 	}
 	/* begin MoveAw:R: */
-	address3 = primFailCodeAddress();
-	genoperandoperand(MoveAwR, address3, TempReg);
+	address5 = primFailCodeAddress();
+	genoperandoperand(MoveAwR, address5, TempReg);
 	flag("ask concrete code gen if move sets condition codes?");
 	/* begin CmpCq:R: */
 	genoperandoperand(CmpCqR, 0, TempReg);
@@ -14796,17 +14797,17 @@
 	address4 = instructionPointerAddress();
 	genoperandoperand(MoveAwR, address4, ClassReg);
 	genLoadStackPointers(backEnd);
-	/* begin PushR: */
-	genoperand(PushR, ClassReg);
 	/* begin MoveMw:r:R: */
-	genoperandoperandoperand(MoveMwrR, BytesPerWord, SPReg, ReceiverResultReg);
-	flag("currently caller pushes result");
+	genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
+	/* begin MoveR:Mw:r: */
+	genoperandoperandoperand(MoveRMwr, ClassReg, 0, SPReg);
 	/* begin RetN: */
-	genoperand(RetN, BytesPerWord);
+	genoperand(RetN, 0);
+
 	jmpTarget(jmpFail, gMoveAwR(newMethodAddress(), SendNumArgsReg));
 	/* begin MoveAw:R: */
-	address5 = cStackPointerAddress();
-	genoperandoperand(MoveAwR, address5, SPReg);
+	address6 = cStackPointerAddress();
+	genoperandoperand(MoveAwR, address6, SPReg);
 	if (cStackAlignment > BytesPerWord) {
 		genAlignCStackSavingRegistersnumArgswordAlignment(backEnd, 0, 1, ((sqInt) cStackAlignment >> 2));
 	}
@@ -14814,11 +14815,13 @@
 	CallRT((unsigned long)ceActivateFailingPrimitiveMethod);
 	if (profiling) {
 
-		/* Call ceCheckProfileTick: to record sample and then continue.
-		   newMethod should be up-to-date. */
+		/* Call ceCheckProfileTick: to record sample and then continue.  newMethod
+		   should be up-to-date.  Need to save and restore the link reg around this call. */
 
 		jmpTarget(jmpSample, gLabel());
+		
 		CallRT((unsigned long)ceCheckProfileTick);
+		
 		/* begin Jump: */
 		genoperand(Jump, ((sqInt)continuePostSample));
 	}
@@ -15446,7 +15449,7 @@
 static sqInt
 genSafeTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0)
 {
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 1, regOrConst0, null, null, null, 1, null, 0);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 1, regOrConst0, null, null, null, 1, 1, null, 0);
 }
 
 
@@ -15456,7 +15459,7 @@
 static sqInt
 genSafeTrampolineForcalledargarg(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1)
 {
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 2, regOrConst0, regOrConst1, null, null, 1, null, 0);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 2, regOrConst0, regOrConst1, null, null, 1, 1, null, 0);
 }
 
 
@@ -15605,7 +15608,7 @@
 	startAddress = methodZoneBase;
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgs(backEnd, numArgs);
-	genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 3, regOrConst0, regOrConst1, regOrConst2, null, 0, null, 1);
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 3, regOrConst0, regOrConst1, regOrConst2, null, 0, 1, null, 1);
 	return startAddress;
 }
 
@@ -15622,7 +15625,7 @@
 	startAddress = methodZoneBase;
 	opcodeIndex = 0;
 	genPushRegisterArgsForNumArgs(backEnd, numArgs);
-	genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 4, regOrConst0, regOrConst1, regOrConst2, regOrConst3, 0, null, 1);
+	genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 4, regOrConst0, regOrConst1, regOrConst2, regOrConst3, 0, 1, null, 1);
 	return startAddress;
 }
 
@@ -16512,7 +16515,7 @@
 static sqInt
 genTrampolineForcalled(void *aRoutine, char *aString)
 {
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 0, null, null, null, null, 0, null, 0);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 0, null, null, null, null, 0, 1, null, 0);
 }
 
 
@@ -16523,7 +16526,7 @@
 static sqInt
 genTrampolineForcalledarg(void *aRoutine, char *aString, sqInt regOrConst0)
 {
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 1, regOrConst0, null, null, null, 0, null, 0);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 1, regOrConst0, null, null, null, 0, 1, null, 0);
 }
 
 
@@ -16534,7 +16537,7 @@
 static sqInt
 genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg)
 {
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 3, regOrConst0, regOrConst1, regOrConst2, null, 0, resultReg, 0);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 3, regOrConst0, regOrConst1, regOrConst2, null, 0, 1, resultReg, 0);
 }
 
 
@@ -16545,7 +16548,7 @@
 static sqInt
 genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg)
 {
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 2, regOrConst0, regOrConst1, null, null, 0, resultReg, 0);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 2, regOrConst0, regOrConst1, null, null, 0, 1, resultReg, 0);
 }
 
 
@@ -16556,11 +16559,10 @@
 static sqInt
 genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg)
 {
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(aRoutine, aString, 1, 1, regOrConst0, null, null, null, 0, resultReg, 0);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(aRoutine, aString, 1, regOrConst0, null, null, null, 0, 1, resultReg, 0);
 }
 
 
-/*	<Boolean> */
 /*	Generate a trampoline with up to four arguments. Generate either a call or
 	a jump to aRoutineOrNil
 	as requested by callJumpBar. If generating a call and resultRegOrNil is
@@ -16570,7 +16572,7 @@
 	value indicates a constant. */
 
 static sqInt
-genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt callJumpBar, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt resultRegOrNil, sqInt appendBoolean)
+genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil, sqInt appendBoolean)
 {
     sqInt startAddress;
 
@@ -16578,7 +16580,7 @@
 	if (!appendBoolean) {
 		opcodeIndex = 0;
 	}
-	compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(aRoutine, callJumpBar, numArgs, regOrConst0, regOrConst1, regOrConst2, regOrConst3, saveRegs, resultRegOrNil);
+	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(aRoutine, numArgs, regOrConst0, regOrConst1, regOrConst2, regOrConst3, saveRegs, pushLinkReg, resultRegOrNil);
 	outputInstructionsForGeneratedRuntimeAt(startAddress);
 	recordGeneratedRunTimeaddress(trampolineName, startAddress);
 	recordRunTimeObjectReferences();
@@ -19952,7 +19954,7 @@
 	for (i = 0; i < trampolineTableIndex; i += 2) {
 		printHex(((sqInt)(trampolineAddresses[i + 1])));
 		print(": ");
-		print(trampolineAddresses[i]);
+		print(((char *) (trampolineAddresses[i])));
 		cr();
 	}
 }
@@ -20196,7 +20198,7 @@
 		 && ((cogMethod->cmRefersToYoung))) {
 			assert(source < (dest - BytesPerWord));
 			if (((cogMethod->objectHeader)) != 0) {
-				cogMethod = ((CogMethod *) ((((sqInt)cogMethod)) + ((cogMethod->objectHeader))));
+				cogMethod = ((CogMethod *) ((((sqInt)cogMethod)) + (((sqInt)((cogMethod->objectHeader))))));
 			}
 			longAtput((dest -= BytesPerWord), ((sqInt)cogMethod));
 		}

Modified: branches/Cog/nscogsrc/vm/cogit.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogit.h	2014-06-07 00:00:09 UTC (rev 2954)
+++ branches/Cog/nscogsrc/vm/cogit.h	2014-06-07 22:16:52 UTC (rev 2955)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8
+	CCodeGenerator VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340
  */
 
 

Modified: branches/Cog/nscogsrc/vm/cogmethod.h
===================================================================
--- branches/Cog/nscogsrc/vm/cogmethod.h	2014-06-07 00:00:09 UTC (rev 2954)
+++ branches/Cog/nscogsrc/vm/cogmethod.h	2014-06-07 22:16:52 UTC (rev 2955)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8
+	CCodeGenerator VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340
  */
 
 typedef struct {

Modified: branches/Cog/nsspursrc/vm/cogit.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.c	2014-06-07 00:00:09 UTC (rev 2954)
+++ branches/Cog/nsspursrc/vm/cogit.c	2014-06-07 22:16:52 UTC (rev 2955)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8
+	CCodeGenerator VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8
+	StackToRegisterMappingCogit VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.759 uuid: 988e84e2-8576-4edb-984a-98c755c8e2e8 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.766 uuid: 3045c341-cfbf-494c-a7b1-fb29c26a7340 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -457,7 +457,7 @@
 static void compileOpenPICnumArgs(sqInt selector, sqInt numArgs) NoDbgRegParms;
 static sqInt compilePICProlog(sqInt numArgs) NoDbgRegParms;
 static sqInt compilePrimitive(void);
-static void compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(void *aRoutine, sqInt callJumpBar, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt resultRegOrNil) NoDbgRegParms;
+static void compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil) NoDbgRegParms;
 static void computeEntryOffsets(void);
 static sqInt computeJumpTargetOffsetPlus(AbstractInstruction * self_in_computeJumpTargetOffsetPlus, sqInt anPCOffset) NoDbgRegParms;
 static sqInt computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize) NoDbgRegParms;
@@ -582,7 +582,7 @@
 static void freeOlderMethodsForCompaction(void);
 static void freePICsWithFreedTargets(void);
 void freeUnmarkedMachineCode(void);
-static sqInt genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, sqInt aString) NoDbgRegParms;
+static sqInt genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString) NoDbgRegParms;
 static sqInt genAddSmallIntegerTagsTo(sqInt aRegister) NoDbgRegParms;
 static sqInt genAlignCStackSavingRegistersnumArgswordAlignment(AbstractInstruction * self_in_genAlignCStackSavingRegistersnumArgswordAlignment, sqInt saveRegs, sqInt numArgs, sqInt alignment) NoDbgRegParms;
 static AbstractInstruction * genAllocFloatValueintoscratchRegscratchReg(sqInt dpreg, sqInt resultReg, sqInt scratch1, sqInt scratch2) NoDbgRegParms;
@@ -855,7 +855,7 @@
 static sqInt genTrampolineForcalledargargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt resultReg) NoDbgRegParms;
 static sqInt genTrampolineForcalledargargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt regOrConst1, sqInt resultReg) NoDbgRegParms;
 static sqInt genTrampolineForcalledargresult(void *aRoutine, char *aString, sqInt regOrConst0, sqInt resultReg) NoDbgRegParms;
-static sqInt genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt callJumpBar, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt resultRegOrNil, sqInt appendBoolean) NoDbgRegParms;
+static sqInt genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(void *aRoutine, char *trampolineName, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil, sqInt appendBoolean) NoDbgRegParms;
 static sqInt genUpArrowReturn(void);
 static AbstractInstruction * genWriteCResultIntoReg(AbstractInstruction * self_in_genWriteCResultIntoReg, sqInt abstractRegister) NoDbgRegParms;
 static AbstractInstruction * gen(sqInt opcode) NoDbgRegParms;
@@ -1740,7 +1740,7 @@
 static sqInt inBlock;
 static sqInt initialPC;
 static AbstractInstruction * interpretCall;
-static sqInt interpretLabel;
+static AbstractInstruction * interpretLabel;
 static int labelCounter;
 static sqInt lastSend;
 static usqInt limitAddress;
@@ -5200,7 +5200,6 @@
 }
 
 
-/*	<Boolean> */
 /*	Generate a trampoline with up to four arguments. Generate either a call or
 	a jump to aRoutine
 	as requested by callJumpBar. If generating a call and resultRegOrNil is
@@ -5208,21 +5207,22 @@
 	back in resultRegOrNil.
 	Hack: a negative value indicates an abstract register, a non-negative
 	value indicates a constant. */
-/*	If on a RISC processor the return address needs to be pushed to the
+/*	If on a RISC processor, the return address needs to be pushed to the
 	stack so that the interpreter sees the same stack layout as on CISC. */
 
 static void
-compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(void *aRoutine, sqInt callJumpBar, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt resultRegOrNil)
+compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt saveRegs, sqInt pushLinkReg, sqInt resultRegOrNil)
 {
-	;
+	if (pushLinkReg
+	 && (hasLinkRegister(backEnd))) {
+		/* begin PushR: */
+		genoperand(PushR, LinkReg);
+	}
 	genSmalltalkToCStackSwitch();
 	if (cStackAlignment > BytesPerWord) {
 		genAlignCStackSavingRegistersnumArgswordAlignment(backEnd, saveRegs, numArgs, ((sqInt) cStackAlignment >> 2));
 	}
 	if (saveRegs) {
-		if (!callJumpBar) {
-			error("why save registers when you're not going to return?");
-		}
 		genSaveRegisters(backEnd);
 	}
 	if (numArgs > 0) {
@@ -5257,29 +5257,26 @@
 			genPassConstasArgument(backEnd, regOrConst0, 0);
 		}
 	}
-	genoperand((callJumpBar
-		? Call
-		: Jump), ((usqInt)aRoutine));
-	if (callJumpBar) {
-		if (!(resultRegOrNil == null)) {
-			genWriteCResultIntoReg(backEnd, resultRegOrNil);
+	/* begin Call: */
+	genoperand(Call, ((usqInt)aRoutine));
+	if (!(resultRegOrNil == null)) {
+		genWriteCResultIntoReg(backEnd, resultRegOrNil);
+	}
+	if (saveRegs) {
+		if (numArgs > 0) {
+			genRemoveNArgsFromStack(backEnd, numArgs);
 		}
-		if (saveRegs) {
-			if (numArgs > 0) {
-				genRemoveNArgsFromStack(backEnd, numArgs);
-			}
-			if (resultRegOrNil == null) {
-				genRestoreRegs(backEnd);
-			}
-			else {
-				genRestoreRegsExcept(backEnd, resultRegOrNil);
-			}
+		if (resultRegOrNil == null) {
+			genRestoreRegs(backEnd);
 		}
-		genLoadStackPointers(backEnd);
-		
-		/* begin RetN: */
-		genoperand(RetN, 0);
+		else {
+			genRestoreRegsExcept(backEnd, resultRegOrNil);
+		}
 	}
+	genLoadStackPointers(backEnd);
+	
+	/* begin RetN: */
+	genoperand(RetN, 0);
 }
 
 
@@ -10898,7 +10895,7 @@
 	Assume numArgs is in SendNumArgsReg and ClassReg is free. */
 
 static sqInt
-genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, sqInt aString)
+genActiveContextTrampolineLargeinBlockcalled(sqInt isLarge, sqInt isInBlock, char *aString)
 {
     sqInt startAddress;
 
@@ -10996,7 +10993,7 @@
 	address1 = instructionPointerAddress();
 	genoperandoperand(MoveRAw, TempReg, address1);
 
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceCheckForInterrupts, "ceCheckForInterruptsTrampoline", 1, 0, null, null, null, null, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceCheckForInterrupts, "ceCheckForInterruptsTrampoline", 0, null, null, null, null, 0, 0, null, 1);
 }
 
 static sqInt
@@ -11516,8 +11513,8 @@
 genEnsureOopInRegNotForwardedscratchReg(sqInt reg, sqInt scratch)
 {
     AbstractInstruction *loop;
-    AbstractInstruction * okImm;
-    AbstractInstruction * okObj;
+    AbstractInstruction *okImm;
+    AbstractInstruction *okObj;
     sqInt quickConstant;
 
 	assert(reg != scratch);
@@ -11617,23 +11614,21 @@
     sqInt address1;
     sqInt address2;
     sqInt address3;
+    sqInt address4;
 
 	genPushRegisterArgs();
-	/* begin MoveMw:r:R: */
-	genoperandoperandoperand(MoveMwrR, 0, SPReg, ClassReg);
-
 	/* begin MoveR:Aw: */
-	address2 = framePointerAddress();
-	genoperandoperand(MoveRAw, FPReg, address2);
-	/* begin LoadEffectiveAddressMw:r:R: */
-	genoperandoperandoperand(LoadEffectiveAddressMwrR, BytesPerWord, SPReg, TempReg);
+	address4 = framePointerAddress();
+	genoperandoperand(MoveRAw, FPReg, address4);
+	/* begin PopR: */
+	genoperand(PopR, TempReg);
 	/* begin MoveR:Aw: */
-	address1 = instructionPointerAddress();
-	genoperandoperand(MoveRAw, ClassReg, address1);
-
+	address2 = instructionPointerAddress();
+	genoperandoperand(MoveRAw, TempReg, address2);
 	/* begin MoveR:Aw: */
 	address3 = stackPointerAddress();
-	genoperandoperand(MoveRAw, TempReg, address3);
+	genoperandoperand(MoveRAw, SPReg, address3);
+
 	return 0;
 }
 
@@ -12453,7 +12448,7 @@
 	genoperandoperand(MoveRR, ClassReg, ReceiverResultReg);
 	jmpTarget(jumpItsTheReceiverStupid, gRetN(0));
 	jmpTarget(jumpMiss, gLabel());
-	ceImplicitReceiverTrampoline = genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceImplicitReceiverForreceiverclass, "ceImplicitReceiverTrampoline", 1, 3, SendNumArgsReg, ReceiverResultReg, ClassReg, null, 0, ReceiverResultReg, 1);
+	ceImplicitReceiverTrampoline = genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceImplicitReceiverForreceiverclass, "ceImplicitReceiverTrampoline", 3, SendNumArgsReg, ReceiverResultReg, ClassReg, null, 0, 1, ReceiverResultReg, 1);
 }
 
 static void
@@ -13251,9 +13246,9 @@
 	genoperandoperand(CmpCqR, 0, ClassReg);
 	/* begin JumpZero: */
 	jumpMNUCase = genoperand(JumpZero, ((sqInt)0));
-	compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(ceInterpretMethodFromPICreceiver, 1, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, null);
+	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceInterpretMethodFromPICreceiver, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, 1, null);
 	jmpTarget(jumpMNUCase, gLabel());
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceMNUFromPICMNUMethodreceiver, name, 1, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceMNUFromPICMNUMethodreceiver, name, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, 1, null, 1);
 }
 
 static sqInt
@@ -15328,12 +15323,12 @@
 	/* begin JumpNonZero: */
 	jumpSICMiss = genoperand(JumpNonZero, ((sqInt)0));
 	
-	compileTrampolineForcallJumpBarnumArgsargargargargsaveRegsresultReg(ceStackOverflow, 1, 1, SendNumArgsReg, null, null, null, 0, null);
+	compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceStackOverflow, 1, SendNumArgsReg, null, null, null, 0, 1, null);
 	jmpTarget(jumpSICMiss, gLabel());
 	genPushRegisterArgsForAbortMissNumArgs(backEnd, numArgs);
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 2
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSICMiss, trampolineNamenumArgs("ceMethodAbort", (numArgs <= 2
 		? numArgs
-		: -1)), 1, 1, ReceiverResultReg, null, null, null, 0, null, 1);
+		: -1)), 1, ReceiverResultReg, null, null, null, 0, 1, null, 1);
 }
 
 static AbstractInstruction *
@@ -15353,7 +15348,7 @@
 	assert(!(shouldAnnotateObjectReference(boolean)));
 	/* begin AddCq:R: */
 	genoperandoperand(AddCqR, boolean, TempReg);
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceSendMustBeBoolean, trampolineName, 1, 1, TempReg, null, null, null, 0, null, 1);
+	return genTrampolineForcallednumArgsargargargargsaveRegspushLinkRegresultRegappendOpcodes(ceSendMustBeBoolean, trampolineName, 1, TempReg, null, null, null, 0, 1, null, 1);
 }
 
 
@@ -15422,6 +15417,11 @@
     sqInt address;
     sqInt address1;
 
+
+	/* write the return address to the coInterpreter instructionPointerAddress;
+	   CISCs will have pushed it on the stack, so pop it first; RISCs will have it in
+	   their link register so just write it directly. */
+
 	opcodeIndex = 0;
 	/* begin PopR: */
 	genoperand(PopR, TempReg);
@@ -15429,7 +15429,7 @@
 	address1 = instructionPointerAddress();
 	genoperandoperand(MoveRAw, TempReg, address1);
 
-	return genTrampolineForcalledcallJumpBarnumArgsargargargargsaveRegsresultRegappendOpcodes(ceNonLocalReturn, "ceNonLocalReturnTrampoline", 1, 1, ReceiverResultReg, null, null, null, 0, null, 1);

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list