[Vm-dev] [commit][2888] CogVM source as per VMMaker.oscog-eem.665

commits at squeakvm.org commits at squeakvm.org
Fri Apr 4 00:20:11 UTC 2014


Revision: 2888
Author:   eliot
Date:     2014-04-03 17:20:08 -0700 (Thu, 03 Apr 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.665

Sista:
Not understanding what I'm doing has caused confusion and delay.

The return from ceCounterTripped: should indeed jump to the retry of the first
counter decrement.  But the result comes in through cResultRegister, which may
be the same as TempReg which the code uses to hold the boolean tbeing tested.
So TempReg should /not/ be reloaded with ReceiverResultReg.

Remember to count the untaken branch in inlined special selector comparisons.

Modified Paths:
--------------
    branches/Cog/sistamacbuild/sqNamedPrims.h
    branches/Cog/sistasrc/vm/cogit.c
    branches/Cog/sistasrc/vm/cogit.h
    branches/Cog/sistasrc/vm/cogmethod.h

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


Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
   - Wed Apr  2 19:25:27 PDT 2014
   + Thu Apr  3 17:18:40 PDT 2014

Modified: branches/Cog/sistamacbuild/sqNamedPrims.h
===================================================================
--- branches/Cog/sistamacbuild/sqNamedPrims.h	2014-04-03 02:28:25 UTC (rev 2887)
+++ branches/Cog/sistamacbuild/sqNamedPrims.h	2014-04-04 00:20:08 UTC (rev 2888)
@@ -1,7 +1,8 @@
-/* Automatically generated on Mon Sep 23 09:23:27 PDT 2013 */
+/* Automatically generated on Wed Apr 2 19:33:03 PDT 2014 */
 extern sqExport vm_exports[];
 extern sqExport os_exports[];
 extern sqExport ADPCMCodecPlugin_exports[];
+extern sqExport AioPlugin_exports[];
 extern sqExport AsynchFilePlugin_exports[];
 extern sqExport B3DAcceleratorPlugin_exports[];
 extern sqExport B2DPlugin_exports[];
@@ -41,6 +42,7 @@
 	vm_exports,
 	os_exports,
 	ADPCMCodecPlugin_exports,
+	AioPlugin_exports,
 	AsynchFilePlugin_exports,
 	B3DAcceleratorPlugin_exports,
 	B2DPlugin_exports,

Modified: branches/Cog/sistasrc/vm/cogit.c
===================================================================
--- branches/Cog/sistasrc/vm/cogit.c	2014-04-03 02:28:25 UTC (rev 2887)
+++ branches/Cog/sistasrc/vm/cogit.c	2014-04-04 00:20:08 UTC (rev 2888)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.661 uuid: e09e68b7-6224-4c07-acd0-ea1f7cf57370
+	CCodeGenerator VMMaker.oscog-eem.665 uuid: bda8b202-c4ed-455a-aa43-e3135d74e79b
    from
-	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.661 uuid: e09e68b7-6224-4c07-acd0-ea1f7cf57370
+	SistaStackToRegisterMappingCogit VMMaker.oscog-eem.665 uuid: bda8b202-c4ed-455a-aa43-e3135d74e79b
  */
-static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.661 uuid: e09e68b7-6224-4c07-acd0-ea1f7cf57370 " __DATE__ ;
+static char __buildInfo[] = "SistaStackToRegisterMappingCogit VMMaker.oscog-eem.665 uuid: bda8b202-c4ed-455a-aa43-e3135d74e79b " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -12057,6 +12057,7 @@
     void *jumpTarget;
     AbstractInstruction *ok;
     sqInt quickConstant;
+    sqInt reg1;
     AbstractInstruction *retry;
 
 	ssFlushTo(simStackPtr - 1);
@@ -12118,12 +12119,13 @@
 	jmpTarget(countTripped, CallRT((boolean == (falseObject())
 		? ceSendMustBeBooleanAddFalseTrampoline
 		: ceSendMustBeBooleanAddTrueTrampoline)));
-	/* begin MoveR:R: */
-	genoperandoperand(MoveRR, ReceiverResultReg, TempReg);
-	/* begin CmpCq:R: */
-	genoperandoperand(CmpCqR, 0, ReceiverResultReg);
-	/* begin JumpNonZero: */
-	genoperand(JumpNonZero, ((sqInt)retry));
+	if ((cResultRegister(backEnd)) != TempReg) {
+		/* begin MoveR:R: */
+		reg1 = cResultRegister(backEnd);
+		genoperandoperand(MoveRR, reg1, TempReg);
+	}
+	/* begin Jump: */
+	genoperand(Jump, ((sqInt)retry));
 	jmpTarget(ok, annotateBytecode(gLabel()));
 	return 0;
 }
@@ -14334,6 +14336,9 @@
 	primDescriptor = generatorAt(byte0);
 	argIsInt = ((((ssTop())->type)) == SSConstant)
 	 && ((((argInt = ((ssTop())->constant))) & 1));
+
+	/* short-cut the jump if operands are SmallInteger constants. */
+
 	rcvrIsInt = ((((ssValue(1))->type)) == SSConstant)
 	 && ((((rcvrInt = ((ssValue(1))->constant))) & 1));
 	if (argIsInt
@@ -14441,6 +14446,9 @@
 	genoperand(((branchDescriptor->isBranchTrue)
 		? (primDescriptor->opcode)
 		: inverseBranchFor((primDescriptor->opcode))), ((usqInt)(ensureNonMergeFixupAt(targetBytecodePC - initialPC))));
+	/* begin SubCq:R: */
+	genoperandoperand(SubCqR, 1, SendNumArgsReg);
+	addDependent(counter, annotateAbsolutePCRef(gMoveRAw(SendNumArgsReg, ((usqInt)counter))));
 	/* begin Jump: */
 	jumpTarget = ensureNonMergeFixupAt(postBranchPC - initialPC);
 	genoperand(Jump, ((sqInt)jumpTarget));

Modified: branches/Cog/sistasrc/vm/cogit.h
===================================================================
--- branches/Cog/sistasrc/vm/cogit.h	2014-04-03 02:28:25 UTC (rev 2887)
+++ branches/Cog/sistasrc/vm/cogit.h	2014-04-04 00:20:08 UTC (rev 2888)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.661 uuid: e09e68b7-6224-4c07-acd0-ea1f7cf57370
+	CCodeGenerator VMMaker.oscog-eem.665 uuid: bda8b202-c4ed-455a-aa43-e3135d74e79b
  */
 
 

Modified: branches/Cog/sistasrc/vm/cogmethod.h
===================================================================
--- branches/Cog/sistasrc/vm/cogmethod.h	2014-04-03 02:28:25 UTC (rev 2887)
+++ branches/Cog/sistasrc/vm/cogmethod.h	2014-04-04 00:20:08 UTC (rev 2888)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-eem.661 uuid: e09e68b7-6224-4c07-acd0-ea1f7cf57370
+	CCodeGenerator VMMaker.oscog-eem.665 uuid: bda8b202-c4ed-455a-aa43-e3135d74e79b
  */
 
 typedef struct {



More information about the Vm-dev mailing list