[Vm-dev] [commit][3359] CogVM source as per VMMaker.oscog-eem.1328

commits at squeakvm.org commits at squeakvm.org
Wed May 27 17:09:52 UTC 2015


Revision: 3359
Author:   eliot
Date:     2015-05-27 10:09:50 -0700 (Wed, 27 May 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1328

Fix determination of the picInterpretAbortOffset
on ARM in cogExtendPIC:CaseNMethod:tag:isMNUCase:.

Modified Paths:
--------------
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogitARMv5.c
    branches/Cog/nsspursrc/vm/cogitIA32.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cogitARMv5.c
    branches/Cog/spursistasrc/vm/cogitIA32.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogitARMv5.c
    branches/Cog/spursrc/vm/cogitIA32.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogitARMv5.c
    branches/Cog/src/vm/cogitIA32.c

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

Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/nsspursrc/vm/cogit.h	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
 
 

Modified: branches/Cog/nsspursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitARMv5.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/nsspursrc/vm/cogitARMv5.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -729,6 +729,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -8928,13 +8929,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -10570,15 +10572,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -12993,6 +12988,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - ((pushLinkRegisterByteSize(backEnd)) + (callInstructionByteSize(backEnd)));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 

Modified: branches/Cog/nsspursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitIA32.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/nsspursrc/vm/cogitIA32.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -672,6 +672,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -7688,13 +7689,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -9300,15 +9302,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -11732,6 +11727,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - (callInstructionByteSize(backEnd));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Tue May 26 10:20:52 PDT 2015
   + Wed May 27 10:09:31 PDT 2015

Modified: branches/Cog/spursistasrc/vm/cogit.h
===================================================================
--- branches/Cog/spursistasrc/vm/cogit.h	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/spursistasrc/vm/cogit.h	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
 
 

Modified: branches/Cog/spursistasrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/spursistasrc/vm/cogitARMv5.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/spursistasrc/vm/cogitARMv5.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -724,6 +724,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -8849,13 +8850,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -9756,7 +9758,7 @@
 {
     sqInt classIndex;
     sqInt i;
-    usqInt pc;
+    sqInt pc;
 
 	pc = (((((usqInt)cPIC)) + firstCPICCaseOffset) + cPICCaseSize) - (jumpLongConditionalByteSize(backEnd));
 	for (i = 2; i <= ((cPIC->cPICNumCases)); i += 1) {
@@ -10426,15 +10428,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -12700,6 +12695,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - ((pushLinkRegisterByteSize(backEnd)) + (callInstructionByteSize(backEnd)));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 

Modified: branches/Cog/spursistasrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/spursistasrc/vm/cogitIA32.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/spursistasrc/vm/cogitIA32.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -666,6 +666,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -7597,13 +7598,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -9144,15 +9146,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -11427,6 +11422,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - (callInstructionByteSize(backEnd));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 

Modified: branches/Cog/spursrc/vm/cogit.h
===================================================================
--- branches/Cog/spursrc/vm/cogit.h	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/spursrc/vm/cogit.h	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
 
 

Modified: branches/Cog/spursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/spursrc/vm/cogitARMv5.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/spursrc/vm/cogitARMv5.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -719,6 +719,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -8485,13 +8486,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -10078,15 +10080,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -12357,6 +12352,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - ((pushLinkRegisterByteSize(backEnd)) + (callInstructionByteSize(backEnd)));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 

Modified: branches/Cog/spursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/spursrc/vm/cogitIA32.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/spursrc/vm/cogitIA32.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -661,6 +661,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -7233,13 +7234,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -8796,15 +8798,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -11084,6 +11079,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - (callInstructionByteSize(backEnd));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 

Modified: branches/Cog/src/vm/cogit.h
===================================================================
--- branches/Cog/src/vm/cogit.h	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/src/vm/cogit.h	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
 
 

Modified: branches/Cog/src/vm/cogitARMv5.c
===================================================================
--- branches/Cog/src/vm/cogitARMv5.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/src/vm/cogitARMv5.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -720,6 +720,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -8523,13 +8524,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -9939,15 +9941,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -12385,6 +12380,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - ((pushLinkRegisterByteSize(backEnd)) + (callInstructionByteSize(backEnd)));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 

Modified: branches/Cog/src/vm/cogitIA32.c
===================================================================
--- branches/Cog/src/vm/cogitIA32.c	2015-05-26 20:40:31 UTC (rev 3358)
+++ branches/Cog/src/vm/cogitIA32.c	2015-05-27 17:09:50 UTC (rev 3359)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	CCodeGenerator VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
    from
-	StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1325 uuid: a0bb0f7f-5e6e-48a7-bf73-fa5d135e06c0 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1328 uuid: c1e2ed6b-28c4-448f-88b8-4c7a3ad53b78 " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -661,6 +661,7 @@
 sqInt patchToOpenPICFornumArgsreceiver(sqInt selector, sqInt numArgs, sqInt receiver);
 sqInt pcisWithinMethod(char *address, CogMethod *cogMethod);
 static sqInt picAbortDiscriminatorValue(void);
+static sqInt picInterpretAbortOffset(void);
 static PrimitiveDescriptor * primitiveGeneratorOrNil(void);
 void printCogMethodFor(void *address);
 void printTrampolineTable(void);
@@ -7270,13 +7271,14 @@
 		target = (((sqInt)(cogMethodOf(caseNMethod)))) + cmNoCheckEntryOffset;
 	}
 	else {
+		operand = caseNMethod;
 		if (isMNUCase) {
 			(cPIC->cpicHasMNUCase = 1);
+			target = (((sqInt)cPIC)) + (sizeof(CogMethod));
 		}
-		operand = caseNMethod;
-		target = (((sqInt)cPIC)) + ((isMNUCase
-	? sizeof(CogMethod)
-	: (interpretOffset()) - (callInstructionByteSize(backEnd))));
+		else {
+			target = (((sqInt)cPIC)) + (picInterpretAbortOffset());
+		}
 	}
 	/* begin CmpCw:R: */
 	genoperandoperand(CmpCwR, caseNTag, TempReg);
@@ -8656,15 +8658,8 @@
 	firstCPICCaseOffset = ((endCPICCase0->address)) - methodZoneBase;
 	cPICCaseSize = ((endCPICCase1->address)) - ((endCPICCase0->address));
 	cPICEndSize = closedPICSize - (((numPICCases - 1) * cPICCaseSize) + firstCPICCaseOffset);
-
-	/* self cCode: ''
-	   inSmalltalk:
-	   [| end |
-	   end := self outputInstructionsAt: methodZoneBase + headerSize.
-	   self disassembleFrom: methodZoneBase + headerSize to: end - 1.
-	   self halt] */
-
 	closedPICSize = roundUpLength(closedPICSize);
+	assert(((picInterpretAbort->address)) == (((methodLabel->address)) + (picInterpretAbortOffset())));
 }
 
 
@@ -11111,6 +11106,18 @@
 }
 
 
+/*	Answer the start of the abort sequence for invoking the interpreter in a
+	closed PIC.
+ */
+
+	/* Cogit>>#picInterpretAbortOffset */
+static sqInt
+picInterpretAbortOffset(void)
+{
+	return (interpretOffset()) - (callInstructionByteSize(backEnd));
+}
+
+
 /*	If there is a generator for the current primitive then answer it;
 	otherwise answer nil. */
 



More information about the Vm-dev mailing list