[Vm-dev] [commit][3192] CogVM source as per VMMaker.oscog-eem.992

commits at squeakvm.org commits at squeakvm.org
Thu Dec 18 22:22:21 UTC 2014


Revision: 3192
Author:   eliot
Date:     2014-12-18 14:22:19 -0800 (Thu, 18 Dec 2014)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.992

64-bit Spur:
Correct a few comparisons and shifts in small float
code to make comparisons in generated C correct.

Move loadFloatOrInt: into the ObjectMemory hierarchies to allow
Spur64BitMemoryManager to generate better code.

Make printOopShortInner: small-float savvy.

Make printHexnp: 64-bit aware.

Can now interact with a 64-bit Spur image.

Unix:
Fix missed signature change in sqUnixFBDev.c.

Modified Paths:
--------------
    branches/Cog/nscogsrc/vm/cointerp.c
    branches/Cog/nscogsrc/vm/cointerp.h
    branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/platforms/unix/vm-display-fbdev/sqUnixFBDev.c
    branches/Cog/scripts/mkspurvmarchives
    branches/Cog/sistasrc/vm/cointerp.c
    branches/Cog/sistasrc/vm/cointerp.h
    branches/Cog/sistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cointerp.c
    branches/Cog/spursrc/vm/cointerp.h
    branches/Cog/spursrc/vm/gcc3x-cointerp.c
    branches/Cog/spurstack64src/vm/gcc3x-interp.c
    branches/Cog/spurstack64src/vm/interp.c
    branches/Cog/spurstacksrc/vm/gcc3x-interp.c
    branches/Cog/spurstacksrc/vm/interp.c
    branches/Cog/src/vm/cointerp.c
    branches/Cog/src/vm/cointerp.h
    branches/Cog/src/vm/cointerpmt.c
    branches/Cog/src/vm/cointerpmt.h
    branches/Cog/src/vm/gcc3x-cointerp.c
    branches/Cog/src/vm/gcc3x-cointerpmt.c
    branches/Cog/stacksrc/vm/gcc3x-interp.c
    branches/Cog/stacksrc/vm/interp.c

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

Modified: branches/Cog/nscogsrc/vm/cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.c	2014-12-17 22:59:41 UTC (rev 3191)
+++ branches/Cog/nscogsrc/vm/cointerp.c	2014-12-18 22:22:19 UTC (rev 3192)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
    from
-	CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -2099,7 +2099,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.991";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.992";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -7963,7 +7963,7 @@
 			/* bytecodePrimBitShift */
 			{
 				sqInt integerArgument;
-				usqInt integerReceiver;
+				sqLong integerReceiver;
 				sqInt shifted;
 				char *sp;
 
@@ -8023,7 +8023,7 @@
 							null;
 							goto l108;
 						}
-						shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
+						shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
 					}
 					shifted = positive32BitIntegerFor(shifted);
 					/* begin pop:thenPush: */
@@ -10917,7 +10917,7 @@
 			/* bytecodePrimBitShift */
 			{
 				sqInt integerArgument;
-				usqInt integerReceiver;
+				sqLong integerReceiver;
 				sqInt shifted;
 				char *sp;
 
@@ -10977,7 +10977,7 @@
 							null;
 							goto l243;
 						}
-						shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
+						shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
 					}
 					shifted = positive32BitIntegerFor(shifted);
 					/* begin pop:thenPush: */
@@ -19013,7 +19013,7 @@
 			putchar('	');
 			if (p > 1024) {
 				/* begin printHexnp: */
-				printf("0x%x", p);
+				printf("0x%lx", p);
 			}
 			else {
 				printNum(p);
@@ -24525,7 +24525,7 @@
 primitiveBitShift(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt integerArgument;
-    usqInt integerReceiver;
+    sqLong integerReceiver;
     sqInt shifted;
     char *sp;
 
@@ -24572,7 +24572,7 @@
 				}
 				return;
 			}
-			shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
+			shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
 		}
 		shifted = positive32BitIntegerFor(shifted);
 		/* begin pop:thenPush: */
@@ -47257,13 +47257,13 @@
 		print(" (");
 		
 		/* begin printHexnp: */
-		printf("0x%x", class);
+		printf("0x%lx", class);
 		print(")");
 	}
 	fmt = (((usqInt) (longAt(oop))) >> (instFormatFieldLSB())) & 15;
 	print(" format ");
 	/* begin printHexnp: */
-	printf("0x%x", fmt);
+	printf("0x%lx", fmt);
 	if (fmt > 4) {
 		print(" nbytes ");
 		printNum(numBytesOf(oop));
@@ -47315,7 +47315,7 @@
 	}
 	print(" hash ");
 	/* begin printHexnp: */
-	printf("0x%x", (((usqInt) (longAt(oop))) >> HashBitsOffset) & HashMaskUnshifted);
+	printf("0x%lx", (((usqInt) (longAt(oop))) >> HashBitsOffset) & HashMaskUnshifted);
 	/* begin cr */
 	printf("\n");
 	if (((fmt >= 8) && (fmt <= (12 - 1)))) {
@@ -49670,7 +49670,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			printFramesInPage(page);
@@ -49790,6 +49790,7 @@
     sqInt header;
     sqInt i;
     sqInt methodClassAssociation;
+    sqInt n;
     char *name;
     sqInt nameLen;
     sqInt obj;
@@ -49815,7 +49816,7 @@
 				offset = (literalCountOfMethodHeader(methodHeaderOf(oop))) - 1;
 				methodClassAssociation = longAt((oop + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 				/* begin printHexnp: */
-				printf("0x%x", oop);
+				printf("0x%lx", oop);
 				/* begin space */
 				/* begin printChar: */
 				putchar(' ');
@@ -49827,14 +49828,23 @@
 					: methodClassAssociation);
 				if ((oop2 & 1)) {
 					;
-					printNum((oop2 >> 1));
-					/* begin printChar: */
-					putchar('(');
-					printHex((oop2 >> 1));
-					/* begin printChar: */
-					putchar(')');
+					if ((oop2 & 1)) {
+						printNum((oop2 >> 1));
+						/* begin printChar: */
+						putchar('(');
+						/* begin printHexnp: */
+						printf("0x%lx", (oop2 >> 1));
+						/* begin printChar: */
+						putchar(')');
 
-					goto l5;
+						goto l8;
+					}
+					
+					print("unknown immediate ");
+					/* begin printHexnp: */
+					printf("0x%lx", oop2);
+
+					goto l8;
 				}
 				if (!(((oop2 & 3) == 0)
 					 && (((((usqInt)oop2)) >= (startOfMemory()))
@@ -49843,16 +49853,16 @@
 					print(((oop2 & (BytesPerWord - 1)) != 0
 						? " is misaligned"
 						: whereIs(oop2)));
-					goto l5;
+					goto l8;
 				}
 				if (((longAt(oop2)) & TypeMask) == HeaderTypeFree) {
 					print(" is a free chunk");
-					goto l5;
+					goto l8;
 				}
 				
 				if (isinstanceOfcompactClassIndex(oop2, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << (shiftForWord()))), ClassFloatCompactIndex)) {
 					printFloat(dbgFloatValueOf(oop2));
-					goto l5;
+					goto l8;
 				}
 				classOop = (((ccIndex = (((usqInt) (longAt(oop2))) >> (compactClassFieldLSB())) & 0x1F)) == 0
 					? (longAt(oop2 - BaseHeaderSize)) & AllButTypeMask
@@ -49863,28 +49873,28 @@
 					 && (((((usqInt)classOop)) < GIV(freeStart))
 					 && (((longAt(classOop)) & TypeMask) != HeaderTypeGC))))) {
 					print("a ??");
-					goto l5;
+					goto l8;
 				}
 				if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) {
 					printNameOfClasscount(oop2, 5);
-					goto l5;
+					goto l8;
 				}
 				if (oop2 == GIV(nilObj)) {
 					print("nil");
-					goto l5;
+					goto l8;
 				}
 				if (oop2 == GIV(trueObj)) {
 					print("true");
-					goto l5;
+					goto l8;
 				}
 				if (oop2 == GIV(falseObj)) {
 					print("false");
-					goto l5;
+					goto l8;
 				}
 				nameLen = lengthOfNameOfClass(classOop);
 				if (nameLen == 0) {
 					print("a ??");
-					goto l5;
+					goto l8;
 				}
 				name = nameOfClass(classOop);
 				if (nameLen == 10) {
@@ -49898,7 +49908,7 @@
 						/* begin printChar: */
 						putchar('\'');
 
-						goto l5;
+						goto l8;
 					}
 					if ((strncmp(name, "ByteSymbol", 10)) == 0) {
 
@@ -49907,7 +49917,7 @@
 						/* begin printChar: */
 						putchar('#');
 						printStringOf(oop2);
-						goto l5;
+						goto l8;
 					}
 				}
 				if ((nameLen == 9)
@@ -49917,7 +49927,7 @@
 					/* begin printChar: */
 					putchar(((longAt((oop2 + BaseHeaderSize) + (0 << (shiftForWord())))) >> 1));
 
-					goto l5;
+					goto l8;
 				}
 				print("a(n) ");
 				for (i = 0; i < nameLen; i += 1) {
@@ -49935,33 +49945,34 @@
 							longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << (shiftForWord())))) + BaseHeaderSize) + ((ccIndex1 - 1) << (shiftForWord())))));
 					while (1) {
 						if (classLookupKey == GIV(nilObj)) {
-							goto l5;
+							goto l8;
 						}
 						if ((instanceSizeOf(classLookupKey)) == (KeyIndex + 1)) break;
 						classLookupKey = longAt((classLookupKey + BaseHeaderSize) + (SuperclassIndex << (shiftForWord())));
 					}
 					if (classLookupKey == GIV(nilObj)) {
-						goto l8;
+						goto l5;
 					}
 					theClass1 = classOop;
 					while (1) {
 						if (theClass1 == classLookupKey) {
-							goto l7;
+							goto l6;
 						}
 						if (!(theClass1 != GIV(nilObj))) break;
 						theClass1 = longAt((theClass1 + BaseHeaderSize) + (SuperclassIndex << (shiftForWord())));
 					}
-					goto l8;
-				l7:	;
+					goto l5;
+				l6:	;
 					/* begin space */
 					/* begin printChar: */
 					putchar(' ');
 					printOopShort(longAt((oop2 + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 					print(" -> ");
-					printHex(longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
-				l8:	;
+					/* begin printHexnp: */
+					printf("0x%lx", longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+				l5:	;
 				}
-			l5:	/* end printOopShortInner: */;
+			l8:	/* end printOopShortInner: */;
 				/* begin cr */
 				printf("\n");
 			}
@@ -50111,6 +50122,7 @@
     sqInt classLookupKey;
     sqInt classOop;
     sqInt i;
+    sqInt n;
     char *name;
     sqInt nameLen;
     sqInt oop1;
@@ -50119,13 +50131,22 @@
 	/* begin printOopShortInner: */
 	if ((oop & 1)) {
 		;
-		printNum((oop >> 1));
-		/* begin printChar: */
-		putchar('(');
-		printHex((oop >> 1));
-		/* begin printChar: */
-		putchar(')');
+		if ((oop & 1)) {
+			printNum((oop >> 1));
+			/* begin printChar: */
+			putchar('(');
+			/* begin printHexnp: */
+			printf("0x%lx", (oop >> 1));
+			/* begin printChar: */
+			putchar(')');
 
+			goto l4;
+		}
+		
+		print("unknown immediate ");
+		/* begin printHexnp: */
+		printf("0x%lx", oop);
+
 		goto l4;
 	}
 	if (!(((oop & 3) == 0)
@@ -50250,7 +50271,8 @@
 		putchar(' ');
 		printOopShort(longAt((oop + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 		print(" -> ");
-		printHex(longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+		/* begin printHexnp: */
+		printf("0x%lx", longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 	l1:	;
 	}
 l4:	/* end printOopShortInner: */;
@@ -51541,7 +51563,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			shortPrintFramesInPage(page);
@@ -51568,7 +51590,7 @@
     sqInt ccIndex;
 
 	/* begin printHexnp: */
-	printf("0x%x", oop);
+	printf("0x%lx", oop);
 	if ((oop & 1)) {
 		if ((oop & 1)) {
 			printf("=%ld\n", (long)integerValueOf(oop));

Modified: branches/Cog/nscogsrc/vm/cointerp.h
===================================================================
--- branches/Cog/nscogsrc/vm/cointerp.h	2014-12-17 22:59:41 UTC (rev 3191)
+++ branches/Cog/nscogsrc/vm/cointerp.h	2014-12-18 22:22:19 UTC (rev 3192)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
  */
 
 

Modified: branches/Cog/nscogsrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2014-12-17 22:59:41 UTC (rev 3191)
+++ branches/Cog/nscogsrc/vm/gcc3x-cointerp.c	2014-12-18 22:22:19 UTC (rev 3192)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
    from
-	CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -2102,7 +2102,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.991";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.992";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -7972,7 +7972,7 @@
 			/* bytecodePrimBitShift */
 			{
 				sqInt integerArgument;
-				usqInt integerReceiver;
+				sqLong integerReceiver;
 				sqInt shifted;
 				char *sp;
 
@@ -8032,7 +8032,7 @@
 							null;
 							goto l108;
 						}
-						shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
+						shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
 					}
 					shifted = positive32BitIntegerFor(shifted);
 					/* begin pop:thenPush: */
@@ -10926,7 +10926,7 @@
 			/* bytecodePrimBitShift */
 			{
 				sqInt integerArgument;
-				usqInt integerReceiver;
+				sqLong integerReceiver;
 				sqInt shifted;
 				char *sp;
 
@@ -10986,7 +10986,7 @@
 							null;
 							goto l243;
 						}
-						shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
+						shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
 					}
 					shifted = positive32BitIntegerFor(shifted);
 					/* begin pop:thenPush: */
@@ -19022,7 +19022,7 @@
 			putchar('	');
 			if (p > 1024) {
 				/* begin printHexnp: */
-				printf("0x%x", p);
+				printf("0x%lx", p);
 			}
 			else {
 				printNum(p);
@@ -24534,7 +24534,7 @@
 primitiveBitShift(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt integerArgument;
-    usqInt integerReceiver;
+    sqLong integerReceiver;
     sqInt shifted;
     char *sp;
 
@@ -24581,7 +24581,7 @@
 				}
 				return;
 			}
-			shifted = ((usqInt) integerReceiver) >> (0 - integerArgument);
+			shifted = ((unsigned sqLong)integerReceiver) >> (0 - integerArgument);
 		}
 		shifted = positive32BitIntegerFor(shifted);
 		/* begin pop:thenPush: */
@@ -47266,13 +47266,13 @@
 		print(" (");
 		
 		/* begin printHexnp: */
-		printf("0x%x", class);
+		printf("0x%lx", class);
 		print(")");
 	}
 	fmt = (((usqInt) (longAt(oop))) >> (instFormatFieldLSB())) & 15;
 	print(" format ");
 	/* begin printHexnp: */
-	printf("0x%x", fmt);
+	printf("0x%lx", fmt);
 	if (fmt > 4) {
 		print(" nbytes ");
 		printNum(numBytesOf(oop));
@@ -47324,7 +47324,7 @@
 	}
 	print(" hash ");
 	/* begin printHexnp: */
-	printf("0x%x", (((usqInt) (longAt(oop))) >> HashBitsOffset) & HashMaskUnshifted);
+	printf("0x%lx", (((usqInt) (longAt(oop))) >> HashBitsOffset) & HashMaskUnshifted);
 	/* begin cr */
 	printf("\n");
 	if (((fmt >= 8) && (fmt <= (12 - 1)))) {
@@ -49679,7 +49679,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			printFramesInPage(page);
@@ -49799,6 +49799,7 @@
     sqInt header;
     sqInt i;
     sqInt methodClassAssociation;
+    sqInt n;
     char *name;
     sqInt nameLen;
     sqInt obj;
@@ -49824,7 +49825,7 @@
 				offset = (literalCountOfMethodHeader(methodHeaderOf(oop))) - 1;
 				methodClassAssociation = longAt((oop + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 				/* begin printHexnp: */
-				printf("0x%x", oop);
+				printf("0x%lx", oop);
 				/* begin space */
 				/* begin printChar: */
 				putchar(' ');
@@ -49836,14 +49837,23 @@
 					: methodClassAssociation);
 				if ((oop2 & 1)) {
 					;
-					printNum((oop2 >> 1));
-					/* begin printChar: */
-					putchar('(');
-					printHex((oop2 >> 1));
-					/* begin printChar: */
-					putchar(')');
+					if ((oop2 & 1)) {
+						printNum((oop2 >> 1));
+						/* begin printChar: */
+						putchar('(');
+						/* begin printHexnp: */
+						printf("0x%lx", (oop2 >> 1));
+						/* begin printChar: */
+						putchar(')');
 
-					goto l5;
+						goto l8;
+					}
+					
+					print("unknown immediate ");
+					/* begin printHexnp: */
+					printf("0x%lx", oop2);
+
+					goto l8;
 				}
 				if (!(((oop2 & 3) == 0)
 					 && (((((usqInt)oop2)) >= (startOfMemory()))
@@ -49852,16 +49862,16 @@
 					print(((oop2 & (BytesPerWord - 1)) != 0
 						? " is misaligned"
 						: whereIs(oop2)));
-					goto l5;
+					goto l8;
 				}
 				if (((longAt(oop2)) & TypeMask) == HeaderTypeFree) {
 					print(" is a free chunk");
-					goto l5;
+					goto l8;
 				}
 				
 				if (isinstanceOfcompactClassIndex(oop2, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (ClassFloat << (shiftForWord()))), ClassFloatCompactIndex)) {
 					printFloat(dbgFloatValueOf(oop2));
-					goto l5;
+					goto l8;
 				}
 				classOop = (((ccIndex = (((usqInt) (longAt(oop2))) >> (compactClassFieldLSB())) & 0x1F)) == 0
 					? (longAt(oop2 - BaseHeaderSize)) & AllButTypeMask
@@ -49872,28 +49882,28 @@
 					 && (((((usqInt)classOop)) < GIV(freeStart))
 					 && (((longAt(classOop)) & TypeMask) != HeaderTypeGC))))) {
 					print("a ??");
-					goto l5;
+					goto l8;
 				}
 				if ((numSlotsOf(classOop)) == GIV(metaclassNumSlots)) {
 					printNameOfClasscount(oop2, 5);
-					goto l5;
+					goto l8;
 				}
 				if (oop2 == GIV(nilObj)) {
 					print("nil");
-					goto l5;
+					goto l8;
 				}
 				if (oop2 == GIV(trueObj)) {
 					print("true");
-					goto l5;
+					goto l8;
 				}
 				if (oop2 == GIV(falseObj)) {
 					print("false");
-					goto l5;
+					goto l8;
 				}
 				nameLen = lengthOfNameOfClass(classOop);
 				if (nameLen == 0) {
 					print("a ??");
-					goto l5;
+					goto l8;
 				}
 				name = nameOfClass(classOop);
 				if (nameLen == 10) {
@@ -49907,7 +49917,7 @@
 						/* begin printChar: */
 						putchar('\'');
 
-						goto l5;
+						goto l8;
 					}
 					if ((strncmp(name, "ByteSymbol", 10)) == 0) {
 
@@ -49916,7 +49926,7 @@
 						/* begin printChar: */
 						putchar('#');
 						printStringOf(oop2);
-						goto l5;
+						goto l8;
 					}
 				}
 				if ((nameLen == 9)
@@ -49926,7 +49936,7 @@
 					/* begin printChar: */
 					putchar(((longAt((oop2 + BaseHeaderSize) + (0 << (shiftForWord())))) >> 1));
 
-					goto l5;
+					goto l8;
 				}
 				print("a(n) ");
 				for (i = 0; i < nameLen; i += 1) {
@@ -49944,33 +49954,34 @@
 							longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (CompactClasses << (shiftForWord())))) + BaseHeaderSize) + ((ccIndex1 - 1) << (shiftForWord())))));
 					while (1) {
 						if (classLookupKey == GIV(nilObj)) {
-							goto l5;
+							goto l8;
 						}
 						if ((instanceSizeOf(classLookupKey)) == (KeyIndex + 1)) break;
 						classLookupKey = longAt((classLookupKey + BaseHeaderSize) + (SuperclassIndex << (shiftForWord())));
 					}
 					if (classLookupKey == GIV(nilObj)) {
-						goto l8;
+						goto l5;
 					}
 					theClass1 = classOop;
 					while (1) {
 						if (theClass1 == classLookupKey) {
-							goto l7;
+							goto l6;
 						}
 						if (!(theClass1 != GIV(nilObj))) break;
 						theClass1 = longAt((theClass1 + BaseHeaderSize) + (SuperclassIndex << (shiftForWord())));
 					}
-					goto l8;
-				l7:	;
+					goto l5;
+				l6:	;
 					/* begin space */
 					/* begin printChar: */
 					putchar(' ');
 					printOopShort(longAt((oop2 + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 					print(" -> ");
-					printHex(longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
-				l8:	;
+					/* begin printHexnp: */
+					printf("0x%lx", longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+				l5:	;
 				}
-			l5:	/* end printOopShortInner: */;
+			l8:	/* end printOopShortInner: */;
 				/* begin cr */
 				printf("\n");
 			}
@@ -50120,6 +50131,7 @@
     sqInt classLookupKey;
     sqInt classOop;
     sqInt i;
+    sqInt n;
     char *name;
     sqInt nameLen;
     sqInt oop1;
@@ -50128,13 +50140,22 @@
 	/* begin printOopShortInner: */
 	if ((oop & 1)) {
 		;
-		printNum((oop >> 1));
-		/* begin printChar: */
-		putchar('(');
-		printHex((oop >> 1));
-		/* begin printChar: */
-		putchar(')');
+		if ((oop & 1)) {
+			printNum((oop >> 1));
+			/* begin printChar: */
+			putchar('(');
+			/* begin printHexnp: */
+			printf("0x%lx", (oop >> 1));
+			/* begin printChar: */
+			putchar(')');
 
+			goto l4;
+		}
+		
+		print("unknown immediate ");
+		/* begin printHexnp: */
+		printf("0x%lx", oop);
+
 		goto l4;
 	}
 	if (!(((oop & 3) == 0)
@@ -50259,7 +50280,8 @@
 		putchar(' ');
 		printOopShort(longAt((oop + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 		print(" -> ");
-		printHex(longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+		/* begin printHexnp: */
+		printf("0x%lx", longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 	l1:	;
 	}
 l4:	/* end printOopShortInner: */;
@@ -51550,7 +51572,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			shortPrintFramesInPage(page);
@@ -51577,7 +51599,7 @@
     sqInt ccIndex;
 
 	/* begin printHexnp: */
-	printf("0x%x", oop);
+	printf("0x%lx", oop);
 	if ((oop & 1)) {
 		if ((oop & 1)) {
 			printf("=%ld\n", (long)integerValueOf(oop));

Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c	2014-12-17 22:59:41 UTC (rev 3191)
+++ branches/Cog/nsspursrc/vm/cointerp.c	2014-12-18 22:22:19 UTC (rev 3192)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
    from
-	CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -2350,7 +2350,7 @@
 /*540*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.991";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.992";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -23341,7 +23341,7 @@
 			putchar('	');
 			if (p > 1024) {
 				/* begin printHexnp: */
-				printf("0x%x", p);
+				printf("0x%lx", p);
 			}
 			else {
 				printNum(p);
@@ -59233,27 +59233,27 @@
 	print("freeChunk ");
 	/* begin printHexPtrnp: */
 	/* begin printHexnp: */
-	printf("0x%x", oopForPointer(freeChunk));
+	printf("0x%lx", oopForPointer(freeChunk));
 	print(" bytes ");
 	printNum(numBytes);
 	print(" next ");
 	/* begin printHexPtrnp: */
 	/* begin printHexnp: */
-	printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (0 << (shiftForWord())))));
+	printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (0 << (shiftForWord())))));
 	if ((numBytes >= (32 * 8))
 	 && (!isNextChunk)) {
 		print(" ^ ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (2 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (2 << (shiftForWord())))));
 		print(" < ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (3 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (3 << (shiftForWord())))));
 		print(" > ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (4 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (4 << (shiftForWord())))));
 	}
 	/* begin cr */
 	printf("\n");
@@ -59284,10 +59284,10 @@
 	printf("\n");
 	print("mask: ");
 	/* begin printHexnp: */
-	printf("0x%x", GIV(freeListsMask));
+	printf("0x%lx", GIV(freeListsMask));
 	print(" expected: ");
 	/* begin printHexnp: */
-	printf("0x%x", expectedMask);
+	printf("0x%lx", expectedMask);
 	/* begin cr */
 	printf("\n");
 }
@@ -66819,17 +66819,17 @@
 		printNameOfClasscount(class, 5);
 		print(" (");
 		/* begin printHexnp: */
-		printf("0x%x", (longAt(oop)) & 0x3FFFFF);
+		printf("0x%lx", (longAt(oop)) & 0x3FFFFF);
 		print("=>");
 
 		/* begin printHexnp: */
-		printf("0x%x", class);
+		printf("0x%lx", class);
 		print(")");
 	}
 	fmt = (((usqInt) (longAt(oop))) >> 24) & 0x1F;
 	print(" format ");
 	/* begin printHexnp: */
-	printf("0x%x", fmt);
+	printf("0x%lx", fmt);
 	if (fmt > 5) {
 		print(" nbytes ");
 		printNum(numBytesOf(oop));
@@ -66896,7 +66896,7 @@
 	putchar(aByte4);
 	print(" hash ");
 	/* begin printHexnp: */
-	printf("0x%x", (long32At(oop + 4)) & 0x3FFFFF);
+	printf("0x%lx", (long32At(oop + 4)) & 0x3FFFFF);
 	/* begin cr */
 	printf("\n");
 	if (((fmt >= 16) && (fmt <= (24 - 1)))) {
@@ -69438,7 +69438,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			printFramesInPage(page);
@@ -69574,6 +69574,9 @@
     sqInt i2;
     sqInt limit;
     sqInt methodClassAssociation;
+    sqInt n;
+    sqInt n1;
+    sqInt n2;
     char *name;
     char *name1;
     char *name2;
@@ -69604,6 +69607,9 @@
     sqInt prevObj1;
     sqInt prevPrevObj;
     sqInt prevPrevObj1;
+    sqInt referent;
+    sqInt referent1;
+    sqInt referent2;
     sqInt theClass1;
     sqInt theClass11;
     sqInt theClass12;
@@ -69635,7 +69641,7 @@
 			offset = (literalCountOf(objOop1)) - 1;
 			methodClassAssociation = longAt((objOop1 + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 			/* begin printHexnp: */
-			printf("0x%x", objOop1);
+			printf("0x%lx", objOop1);
 			/* begin space */
 			/* begin printChar: */
 			putchar(' ');
@@ -69653,19 +69659,29 @@
 					putchar(((usqInt) (((usqInt)oop))) >> 2);
 					/* begin printChar: */
 					putchar('(');
-					printHex((oop >> 1));
+					/* begin printHexnp: */
+					printf("0x%lx", (oop >> 1));
 					/* begin printChar: */
 					putchar(')');
 
 					goto l27;
 				}
-				printNum((oop >> 1));
-				/* begin printChar: */
-				putchar('(');
-				printHex((oop >> 1));
-				/* begin printChar: */
-				putchar(')');
+				if ((oop & 1)) {
+					printNum((oop >> 1));
+					/* begin printChar: */
+					putchar('(');
+					/* begin printHexnp: */
+					printf("0x%lx", (oop >> 1));
+					/* begin printChar: */
+					putchar(')');
 
+					goto l27;
+				}
+				
+				print("unknown immediate ");
+				/* begin printHexnp: */
+				printf("0x%lx", oop);
+
 				goto l27;
 			}
 			if (!(addressCouldBeObj(oop))) {
@@ -69680,7 +69696,16 @@
 			}
 			if (((longAt(oop)) & (0x3FFFFF - 8)) == 0) {
 				print(" is a forwarder to ");
-				printHex(followForwarded(oop));
+				/* begin printHexnp: */
+				/* begin followForwarded: */
+				assert(isUnambiguouslyForwarder(oop));
+				referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+				while (((referent & 3) == 0)
+				 && (((longAt(referent)) & 0x3FFFFF) == 8)) {
+					referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+				}
+				n = referent;
+				printf("0x%lx", n);
 
 				goto l27;
 			}
@@ -69841,7 +69866,8 @@
 				putchar(' ');
 				printOopShort(longAt((oop + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 				print(" -> ");
-				printHex(longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+				/* begin printHexnp: */
+				printf("0x%lx", longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 			l22:	;
 			}
 		l27:	/* end printOopShortInner: */;
@@ -69871,7 +69897,7 @@
 			offset = (literalCountOf(objOop1)) - 1;
 			methodClassAssociation = longAt((objOop1 + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 			/* begin printHexnp: */
-			printf("0x%x", objOop1);
+			printf("0x%lx", objOop1);
 			/* begin space */
 			/* begin printChar: */
 			putchar(' ');
@@ -69889,19 +69915,29 @@
 					putchar(((usqInt) (((usqInt)oop1))) >> 2);
 					/* begin printChar: */
 					putchar('(');
-					printHex((oop1 >> 1));
+					/* begin printHexnp: */
+					printf("0x%lx", (oop1 >> 1));
 					/* begin printChar: */
 					putchar(')');
 
 					goto l35;
 				}
-				printNum((oop1 >> 1));
-				/* begin printChar: */
-				putchar('(');
-				printHex((oop1 >> 1));
-				/* begin printChar: */
-				putchar(')');
+				if ((oop1 & 1)) {
+					printNum((oop1 >> 1));
+					/* begin printChar: */
+					putchar('(');
+					/* begin printHexnp: */
+					printf("0x%lx", (oop1 >> 1));
+					/* begin printChar: */
+					putchar(')');
 
+					goto l35;
+				}
+				
+				print("unknown immediate ");
+				/* begin printHexnp: */
+				printf("0x%lx", oop1);
+
 				goto l35;
 			}
 			if (!(addressCouldBeObj(oop1))) {
@@ -69916,7 +69952,16 @@
 			}
 			if (((longAt(oop1)) & (0x3FFFFF - 8)) == 0) {
 				print(" is a forwarder to ");
-				printHex(followForwarded(oop1));
+				/* begin printHexnp: */
+				/* begin followForwarded: */
+				assert(isUnambiguouslyForwarder(oop1));
+				referent1 = longAt((oop1 + BaseHeaderSize) + (0 << (shiftForWord())));
+				while (((referent1 & 3) == 0)
+				 && (((longAt(referent1)) & 0x3FFFFF) == 8)) {
+					referent1 = longAt((referent1 + BaseHeaderSize) + (0 << (shiftForWord())));
+				}
+				n1 = referent1;
+				printf("0x%lx", n1);
 
 				goto l35;
 			}
@@ -70077,7 +70122,8 @@
 				putchar(' ');
 				printOopShort(longAt((oop1 + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 				print(" -> ");
-				printHex(longAt((oop1 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+				/* begin printHexnp: */
+				printf("0x%lx", longAt((oop1 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 			l34:	;
 			}
 		l35:	/* end printOopShortInner: */;
@@ -70112,7 +70158,7 @@
 				offset = (literalCountOf(objOop11)) - 1;
 				methodClassAssociation = longAt((objOop11 + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 				/* begin printHexnp: */
-				printf("0x%x", objOop11);
+				printf("0x%lx", objOop11);
 				/* begin space */
 				/* begin printChar: */
 				putchar(' ');
@@ -70130,19 +70176,29 @@
 						putchar(((usqInt) (((usqInt)oop2))) >> 2);
 						/* begin printChar: */
 						putchar('(');
-						printHex((oop2 >> 1));
+						/* begin printHexnp: */
+						printf("0x%lx", (oop2 >> 1));
 						/* begin printChar: */
 						putchar(')');
 
 						goto l42;
 					}
-					printNum((oop2 >> 1));
-					/* begin printChar: */
-					putchar('(');
-					printHex((oop2 >> 1));
-					/* begin printChar: */
-					putchar(')');
+					if ((oop2 & 1)) {
+						printNum((oop2 >> 1));
+						/* begin printChar: */
+						putchar('(');
+						/* begin printHexnp: */
+						printf("0x%lx", (oop2 >> 1));
+						/* begin printChar: */
+						putchar(')');
 
+						goto l42;
+					}
+					
+					print("unknown immediate ");
+					/* begin printHexnp: */
+					printf("0x%lx", oop2);
+
 					goto l42;
 				}
 				if (!(addressCouldBeObj(oop2))) {
@@ -70157,7 +70213,16 @@
 				}
 				if (((longAt(oop2)) & (0x3FFFFF - 8)) == 0) {
 					print(" is a forwarder to ");
-					printHex(followForwarded(oop2));
+					/* begin printHexnp: */
+					/* begin followForwarded: */
+					assert(isUnambiguouslyForwarder(oop2));
+					referent2 = longAt((oop2 + BaseHeaderSize) + (0 << (shiftForWord())));
+					while (((referent2 & 3) == 0)
+					 && (((longAt(referent2)) & 0x3FFFFF) == 8)) {
+						referent2 = longAt((referent2 + BaseHeaderSize) + (0 << (shiftForWord())));
+					}
+					n2 = referent2;
+					printf("0x%lx", n2);
 
 					goto l42;
 				}
@@ -70318,7 +70383,8 @@
 					putchar(' ');
 					printOopShort(longAt((oop2 + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 					print(" -> ");
-					printHex(longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+					/* begin printHexnp: */
+					printf("0x%lx", longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 				l41:	;
 				}
 			l42:	/* end printOopShortInner: */;
@@ -70463,11 +70529,13 @@
     sqInt classTablePage;
     sqInt classTablePage1;
     sqInt i;
+    sqInt n;
     char *name;
     sqInt nameLen;
     sqInt objOop;
     sqInt objOop1;
     sqInt objOop2;
+    sqInt referent;
     sqInt theClass1;
 
 	/* begin printOopShortInner: */
@@ -70479,19 +70547,29 @@
 			putchar(((usqInt) (((usqInt)oop))) >> 2);
 			/* begin printChar: */
 			putchar('(');
-			printHex((oop >> 1));
+			/* begin printHexnp: */
+			printf("0x%lx", (oop >> 1));
 			/* begin printChar: */
 			putchar(')');
 
 			goto l7;
 		}
-		printNum((oop >> 1));
-		/* begin printChar: */
-		putchar('(');
-		printHex((oop >> 1));
-		/* begin printChar: */
-		putchar(')');
+		if ((oop & 1)) {
+			printNum((oop >> 1));
+			/* begin printChar: */
+			putchar('(');
+			/* begin printHexnp: */
+			printf("0x%lx", (oop >> 1));
+			/* begin printChar: */
+			putchar(')');
 
+			goto l7;
+		}
+		
+		print("unknown immediate ");
+		/* begin printHexnp: */
+		printf("0x%lx", oop);
+
 		goto l7;
 	}
 	if (!(addressCouldBeObj(oop))) {
@@ -70506,7 +70584,16 @@
 	}
 	if (((longAt(oop)) & (0x3FFFFF - 8)) == 0) {
 		print(" is a forwarder to ");
-		printHex(followForwarded(oop));
+		/* begin printHexnp: */
+		/* begin followForwarded: */
+		assert(isUnambiguouslyForwarder(oop));
+		referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+		while (((referent & 3) == 0)
+		 && (((longAt(referent)) & 0x3FFFFF) == 8)) {
+			referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+		}
+		n = referent;
+		printf("0x%lx", n);
 
 		goto l7;
 	}
@@ -70667,7 +70754,8 @@
 		putchar(' ');
 		printOopShort(longAt((oop + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 		print(" -> ");
-		printHex(longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+		/* begin printHexnp: */
+		printf("0x%lx", longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 	l1:	;
 	}
 l7:	/* end printOopShortInner: */;
@@ -72100,7 +72188,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			shortPrintFramesInPage(page);
@@ -72125,7 +72213,7 @@
 shortPrintOop(sqInt oop)
 {
 	/* begin printHexnp: */
-	printf("0x%x", oop);
+	printf("0x%lx", oop);
 	if ((oop & 3) != 0) {
 		if ((oop & 1)) {
 			printf("=%ld\n", (long)integerValueOf(oop));

Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h	2014-12-17 22:59:41 UTC (rev 3191)
+++ branches/Cog/nsspursrc/vm/cointerp.h	2014-12-18 22:22:19 UTC (rev 3192)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
  */
 
 

Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2014-12-17 22:59:41 UTC (rev 3191)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c	2014-12-18 22:22:19 UTC (rev 3192)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
    from
-	CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -2353,7 +2353,7 @@
 /*540*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.991";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.992";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -23350,7 +23350,7 @@
 			putchar('	');
 			if (p > 1024) {
 				/* begin printHexnp: */
-				printf("0x%x", p);
+				printf("0x%lx", p);
 			}
 			else {
 				printNum(p);
@@ -59242,27 +59242,27 @@
 	print("freeChunk ");
 	/* begin printHexPtrnp: */
 	/* begin printHexnp: */
-	printf("0x%x", oopForPointer(freeChunk));
+	printf("0x%lx", oopForPointer(freeChunk));
 	print(" bytes ");
 	printNum(numBytes);
 	print(" next ");
 	/* begin printHexPtrnp: */
 	/* begin printHexnp: */
-	printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (0 << (shiftForWord())))));
+	printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (0 << (shiftForWord())))));
 	if ((numBytes >= (32 * 8))
 	 && (!isNextChunk)) {
 		print(" ^ ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (2 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (2 << (shiftForWord())))));
 		print(" < ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (3 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (3 << (shiftForWord())))));
 		print(" > ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (4 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (4 << (shiftForWord())))));
 	}
 	/* begin cr */
 	printf("\n");
@@ -59293,10 +59293,10 @@
 	printf("\n");
 	print("mask: ");
 	/* begin printHexnp: */
-	printf("0x%x", GIV(freeListsMask));
+	printf("0x%lx", GIV(freeListsMask));
 	print(" expected: ");
 	/* begin printHexnp: */
-	printf("0x%x", expectedMask);
+	printf("0x%lx", expectedMask);
 	/* begin cr */
 	printf("\n");
 }
@@ -66828,17 +66828,17 @@
 		printNameOfClasscount(class, 5);
 		print(" (");
 		/* begin printHexnp: */
-		printf("0x%x", (longAt(oop)) & 0x3FFFFF);
+		printf("0x%lx", (longAt(oop)) & 0x3FFFFF);
 		print("=>");
 
 		/* begin printHexnp: */
-		printf("0x%x", class);
+		printf("0x%lx", class);
 		print(")");
 	}
 	fmt = (((usqInt) (longAt(oop))) >> 24) & 0x1F;
 	print(" format ");
 	/* begin printHexnp: */
-	printf("0x%x", fmt);
+	printf("0x%lx", fmt);
 	if (fmt > 5) {
 		print(" nbytes ");
 		printNum(numBytesOf(oop));
@@ -66905,7 +66905,7 @@
 	putchar(aByte4);
 	print(" hash ");
 	/* begin printHexnp: */
-	printf("0x%x", (long32At(oop + 4)) & 0x3FFFFF);
+	printf("0x%lx", (long32At(oop + 4)) & 0x3FFFFF);
 	/* begin cr */
 	printf("\n");
 	if (((fmt >= 16) && (fmt <= (24 - 1)))) {
@@ -69447,7 +69447,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			printFramesInPage(page);
@@ -69583,6 +69583,9 @@
     sqInt i2;
     sqInt limit;
     sqInt methodClassAssociation;
+    sqInt n;
+    sqInt n1;
+    sqInt n2;
     char *name;
     char *name1;
     char *name2;
@@ -69613,6 +69616,9 @@
     sqInt prevObj1;
     sqInt prevPrevObj;
     sqInt prevPrevObj1;
+    sqInt referent;
+    sqInt referent1;
+    sqInt referent2;
     sqInt theClass1;
     sqInt theClass11;
     sqInt theClass12;
@@ -69644,7 +69650,7 @@
 			offset = (literalCountOf(objOop1)) - 1;
 			methodClassAssociation = longAt((objOop1 + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 			/* begin printHexnp: */
-			printf("0x%x", objOop1);
+			printf("0x%lx", objOop1);
 			/* begin space */
 			/* begin printChar: */
 			putchar(' ');
@@ -69662,19 +69668,29 @@
 					putchar(((usqInt) (((usqInt)oop))) >> 2);
 					/* begin printChar: */
 					putchar('(');
-					printHex((oop >> 1));
+					/* begin printHexnp: */
+					printf("0x%lx", (oop >> 1));
 					/* begin printChar: */
 					putchar(')');
 
 					goto l27;
 				}
-				printNum((oop >> 1));
-				/* begin printChar: */
-				putchar('(');
-				printHex((oop >> 1));
-				/* begin printChar: */
-				putchar(')');
+				if ((oop & 1)) {
+					printNum((oop >> 1));
+					/* begin printChar: */
+					putchar('(');
+					/* begin printHexnp: */
+					printf("0x%lx", (oop >> 1));
+					/* begin printChar: */
+					putchar(')');
 
+					goto l27;
+				}
+				
+				print("unknown immediate ");
+				/* begin printHexnp: */
+				printf("0x%lx", oop);
+
 				goto l27;
 			}
 			if (!(addressCouldBeObj(oop))) {
@@ -69689,7 +69705,16 @@
 			}
 			if (((longAt(oop)) & (0x3FFFFF - 8)) == 0) {
 				print(" is a forwarder to ");
-				printHex(followForwarded(oop));
+				/* begin printHexnp: */
+				/* begin followForwarded: */
+				assert(isUnambiguouslyForwarder(oop));
+				referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+				while (((referent & 3) == 0)
+				 && (((longAt(referent)) & 0x3FFFFF) == 8)) {
+					referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+				}
+				n = referent;
+				printf("0x%lx", n);
 
 				goto l27;
 			}
@@ -69850,7 +69875,8 @@
 				putchar(' ');
 				printOopShort(longAt((oop + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 				print(" -> ");
-				printHex(longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+				/* begin printHexnp: */
+				printf("0x%lx", longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 			l22:	;
 			}
 		l27:	/* end printOopShortInner: */;
@@ -69880,7 +69906,7 @@
 			offset = (literalCountOf(objOop1)) - 1;
 			methodClassAssociation = longAt((objOop1 + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 			/* begin printHexnp: */
-			printf("0x%x", objOop1);
+			printf("0x%lx", objOop1);
 			/* begin space */
 			/* begin printChar: */
 			putchar(' ');
@@ -69898,19 +69924,29 @@
 					putchar(((usqInt) (((usqInt)oop1))) >> 2);
 					/* begin printChar: */
 					putchar('(');
-					printHex((oop1 >> 1));
+					/* begin printHexnp: */
+					printf("0x%lx", (oop1 >> 1));
 					/* begin printChar: */
 					putchar(')');
 
 					goto l35;
 				}
-				printNum((oop1 >> 1));
-				/* begin printChar: */
-				putchar('(');
-				printHex((oop1 >> 1));
-				/* begin printChar: */
-				putchar(')');
+				if ((oop1 & 1)) {
+					printNum((oop1 >> 1));
+					/* begin printChar: */
+					putchar('(');
+					/* begin printHexnp: */
+					printf("0x%lx", (oop1 >> 1));
+					/* begin printChar: */
+					putchar(')');
 
+					goto l35;
+				}
+				
+				print("unknown immediate ");
+				/* begin printHexnp: */
+				printf("0x%lx", oop1);
+
 				goto l35;
 			}
 			if (!(addressCouldBeObj(oop1))) {
@@ -69925,7 +69961,16 @@
 			}
 			if (((longAt(oop1)) & (0x3FFFFF - 8)) == 0) {
 				print(" is a forwarder to ");
-				printHex(followForwarded(oop1));
+				/* begin printHexnp: */
+				/* begin followForwarded: */
+				assert(isUnambiguouslyForwarder(oop1));
+				referent1 = longAt((oop1 + BaseHeaderSize) + (0 << (shiftForWord())));
+				while (((referent1 & 3) == 0)
+				 && (((longAt(referent1)) & 0x3FFFFF) == 8)) {
+					referent1 = longAt((referent1 + BaseHeaderSize) + (0 << (shiftForWord())));
+				}
+				n1 = referent1;
+				printf("0x%lx", n1);
 
 				goto l35;
 			}
@@ -70086,7 +70131,8 @@
 				putchar(' ');
 				printOopShort(longAt((oop1 + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 				print(" -> ");
-				printHex(longAt((oop1 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+				/* begin printHexnp: */
+				printf("0x%lx", longAt((oop1 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 			l34:	;
 			}
 		l35:	/* end printOopShortInner: */;
@@ -70121,7 +70167,7 @@
 				offset = (literalCountOf(objOop11)) - 1;
 				methodClassAssociation = longAt((objOop11 + BaseHeaderSize) + ((offset + LiteralStart) << (shiftForWord())));
 				/* begin printHexnp: */
-				printf("0x%x", objOop11);
+				printf("0x%lx", objOop11);
 				/* begin space */
 				/* begin printChar: */
 				putchar(' ');
@@ -70139,19 +70185,29 @@
 						putchar(((usqInt) (((usqInt)oop2))) >> 2);
 						/* begin printChar: */
 						putchar('(');
-						printHex((oop2 >> 1));
+						/* begin printHexnp: */
+						printf("0x%lx", (oop2 >> 1));
 						/* begin printChar: */
 						putchar(')');
 
 						goto l42;
 					}
-					printNum((oop2 >> 1));
-					/* begin printChar: */
-					putchar('(');
-					printHex((oop2 >> 1));
-					/* begin printChar: */
-					putchar(')');
+					if ((oop2 & 1)) {
+						printNum((oop2 >> 1));
+						/* begin printChar: */
+						putchar('(');
+						/* begin printHexnp: */
+						printf("0x%lx", (oop2 >> 1));
+						/* begin printChar: */
+						putchar(')');
 
+						goto l42;
+					}
+					
+					print("unknown immediate ");
+					/* begin printHexnp: */
+					printf("0x%lx", oop2);
+
 					goto l42;
 				}
 				if (!(addressCouldBeObj(oop2))) {
@@ -70166,7 +70222,16 @@
 				}
 				if (((longAt(oop2)) & (0x3FFFFF - 8)) == 0) {
 					print(" is a forwarder to ");
-					printHex(followForwarded(oop2));
+					/* begin printHexnp: */
+					/* begin followForwarded: */
+					assert(isUnambiguouslyForwarder(oop2));
+					referent2 = longAt((oop2 + BaseHeaderSize) + (0 << (shiftForWord())));
+					while (((referent2 & 3) == 0)
+					 && (((longAt(referent2)) & 0x3FFFFF) == 8)) {
+						referent2 = longAt((referent2 + BaseHeaderSize) + (0 << (shiftForWord())));
+					}
+					n2 = referent2;
+					printf("0x%lx", n2);
 
 					goto l42;
 				}
@@ -70327,7 +70392,8 @@
 					putchar(' ');
 					printOopShort(longAt((oop2 + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 					print(" -> ");
-					printHex(longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+					/* begin printHexnp: */
+					printf("0x%lx", longAt((oop2 + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 				l41:	;
 				}
 			l42:	/* end printOopShortInner: */;
@@ -70472,11 +70538,13 @@
     sqInt classTablePage;
     sqInt classTablePage1;
     sqInt i;
+    sqInt n;
     char *name;
     sqInt nameLen;
     sqInt objOop;
     sqInt objOop1;
     sqInt objOop2;
+    sqInt referent;
     sqInt theClass1;
 
 	/* begin printOopShortInner: */
@@ -70488,19 +70556,29 @@
 			putchar(((usqInt) (((usqInt)oop))) >> 2);
 			/* begin printChar: */
 			putchar('(');
-			printHex((oop >> 1));
+			/* begin printHexnp: */
+			printf("0x%lx", (oop >> 1));
 			/* begin printChar: */
 			putchar(')');
 
 			goto l7;
 		}
-		printNum((oop >> 1));
-		/* begin printChar: */
-		putchar('(');
-		printHex((oop >> 1));
-		/* begin printChar: */
-		putchar(')');
+		if ((oop & 1)) {
+			printNum((oop >> 1));
+			/* begin printChar: */
+			putchar('(');
+			/* begin printHexnp: */
+			printf("0x%lx", (oop >> 1));
+			/* begin printChar: */
+			putchar(')');
 
+			goto l7;
+		}
+		
+		print("unknown immediate ");
+		/* begin printHexnp: */
+		printf("0x%lx", oop);
+
 		goto l7;
 	}
 	if (!(addressCouldBeObj(oop))) {
@@ -70515,7 +70593,16 @@
 	}
 	if (((longAt(oop)) & (0x3FFFFF - 8)) == 0) {
 		print(" is a forwarder to ");
-		printHex(followForwarded(oop));
+		/* begin printHexnp: */
+		/* begin followForwarded: */
+		assert(isUnambiguouslyForwarder(oop));
+		referent = longAt((oop + BaseHeaderSize) + (0 << (shiftForWord())));
+		while (((referent & 3) == 0)
+		 && (((longAt(referent)) & 0x3FFFFF) == 8)) {
+			referent = longAt((referent + BaseHeaderSize) + (0 << (shiftForWord())));
+		}
+		n = referent;
+		printf("0x%lx", n);
 
 		goto l7;
 	}
@@ -70676,7 +70763,8 @@
 		putchar(' ');
 		printOopShort(longAt((oop + BaseHeaderSize) + (KeyIndex << (shiftForWord()))));
 		print(" -> ");
-		printHex(longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
+		/* begin printHexnp: */
+		printf("0x%lx", longAt((oop + BaseHeaderSize) + (ValueIndex << (shiftForWord()))));
 	l1:	;
 	}
 l7:	/* end printOopShortInner: */;
@@ -72109,7 +72197,7 @@
 			print("page ");
 			/* begin printHexPtrnp: */
 			/* begin printHexnp: */
-			printf("0x%x", oopForPointer(page));
+			printf("0x%lx", oopForPointer(page));
 			/* begin cr */
 			printf("\n");
 			shortPrintFramesInPage(page);
@@ -72134,7 +72222,7 @@
 shortPrintOop(sqInt oop)
 {
 	/* begin printHexnp: */
-	printf("0x%x", oop);
+	printf("0x%lx", oop);
 	if ((oop & 3) != 0) {
 		if ((oop & 1)) {
 			printf("=%ld\n", (long)integerValueOf(oop));

Modified: branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
===================================================================
--- branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2014-12-17 22:59:41 UTC (rev 3191)
+++ branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c	2014-12-18 22:22:19 UTC (rev 3192)
@@ -2,11 +2,11 @@
 
 
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
    from
-	StackInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361
+	StackInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733
  */
-static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.991 uuid: 368647af-b954-4bf5-a526-3f83badb3361 " __DATE__ ;
+static char __buildInfo[] = "StackInterpreter VMMaker.oscog-eem.992 uuid: bbbe8c5f-97d3-42fe-b068-76c6890a1733 " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -2099,7 +2099,7 @@
 	/* 574 */ (void (*)(void))0,
 	/* 575 */ (void (*)(void))0,
  0 };
-const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.991";
+const char *interpreterVersion = "Newspeak Virtual Machine StackInterpreterPrimitives_VMMaker.oscog-eem.992";
 volatile int sendTrace;
 sqInt suppressHeartbeatFlag;
 
@@ -45188,27 +45188,27 @@
 	print("freeChunk ");
 	/* begin printHexPtrnp: */
 	/* begin printHexnp: */
-	printf("0x%x", oopForPointer(freeChunk));
+	printf("0x%lx", oopForPointer(freeChunk));
 	print(" bytes ");
 	printNum(numBytes);
 	print(" next ");
 	/* begin printHexPtrnp: */
 	/* begin printHexnp: */
-	printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (0 << (shiftForWord())))));
+	printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (0 << (shiftForWord())))));
 	if ((numBytes >= (32 * 8))
 	 && (!isNextChunk)) {
 		print(" ^ ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (2 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (2 << (shiftForWord())))));
 		print(" < ");
 		/* begin printHexPtrnp: */
 		/* begin printHexnp: */
-		printf("0x%x", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (3 << (shiftForWord())))));
+		printf("0x%lx", oopForPointer(longAt((freeChunk + BaseHeaderSize) + (3 << (shiftForWord())))));
 		print(" > ");

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list