[Vm-dev] [commit][3649] CogVM source as per VMMaker.oscog-eem.1740

commits at squeakvm.org commits at squeakvm.org
Thu Mar 24 00:43:19 UTC 2016


Revision: 3649
Author:   eliot
Date:     2016-03-23 17:43:16 -0700 (Wed, 23 Mar 2016)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1740

Allow primitiveUtcWithOffset to accept an optional parameter with an
array or object with two or more slots to store UTC posix microseconds
and time zone offset in seconds. Compatibility with VMM trunk.

Add a Smalltalk epoch version of it, primitiveUtcAndTimezoneOffset,
and give it primitive #244.

Ineger conversion routines:
Use little endian accelerators too for fetching 32 & 64 bits large
integers value (like the ones used for storing value).

Dramatically simplify fetching of signedInteger values by using an
intermediate unsigned magnitude.

Declare the positive32/64BitIntegerFor: and
maybeInlinePositive32BitIntegerFor: parameter as unsigned since
it is interpreted as positive.

Use asUnsignedInteger in isIntegerValue: tests, integerObjectOf: and
rotatedFloatBitsOf: in order to ban potential UB.

Simplify bit operations using positiveMachineIntegerValueOf:/
positiveMachineIntegerFor: rather than doing 32/64 bits dissertation.

Fetch magnitude of positive large ints into an unsigned for large int
bit ops.

Mac OS X Build:
Fix linking of the external UUIDPlugin

Modified Paths:
--------------
    branches/Cog/nsspur64src/vm/cogit.h
    branches/Cog/nsspur64src/vm/cogitX64.c
    branches/Cog/nsspur64src/vm/cointerp.c
    branches/Cog/nsspur64src/vm/cointerp.h
    branches/Cog/nsspur64src/vm/gcc3x-cointerp.c
    branches/Cog/nsspursrc/vm/cogit.h
    branches/Cog/nsspursrc/vm/cogitARMv5.c
    branches/Cog/nsspursrc/vm/cogitIA32.c
    branches/Cog/nsspursrc/vm/cogitMIPSEL.c
    branches/Cog/nsspursrc/vm/cointerp.c
    branches/Cog/nsspursrc/vm/cointerp.h
    branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
    branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
    branches/Cog/nsspurstack64src/vm/interp.c
    branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
    branches/Cog/nsspurstacksrc/vm/interp.c
    branches/Cog/spur64src/vm/cogit.h
    branches/Cog/spur64src/vm/cogitX64.c
    branches/Cog/spur64src/vm/cointerp.c
    branches/Cog/spur64src/vm/cointerp.h
    branches/Cog/spur64src/vm/gcc3x-cointerp.c
    branches/Cog/spursistasrc/vm/cogit.h
    branches/Cog/spursistasrc/vm/cogitARMv5.c
    branches/Cog/spursistasrc/vm/cogitIA32.c
    branches/Cog/spursistasrc/vm/cogitMIPSEL.c
    branches/Cog/spursistasrc/vm/cointerp.c
    branches/Cog/spursistasrc/vm/cointerp.h
    branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
    branches/Cog/spursrc/vm/cogit.h
    branches/Cog/spursrc/vm/cogitARMv5.c
    branches/Cog/spursrc/vm/cogitIA32.c
    branches/Cog/spursrc/vm/cogitMIPSEL.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/plugins/BitBltPlugin/BitBltPlugin.c
    branches/Cog/src/plugins/FilePlugin/FilePlugin.c
    branches/Cog/src/vm/cogit.h
    branches/Cog/src/vm/cogitARMv5.c
    branches/Cog/src/vm/cogitIA32.c
    branches/Cog/src/vm/cogitMIPSEL.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

Added Paths:
-----------
    branches/Cog/platforms/iOS/plugins/UUIDPlugin/Makefile

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

Modified: branches/Cog/nsspur64src/vm/cogit.h
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.h	2016-03-17 00:57:27 UTC (rev 3648)
+++ branches/Cog/nsspur64src/vm/cogit.h	2016-03-24 00:43:16 UTC (rev 3649)
@@ -1,5 +1,5 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-nice.1729 uuid: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668
+	CCodeGenerator VMMaker.oscog-eem.1740 uuid: 10ece78d-d04d-4ad2-8598-e496b6a6097c
  */
 
 

Modified: branches/Cog/nsspur64src/vm/cogitX64.c
===================================================================
--- branches/Cog/nsspur64src/vm/cogitX64.c	2016-03-17 00:57:27 UTC (rev 3648)
+++ branches/Cog/nsspur64src/vm/cogitX64.c	2016-03-24 00:43:16 UTC (rev 3649)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGenerator VMMaker.oscog-nice.1729 uuid: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668
+	CCodeGenerator VMMaker.oscog-eem.1740 uuid: 10ece78d-d04d-4ad2-8598-e496b6a6097c
    from
-	StackToRegisterMappingCogit VMMaker.oscog-nice.1729 uuid: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668
+	StackToRegisterMappingCogit VMMaker.oscog-eem.1740 uuid: 10ece78d-d04d-4ad2-8598-e496b6a6097c
  */
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-nice.1729 uuid: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1740 uuid: 10ece78d-d04d-4ad2-8598-e496b6a6097c " __DATE__ ;
 char *__cogitBuildInfo = __buildInfo;
 
 
@@ -3637,7 +3637,7 @@
 closedPICRefersToUnmarkedObject(CogMethod *cPIC)
 {
     sqInt i;
-    sqInt object;
+    usqInt object;
     sqInt pc;
 
 	if (!((isImmediate((cPIC->selector)))
@@ -5834,12 +5834,12 @@
 generateMapAtstart(sqInt addressOrNull, sqInt startAddress)
 {
     unsigned char annotation;
-    sqInt delta;
+    usqInt delta;
     sqInt i;
     AbstractInstruction *instruction;
     sqInt length;
-    sqInt location;
-    sqInt mapEntry;
+    usqInt location;
+    usqInt mapEntry;
     sqInt maxDelta;
     usqInt mcpc;
 

Modified: branches/Cog/nsspur64src/vm/cointerp.c
===================================================================
--- branches/Cog/nsspur64src/vm/cointerp.c	2016-03-17 00:57:27 UTC (rev 3648)
+++ branches/Cog/nsspur64src/vm/cointerp.c	2016-03-24 00:43:16 UTC (rev 3649)
@@ -1,9 +1,9 @@
 /* Automatically generated by
-	CCodeGeneratorGlobalStructure VMMaker.oscog-nice.1729 uuid: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668
+	CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1740 uuid: 10ece78d-d04d-4ad2-8598-e496b6a6097c
    from
-	CoInterpreter VMMaker.oscog-nice.1729 uuid: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668
+	CoInterpreter VMMaker.oscog-eem.1740 uuid: 10ece78d-d04d-4ad2-8598-e496b6a6097c
  */
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-nice.1729 uuid: 4f72e8e6-9dd6-4446-93c4-f85d1b4fa668 " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1740 uuid: 10ece78d-d04d-4ad2-8598-e496b6a6097c " __DATE__ ;
 char *__interpBuildInfo = __buildInfo;
 
 
@@ -573,7 +573,7 @@
 extern usqInt newMethodAddress(void);
 extern usqInt nextProfileTickAddress(void);
 extern sqInt noAssertHeaderOf(sqInt methodPointer);
-extern sqInt positive32BitIntegerFor(sqInt integerValue);
+extern sqInt positive32BitIntegerFor(unsigned int integerValue);
 static void NoDbgRegParms postGCAction(sqInt gcModeArg);
 static void NoDbgRegParms preGCAction(sqInt gcModeArg);
 extern sqInt primErrTable(void);
@@ -862,6 +862,7 @@
 static void primitiveUnloadModule(void);
 static void primitiveUpdateTimezone(void);
 static void primitiveUTCMicrosecondClock(void);
+static void primitiveUtcAndTimezoneOffset(void);
 EXPORT(sqInt) primitiveUtcWithOffset(void);
 static void primitiveVMPath(void);
 static void primitiveVMProfileSamplesInto(void);
@@ -894,6 +895,7 @@
 static sqInt NoDbgRegParms changeClassOfto(sqInt rcvr, sqInt argClass);
 static double NoDbgRegParms dbgFloatValueOf(sqInt oop);
 static sqInt NoDbgRegParms exponentOfSmallFloat(sqInt oop);
+static sqInt NoDbgRegParms fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop);
 extern sqInt floatObjectOf(double aFloat);
 extern double floatValueOf(sqInt oop);
 static sqInt NoDbgRegParms initFreeChunkWithBytesat(usqLong numBytes, sqInt address);
@@ -1449,7 +1451,7 @@
 extern sqInt popStack(void);
 extern sqInt pop(sqInt nItems);
 extern void popthenPush(sqInt nItems, sqInt oop);
-extern sqInt positive64BitIntegerFor(sqLong integerValue);
+extern sqInt positive64BitIntegerFor(usqLong integerValue);
 EXPORT(void) primitiveEventProcessingControl(void);
 extern sqInt primitiveIndexOfMethodheader(sqInt theMethod, sqInt methodHeader);
 extern sqInt primitiveIndexOf(sqInt methodPointer);
@@ -1645,11 +1647,11 @@
 _iss unsigned char primTraceLogIndex;
 _iss sqInt rememberedSetSize;
 _iss sqInt * rememberedSet;
-_iss sqInt remapBufferCount;
 _iss sqInt localAbsentReceiverOrZero;
 _iss usqInt freeListsMask;
 _iss StackPage * mostRecentlyUsedPage;
 _iss usqInt firstFreeChunk;
+_iss sqInt remapBufferCount;
 _iss sqInt tempOop;
 _iss SpurContiguousObjStack unscannedEphemerons;
 _iss sqInt numStackPages;
@@ -2074,7 +2076,7 @@
 	/* 241 */ primitiveLocalMicrosecondClock,
 	/* 242 */ primitiveSignalAtUTCMicroseconds,
 	/* 243 */ primitiveUpdateTimezone,
-	/* 244 */ (void (*)(void))0,
+	/* 244 */ primitiveUtcAndTimezoneOffset,
 	/* 245 */ (void (*)(void))0,
 	/* 246 */ (void (*)(void))0,
 	/* 247 */ primitiveSnapshotEmbedded,
@@ -2408,7 +2410,7 @@
 	/* 575 */ (void (*)(void))0,
  0 };
 static signed char primitiveAccessorDepthTable[MaxPrimitiveIndex + 2 /* 577 */] = {
-/*0*/	-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0,-1,-1, 0, 0, 0, 0, 0, 0,-1,
+/*0*/	-1,-1,-1, 0, 0, 0, 0, 0, 0, 0, 0,-1,-1, 0,-1,-1, 0, 0, 0,-1,
 /*20*/	0, 0, 0,-1,-1,-1,-1,-1,-1, 0, 0, 0, 0, 0,-1,-1,-1, 0, 0, 0,
 /*40*/	0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0,-1,-1,-1,-1,-1,
 /*60*/	0, 0, 1,-1,-1,-1,-1,-1, 0, 0,-1,-1, 0, 1, 1, 0, 0, 0, 0, 0,
@@ -2420,7 +2422,7 @@
 /*180*/	0,-1,-1, 0, 0, 0, 1, 1, 1, 0,-1,-1,-1,-1,-1, 1, 2,-1,-1,-1,
 /*200*/	-1, 2, 2, 2, 2, 2, 2,-1,-1,-1, 1, 1, 1, 1,-1, 1,-1,-1, 3,-1,
 /*220*/	-1, 2, 2,-1,-1,-1,-1,-1,-1,-1, 0,-1, 2, 0,-1,-1,-1,-1,-1,-1,
-/*240*/	-1,-1, 0,-1,-1,-1,-1,-1,-1,-1,-1, 0, 1,-1, 0,-1,-1,-1,-1,-1,
+/*240*/	-1,-1, 0,-1, 0,-1,-1,-1,-1,-1,-1, 0, 1,-1, 0,-1,-1,-1,-1,-1,
 /*260*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
 /*280*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
 /*300*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
@@ -2439,7 +2441,7 @@
 /*560*/	-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
 	};
 char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-nice.1729";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1740";
 sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
 volatile int sendTrace;
 
@@ -23671,7 +23673,7 @@
 
 	/* CoInterpreter>>#positive32BitIntegerFor: */
 sqInt
-positive32BitIntegerFor(sqInt integerValue)
+positive32BitIntegerFor(unsigned int integerValue)
 {
 	return (((integerValue & 0xFFFFFFFFULL) << 3) | 1);
 
@@ -28868,9 +28870,11 @@
 
 #  else /* VMBIGENDIAN */
 	if (sz > 4) {
-		long32Atput((newLargeInteger + BaseHeaderSize) + (1LL << 2), magnitude >> 32);
+		long64Atput((newLargeInteger + BaseHeaderSize) + (0LL << 3), magnitude);
 	}
-	long32Atput((newLargeInteger + BaseHeaderSize) + (0LL << 2), magnitude);
+	else {
+		long32Atput((newLargeInteger + BaseHeaderSize) + (0LL << 2), magnitude);
+	}
 
 #  endif /* VMBIGENDIAN */
 
@@ -28944,10 +28948,23 @@
 		}
 		return 0;
 	}
+	
+#  if VMBIGENDIAN
 	value = byteAt((oop + BaseHeaderSize) + (sz - 1));
 	for (i = (sz - 2); i >= 0; i += -1) {
 		value = (((long)value) << 8) + (byteAt((oop + BaseHeaderSize) + i));
 	}
+
+#  else /* VMBIGENDIAN */
+	if (sz > 4) {
+		value = ((usqLong) (long64At((oop + BaseHeaderSize) + (0LL << 3))));
+	}
+	else {
+		value = ((unsigned int) (long32At((oop + BaseHeaderSize) + (0LL << 2))));
+	}
+
+#  endif /* VMBIGENDIAN */
+
 	return value;
 }
 
@@ -29042,10 +29059,23 @@
 		}
 		return 0;
 	}
+	
+#  if VMBIGENDIAN
 	value = 0;
 	for (i = 0; i < sz; i += 1) {
 		value += ((long)(((usqLong) (byteAt((oop + BaseHeaderSize) + i))))) << (i * 8);
 	}
+
+#  else /* VMBIGENDIAN */
+	if (sz > 4) {
+		value = ((usqLong) (long64At((oop + BaseHeaderSize) + (0LL << 3))));
+	}
+	else {
+		value = ((unsigned int) (long32At((oop + BaseHeaderSize) + (0LL << 2))));
+	}
+
+#  endif /* VMBIGENDIAN */
+
 	return value;
 }
 
@@ -29125,7 +29155,7 @@
 #    if VMBIGENDIAN
 			(((byteAt((oop + BaseHeaderSize))) + (((long)(byteAt((oop + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop + BaseHeaderSize) + 3))) << 24)
 #    else /* VMBIGENDIAN */
-			long32At((oop + BaseHeaderSize) + (0LL << 2))
+			((unsigned int) (long32At((oop + BaseHeaderSize) + (0LL << 2))))
 #    endif /* VMBIGENDIAN */
 			;
 	}
@@ -29494,7 +29524,7 @@
     sqInt fmt;
     sqLong hdr;
     sqInt index;
-    sqInt integerValue;
+    unsigned int integerValue;
     usqInt numSlots;
     usqInt numSlots1;
     sqInt rcvr;
@@ -29615,7 +29645,7 @@
 			goto l8;
 		}
 		/* begin positive32BitIntegerFor: */
-		integerValue = long32At((rcvr + BaseHeaderSize) + (((long)((index + fixedFields) - 1)) << 2));
+		integerValue = ((unsigned int) (long32At((rcvr + BaseHeaderSize) + (((long)((index + fixedFields) - 1)) << 2))));
 		result = (((integerValue & 0xFFFFFFFFULL) << 3) | 1);
 		goto l8;
 
@@ -30182,33 +30212,182 @@
 	}
 }
 
+
+/*	Note no short-cut for SmallIntegers. Either the inline interpreter
+	bytecode or the JIT primitive will handle this case. */
+
 	/* InterpreterPrimitives>>#primitiveBitAnd */
 static void
 primitiveBitAnd(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    usqLong integerArgument;
-    usqLong integerReceiver;
+    sqInt bs;
+    sqInt bs1;
+    sqInt ccIndex;
+    sqInt ccIndex1;
+    sqInt fmt;
+    sqInt fmt1;
+    usqInt integerArgumentValue;
+    usqInt integerReceiverValue;
+    sqInt ok;
+    sqInt ok1;
     sqInt oop;
+    sqInt oop1;
+    sqInt oop2;
     char *sp;
+    sqInt value;
+    sqInt value1;
 
-	integerArgument = longAt(GIV(stackPointer));
+	/* begin positiveMachineIntegerValueOf: */
+	oop1 = longAt(GIV(stackPointer));
+	if ((((oop1) & 7) == 1)) {
+		value = (oop1 >> 3);
+		if (value < 0) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerArgumentValue = ((unsigned long) null);
+			goto l4;
+		}
+		integerArgumentValue = ((unsigned long) value);
+		goto l4;
+	}
+	if (oop1 & (tagMask())) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerArgumentValue = ((unsigned long) 0);
+		goto l4;
+	}
+	/* begin isClassOfNonImm:equalTo:compactClassIndex: */
+	assert(!(isImmediate(oop1)));
+	ccIndex = (longAt(oop1)) & (classIndexMask());
+	ok = ClassLargePositiveIntegerCompactIndex == ccIndex;
+	goto l3;
 
-	/* Comment out the short-cut.  Either the inline interpreter bytecode or the JIT primitive will handle this case.
-	   ((objectMemory isIntegerObject: integerArgument)
-	   and: [objectMemory isIntegerObject: integerReceiver])
-	   ifTrue: [self pop: 2 thenPush: (integerArgument bitAnd: integerReceiver)]
-	   ifFalse:
-	   [ */
-	integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord));
-	integerArgument = positive64BitValueOf(integerArgument);
-	integerReceiver = positive64BitValueOf(integerReceiver);
+l3:	/* end isClassOfNonImm:equalTo:compactClassIndex: */;
+	if (!ok) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerArgumentValue = ((unsigned long) 0);
+		goto l4;
+	}
+	/* begin numBytesOfBytes: */
+	fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask());
+	assert(fmt >= (firstByteFormat()));
+	bs = (((long)(numSlotsOf(oop1))) << (shiftForWord())) - (fmt & 7);
+	if (bs > (sizeof(unsigned long))) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerArgumentValue = ((unsigned long) 0);
+		goto l4;
+	}
+	if (((sizeof(unsigned long)) == 8)
+	 && (bs > 4)) {
+		integerArgumentValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((((((byteAt((oop1 + BaseHeaderSize))) + (((long)(byteAt((oop1 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 3))) << 24)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 4))) << 32)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 5))) << 40)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 6))) << 48)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 7))) << 56)
+#else /* VMBIGENDIAN */
+	long64At((oop1 + BaseHeaderSize) + (0LL << 3))
+#endif /* VMBIGENDIAN */
+	));
+		goto l4;
+	}
+	else {
+		integerArgumentValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((byteAt((oop1 + BaseHeaderSize))) + (((long)(byteAt((oop1 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 3))) << 24)
+#else /* VMBIGENDIAN */
+	((unsigned int) (long32At((oop1 + BaseHeaderSize) + (0LL << 2))))
+#endif /* VMBIGENDIAN */
+	));
+		goto l4;
+	}
+l4:	/* end positiveMachineIntegerValueOf: */;
+	/* begin positiveMachineIntegerValueOf: */
+	oop2 = longAt(GIV(stackPointer) + (1 * BytesPerWord));
+	if ((((oop2) & 7) == 1)) {
+		value1 = (oop2 >> 3);
+		if (value1 < 0) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerReceiverValue = ((unsigned long) null);
+			goto l7;
+		}
+		integerReceiverValue = ((unsigned long) value1);
+		goto l7;
+	}
+	if (oop2 & (tagMask())) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerReceiverValue = ((unsigned long) 0);
+		goto l7;
+	}
+	/* begin isClassOfNonImm:equalTo:compactClassIndex: */
+	assert(!(isImmediate(oop2)));
+	ccIndex1 = (longAt(oop2)) & (classIndexMask());
+	ok1 = ClassLargePositiveIntegerCompactIndex == ccIndex1;
+	goto l5;
+
+l5:	/* end isClassOfNonImm:equalTo:compactClassIndex: */;
+	if (!ok1) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerReceiverValue = ((unsigned long) 0);
+		goto l7;
+	}
+	/* begin numBytesOfBytes: */
+	fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask());
+	assert(fmt1 >= (firstByteFormat()));
+	bs1 = (((long)(numSlotsOf(oop2))) << (shiftForWord())) - (fmt1 & 7);
+	if (bs1 > (sizeof(unsigned long))) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerReceiverValue = ((unsigned long) 0);
+		goto l7;
+	}
+	if (((sizeof(unsigned long)) == 8)
+	 && (bs1 > 4)) {
+		integerReceiverValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((((((byteAt((oop2 + BaseHeaderSize))) + (((long)(byteAt((oop2 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 3))) << 24)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 4))) << 32)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 5))) << 40)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 6))) << 48)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 7))) << 56)
+#else /* VMBIGENDIAN */
+	long64At((oop2 + BaseHeaderSize) + (0LL << 3))
+#endif /* VMBIGENDIAN */
+	));
+		goto l7;
+	}
+	else {
+		integerReceiverValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((byteAt((oop2 + BaseHeaderSize))) + (((long)(byteAt((oop2 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 3))) << 24)
+#else /* VMBIGENDIAN */
+	((unsigned int) (long32At((oop2 + BaseHeaderSize) + (0LL << 2))))
+#endif /* VMBIGENDIAN */
+	));
+		goto l7;
+	}
+l7:	/* end positiveMachineIntegerValueOf: */;
 	if (!GIV(primFailCode)) {
 		/* begin pop:thenPush: */
-		oop = positive64BitIntegerFor(integerArgument & integerReceiver);
+		oop = positive64BitIntegerFor(integerArgumentValue & integerReceiverValue);
+
 		longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop);
 		GIV(stackPointer) = sp;
 	}
-
 }
 
 
@@ -30218,8 +30397,8 @@
 EXPORT(void)
 primitiveBitAndLargeIntegers(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqLong integerArg;
-    sqLong integerRcvr;
+    usqLong integerArg;
+    usqLong integerRcvr;
     sqInt oopResult;
     char *sp;
 
@@ -30236,33 +30415,182 @@
 	}
 }
 
+
+/*	Note no short-cut for SmallIntegers. Either the inline interpreter
+	bytecode or the JIT primitive will handle this case. */
+
 	/* InterpreterPrimitives>>#primitiveBitOr */
 static void
 primitiveBitOr(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    usqLong integerArgument;
-    usqLong integerReceiver;
+    sqInt bs;
+    sqInt bs1;
+    sqInt ccIndex;
+    sqInt ccIndex1;
+    sqInt fmt;
+    sqInt fmt1;
+    usqInt integerArgumentValue;
+    usqInt integerReceiverValue;
+    sqInt ok;
+    sqInt ok1;
     sqInt oop;
+    sqInt oop1;
+    sqInt oop2;
     char *sp;
+    sqInt value;
+    sqInt value1;
 
-	integerArgument = longAt(GIV(stackPointer));
+	/* begin positiveMachineIntegerValueOf: */
+	oop1 = longAt(GIV(stackPointer));
+	if ((((oop1) & 7) == 1)) {
+		value = (oop1 >> 3);
+		if (value < 0) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerArgumentValue = ((unsigned long) null);
+			goto l4;
+		}
+		integerArgumentValue = ((unsigned long) value);
+		goto l4;
+	}
+	if (oop1 & (tagMask())) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerArgumentValue = ((unsigned long) 0);
+		goto l4;
+	}
+	/* begin isClassOfNonImm:equalTo:compactClassIndex: */
+	assert(!(isImmediate(oop1)));
+	ccIndex = (longAt(oop1)) & (classIndexMask());
+	ok = ClassLargePositiveIntegerCompactIndex == ccIndex;
+	goto l3;
 
-	/* Comment out the short-cut.  Either the inline interpreter bytecode or the JIT primitive will handle this case.
-	   ((objectMemory isIntegerObject: integerArgument)
-	   and: [objectMemory isIntegerObject: integerReceiver])
-	   ifTrue: [self pop: 2 thenPush: (integerArgument bitOr: integerReceiver)]
-	   ifFalse:
-	   [ */
-	integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord));
-	integerArgument = positive64BitValueOf(integerArgument);
-	integerReceiver = positive64BitValueOf(integerReceiver);
+l3:	/* end isClassOfNonImm:equalTo:compactClassIndex: */;
+	if (!ok) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerArgumentValue = ((unsigned long) 0);
+		goto l4;
+	}
+	/* begin numBytesOfBytes: */
+	fmt = (((usqInt) (longAt(oop1))) >> (formatShift())) & (formatMask());
+	assert(fmt >= (firstByteFormat()));
+	bs = (((long)(numSlotsOf(oop1))) << (shiftForWord())) - (fmt & 7);
+	if (bs > (sizeof(unsigned long))) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerArgumentValue = ((unsigned long) 0);
+		goto l4;
+	}
+	if (((sizeof(unsigned long)) == 8)
+	 && (bs > 4)) {
+		integerArgumentValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((((((byteAt((oop1 + BaseHeaderSize))) + (((long)(byteAt((oop1 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 3))) << 24)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 4))) << 32)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 5))) << 40)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 6))) << 48)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 7))) << 56)
+#else /* VMBIGENDIAN */
+	long64At((oop1 + BaseHeaderSize) + (0LL << 3))
+#endif /* VMBIGENDIAN */
+	));
+		goto l4;
+	}
+	else {
+		integerArgumentValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((byteAt((oop1 + BaseHeaderSize))) + (((long)(byteAt((oop1 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 3))) << 24)
+#else /* VMBIGENDIAN */
+	((unsigned int) (long32At((oop1 + BaseHeaderSize) + (0LL << 2))))
+#endif /* VMBIGENDIAN */
+	));
+		goto l4;
+	}
+l4:	/* end positiveMachineIntegerValueOf: */;
+	/* begin positiveMachineIntegerValueOf: */
+	oop2 = longAt(GIV(stackPointer) + (1 * BytesPerWord));
+	if ((((oop2) & 7) == 1)) {
+		value1 = (oop2 >> 3);
+		if (value1 < 0) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerReceiverValue = ((unsigned long) null);
+			goto l7;
+		}
+		integerReceiverValue = ((unsigned long) value1);
+		goto l7;
+	}
+	if (oop2 & (tagMask())) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerReceiverValue = ((unsigned long) 0);
+		goto l7;
+	}
+	/* begin isClassOfNonImm:equalTo:compactClassIndex: */
+	assert(!(isImmediate(oop2)));
+	ccIndex1 = (longAt(oop2)) & (classIndexMask());
+	ok1 = ClassLargePositiveIntegerCompactIndex == ccIndex1;
+	goto l5;
+
+l5:	/* end isClassOfNonImm:equalTo:compactClassIndex: */;
+	if (!ok1) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerReceiverValue = ((unsigned long) 0);
+		goto l7;
+	}
+	/* begin numBytesOfBytes: */
+	fmt1 = (((usqInt) (longAt(oop2))) >> (formatShift())) & (formatMask());
+	assert(fmt1 >= (firstByteFormat()));
+	bs1 = (((long)(numSlotsOf(oop2))) << (shiftForWord())) - (fmt1 & 7);
+	if (bs1 > (sizeof(unsigned long))) {
+		/* begin primitiveFail */
+		if (!GIV(primFailCode)) {
+			GIV(primFailCode) = 1;
+		}
+		integerReceiverValue = ((unsigned long) 0);
+		goto l7;
+	}
+	if (((sizeof(unsigned long)) == 8)
+	 && (bs1 > 4)) {
+		integerReceiverValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((((((byteAt((oop2 + BaseHeaderSize))) + (((long)(byteAt((oop2 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 3))) << 24)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 4))) << 32)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 5))) << 40)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 6))) << 48)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 7))) << 56)
+#else /* VMBIGENDIAN */
+	long64At((oop2 + BaseHeaderSize) + (0LL << 3))
+#endif /* VMBIGENDIAN */
+	));
+		goto l7;
+	}
+	else {
+		integerReceiverValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((byteAt((oop2 + BaseHeaderSize))) + (((long)(byteAt((oop2 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop2 + BaseHeaderSize) + 3))) << 24)
+#else /* VMBIGENDIAN */
+	((unsigned int) (long32At((oop2 + BaseHeaderSize) + (0LL << 2))))
+#endif /* VMBIGENDIAN */
+	));
+		goto l7;
+	}
+l7:	/* end positiveMachineIntegerValueOf: */;
 	if (!GIV(primFailCode)) {
 		/* begin pop:thenPush: */
-		oop = positive64BitIntegerFor(integerArgument | integerReceiver);
+		oop = positive64BitIntegerFor(integerArgumentValue | integerReceiverValue);
+
 		longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop);
 		GIV(stackPointer) = sp;
 	}
-
 }
 
 
@@ -30272,8 +30600,8 @@
 EXPORT(void)
 primitiveBitOrLargeIntegers(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqLong integerArg;
-    sqLong integerRcvr;
+    usqLong integerArg;
+    usqLong integerRcvr;
     sqInt oopResult;
     char *sp;
 
@@ -30435,12 +30763,24 @@
 static void
 primitiveBitXor(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    usqLong integerArgument;
-    usqLong integerReceiver;
+    sqInt bs;
+    sqInt bs1;
+    sqInt ccIndex;
+    sqInt ccIndex1;
+    sqInt fmt;
+    sqInt fmt1;
+    sqInt integerArgument;
+    usqInt integerArgumentValue;
+    sqInt integerReceiver;
+    usqInt integerReceiverValue;
+    sqInt ok;
+    sqInt ok1;
     sqInt oop;
     sqInt oop1;
     char *sp;
     char *sp1;
+    sqInt value;
+    sqInt value1;
 
 	integerArgument = longAt(GIV(stackPointer));
 	integerReceiver = longAt(GIV(stackPointer) + (1 * BytesPerWord));
@@ -30454,15 +30794,155 @@
 		GIV(stackPointer) = sp;
 	}
 	else {
-		integerArgument = positive64BitValueOf(integerArgument);
-		integerReceiver = positive64BitValueOf(integerReceiver);
+		/* begin positiveMachineIntegerValueOf: */
+		if ((((integerArgument) & 7) == 1)) {
+			value = (integerArgument >> 3);
+			if (value < 0) {
+				/* begin primitiveFail */
+				if (!GIV(primFailCode)) {
+					GIV(primFailCode) = 1;
+				}
+				integerArgumentValue = ((unsigned long) null);
+				goto l4;
+			}
+			integerArgumentValue = ((unsigned long) value);
+			goto l4;
+		}
+		if (integerArgument & (tagMask())) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerArgumentValue = ((unsigned long) 0);
+			goto l4;
+		}
+		/* begin isClassOfNonImm:equalTo:compactClassIndex: */
+		assert(!(isImmediate(integerArgument)));
+		ccIndex = (longAt(integerArgument)) & (classIndexMask());
+		ok = ClassLargePositiveIntegerCompactIndex == ccIndex;
+		goto l3;
+
+	l3:	/* end isClassOfNonImm:equalTo:compactClassIndex: */;
+		if (!ok) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerArgumentValue = ((unsigned long) 0);
+			goto l4;
+		}
+		/* begin numBytesOfBytes: */
+		fmt = (((usqInt) (longAt(integerArgument))) >> (formatShift())) & (formatMask());
+		assert(fmt >= (firstByteFormat()));
+		bs = (((long)(numSlotsOf(integerArgument))) << (shiftForWord())) - (fmt & 7);
+		if (bs > (sizeof(unsigned long))) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerArgumentValue = ((unsigned long) 0);
+			goto l4;
+		}
+		if (((sizeof(unsigned long)) == 8)
+		 && (bs > 4)) {
+			integerArgumentValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((((((byteAt((integerArgument + BaseHeaderSize))) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 3))) << 24)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 4))) << 32)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 5))) << 40)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 6))) << 48)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 7))) << 56)
+#else /* VMBIGENDIAN */
+	long64At((integerArgument + BaseHeaderSize) + (0LL << 3))
+#endif /* VMBIGENDIAN */
+	));
+			goto l4;
+		}
+		else {
+			integerArgumentValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((byteAt((integerArgument + BaseHeaderSize))) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((integerArgument + BaseHeaderSize) + 3))) << 24)
+#else /* VMBIGENDIAN */
+	((unsigned int) (long32At((integerArgument + BaseHeaderSize) + (0LL << 2))))
+#endif /* VMBIGENDIAN */
+	));
+			goto l4;
+		}
+	l4:	/* end positiveMachineIntegerValueOf: */;
+		/* begin positiveMachineIntegerValueOf: */
+		if ((((integerReceiver) & 7) == 1)) {
+			value1 = (integerReceiver >> 3);
+			if (value1 < 0) {
+				/* begin primitiveFail */
+				if (!GIV(primFailCode)) {
+					GIV(primFailCode) = 1;
+				}
+				integerReceiverValue = ((unsigned long) null);
+				goto l7;
+			}
+			integerReceiverValue = ((unsigned long) value1);
+			goto l7;
+		}
+		if (integerReceiver & (tagMask())) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerReceiverValue = ((unsigned long) 0);
+			goto l7;
+		}
+		/* begin isClassOfNonImm:equalTo:compactClassIndex: */
+		assert(!(isImmediate(integerReceiver)));
+		ccIndex1 = (longAt(integerReceiver)) & (classIndexMask());
+		ok1 = ClassLargePositiveIntegerCompactIndex == ccIndex1;
+		goto l5;
+
+	l5:	/* end isClassOfNonImm:equalTo:compactClassIndex: */;
+		if (!ok1) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerReceiverValue = ((unsigned long) 0);
+			goto l7;
+		}
+		/* begin numBytesOfBytes: */
+		fmt1 = (((usqInt) (longAt(integerReceiver))) >> (formatShift())) & (formatMask());
+		assert(fmt1 >= (firstByteFormat()));
+		bs1 = (((long)(numSlotsOf(integerReceiver))) << (shiftForWord())) - (fmt1 & 7);
+		if (bs1 > (sizeof(unsigned long))) {
+			/* begin primitiveFail */
+			if (!GIV(primFailCode)) {
+				GIV(primFailCode) = 1;
+			}
+			integerReceiverValue = ((unsigned long) 0);
+			goto l7;
+		}
+		if (((sizeof(unsigned long)) == 8)
+		 && (bs1 > 4)) {
+			integerReceiverValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((((((byteAt((integerReceiver + BaseHeaderSize))) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 3))) << 24)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 4))) << 32)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 5))) << 40)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 6))) << 48)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 7))) << 56)
+#else /* VMBIGENDIAN */
+	long64At((integerReceiver + BaseHeaderSize) + (0LL << 3))
+#endif /* VMBIGENDIAN */
+	));
+			goto l7;
+		}
+		else {
+			integerReceiverValue = ((unsigned long) (
+#if VMBIGENDIAN
+	(((byteAt((integerReceiver + BaseHeaderSize))) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((integerReceiver + BaseHeaderSize) + 3))) << 24)
+#else /* VMBIGENDIAN */
+	((unsigned int) (long32At((integerReceiver + BaseHeaderSize) + (0LL << 2))))
+#endif /* VMBIGENDIAN */
+	));
+			goto l7;
+		}
+	l7:	/* end positiveMachineIntegerValueOf: */;
 		if (!GIV(primFailCode)) {
 			/* begin pop:thenPush: */
-			oop1 = positive64BitIntegerFor(integerArgument ^ integerReceiver);
+			oop1 = positive64BitIntegerFor(integerArgumentValue ^ integerReceiverValue);
+
 			longAtput((sp1 = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop1);
 			GIV(stackPointer) = sp1;
 		}
-
 	}
 }
 
@@ -30473,8 +30953,8 @@
 EXPORT(void)
 primitiveBitXorLargeIntegers(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqLong integerArg;
-    sqLong integerRcvr;
+    usqLong integerArg;
+    usqLong integerRcvr;
     sqInt oopResult;
     char *sp;
 
@@ -30796,8 +31276,6 @@
 EXPORT(sqInt)
 primitiveClockLogAddresses(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt integerValue;
-    sqInt integerValue1;
     sqInt midx;
     void *msecs;
     sqInt objOop;
@@ -30848,14 +31326,12 @@
 	assert(!(isForwarded(objOop)));
 	longAtput((objOop + BaseHeaderSize) + (0LL << (shiftForWord())), ((runInNOut << 3) | 1));
 	/* begin positive32BitIntegerFor: */
-	integerValue = ((usqInt)usecs);
-	v1 = (((integerValue & 0xFFFFFFFFULL) << 3) | 1);
+	v1 = ((((((unsigned int) (((usqInt)usecs)))) & 0xFFFFFFFFULL) << 3) | 1);
 	goto l3;
 
 l3:	/* end positive32BitIntegerFor: */;
 	/* begin positive32BitIntegerFor: */
-	integerValue1 = ((usqInt)msecs);
-	v2 = (((integerValue1 & 0xFFFFFFFFULL) << 3) | 1);
+	v2 = ((((((unsigned int) (((usqInt)msecs)))) & 0xFFFFFFFFULL) << 3) | 1);
 	goto l4;
 
 l4:	/* end positive32BitIntegerFor: */;
@@ -32665,18 +33141,12 @@
 static void
 primitiveFloatAt(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt bits;
-    sqInt bits1;
-    sqInt fieldIndex;
-    sqInt fieldIndex1;
     sqInt index;
-    sqInt integerValue;
-    sqInt integerValue1;
+    unsigned int integerValue;
+    unsigned int integerValue1;
     sqInt rcvr;
     sqInt reasonCode;
     usqInt result;
-    sqInt rot;
-    sqInt rot1;
     char *sp;
     char *sp1;
 
@@ -32684,25 +33154,9 @@
 	index = longAt(GIV(stackPointer));
 	if (index == ConstOne) {
 		/* begin positive32BitIntegerFor: */
-		fieldIndex = (VMBIGENDIAN
-			? 0
-			: 1);
-		if (!(rcvr & (smallFloatTag()))) {
-			integerValue = long32At((rcvr + BaseHeaderSize) + (((long)fieldIndex) << 2));
-			goto l4;
-		}
-		/* begin smallFloatBitsOf: */
-		assert(isImmediateFloat(rcvr));
-		rot = ((usqInt) (((usqInt)rcvr))) >> (numTagBits());
-		if (rot > 1) {
-
-			/* a.k.a. ~= +/-0.0 */
-			rot += ((long)(smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1);
-		}
-		rot = (((long)rot) << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1);
-		bits = rot;
-		integerValue = (((int *) ((&bits))))[fieldIndex];
-	l4:	/* end fetchLong32:ofFloatObject: */;
+		integerValue = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN
+	? 0
+	: 1), rcvr)));
 		result = (((integerValue & 0xFFFFFFFFULL) << 3) | 1);
 		goto l1;
 
@@ -32714,25 +33168,9 @@
 	}
 	if (index == ConstTwo) {
 		/* begin positive32BitIntegerFor: */
-		fieldIndex1 = (VMBIGENDIAN
-			? 1
-			: 0);
-		if (!(rcvr & (smallFloatTag()))) {
-			integerValue1 = long32At((rcvr + BaseHeaderSize) + (((long)fieldIndex1) << 2));
-			goto l5;
-		}
-		/* begin smallFloatBitsOf: */
-		assert(isImmediateFloat(rcvr));
-		rot1 = ((usqInt) (((usqInt)rcvr))) >> (numTagBits());
-		if (rot1 > 1) {
-
-			/* a.k.a. ~= +/-0.0 */
-			rot1 += ((long)(smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1);
-		}
-		rot1 = (((long)rot1) << 0x3F) + (((usqInt) (((unsigned long)rot1))) >> 1);
-		bits1 = rot1;
-		integerValue1 = (((int *) ((&bits1))))[fieldIndex1];
-	l5:	/* end fetchLong32:ofFloatObject: */;
+		integerValue1 = ((unsigned int) (fetchLong32ofFloatObject((VMBIGENDIAN
+	? 1
+	: 0), rcvr)));
 		result = (((integerValue1 & 0xFFFFFFFFULL) << 3) | 1);
 		goto l2;
 
@@ -34672,7 +35110,7 @@
 EXPORT(sqInt)
 primitiveHeartbeatFrequency(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt integerValue;
+    unsigned int integerValue;
     sqInt oop;
     sqInt reset;
     char *sp;
@@ -34680,7 +35118,7 @@
 	reset = (GIV(argumentCount) == 1)
 	 && ((longAt(GIV(stackPointer))) == GIV(trueObj));
 	/* begin pop:thenPush: */
-	integerValue = ioHeartbeatFrequency(reset);
+	integerValue = ((unsigned int) (ioHeartbeatFrequency(reset)));
 	oop = (((integerValue & 0xFFFFFFFFULL) << 3) | 1);
 	goto l1;
 
@@ -34906,7 +35344,7 @@
 				/* begin rotatedFloatBitsOf: */
 				assert(isImmediateFloat(oop));
 				value = (((usqInt) (((usqInt)oop))) >> ((numTagBits()) + 1)) + ((oop & (1LL << (numTagBits()))
-	? -1LL << ((64 - (numTagBits())) - 1)
+	? ((long)(((usqInt)-1))) << ((64 - (numTagBits())) - 1)
 	: 0));
 			}
 			else {
@@ -36633,7 +37071,7 @@
 #    if VMBIGENDIAN
 			(((byteAt((oop1 + BaseHeaderSize))) + (((long)(byteAt((oop1 + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop1 + BaseHeaderSize) + 3))) << 24)
 #    else /* VMBIGENDIAN */
-			long32At((oop1 + BaseHeaderSize) + (0LL << 2))
+			((unsigned int) (long32At((oop1 + BaseHeaderSize) + (0LL << 2))))
 #    endif /* VMBIGENDIAN */
 			;
 		goto l5;
@@ -38312,12 +38750,12 @@
 static void
 primitiveSecondsClock(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    sqInt integerValue;
+    unsigned int integerValue;
     sqInt oop;
     char *sp;
 
 	/* begin pop:thenPush: */
-	integerValue = ioSecondsNow();
+	integerValue = ((unsigned int) (ioSecondsNow()));
 	oop = (((integerValue & 0xFFFFFFFFULL) << 3) | 1);
 	goto l1;
 
@@ -40424,7 +40862,7 @@
     sqInt fmt;
     sqLong hdr;
     sqInt index;
-    sqInt integerValue;
+    unsigned int integerValue;
     usqInt numSlots;
     usqInt numSlots1;
     sqInt rcvr;
@@ -40545,7 +40983,7 @@
 			goto l8;
 		}
 		/* begin positive32BitIntegerFor: */
-		integerValue = long32At((rcvr + BaseHeaderSize) + (((long)((index + fixedFields) - 1)) << 2));
+		integerValue = ((unsigned int) (long32At((rcvr + BaseHeaderSize) + (((long)((index + fixedFields) - 1)) << 2))));
 		result = (((integerValue & 0xFFFFFFFFULL) << 3) | 1);
 		goto l8;
 
@@ -41625,56 +42063,111 @@
 }
 
 
-/*	Answer an array with UTC microseconds since the Posix epoch and
-	the current seconds offset from GMT in the local time zone.
+/*	Answer an array with UTC microseconds since the Smalltalk epoch and the
+	current seconds offset from GMT in the local time zone. Any pointer object
+	with two or more slots) may be supplied as a parameter. */
+
+	/* InterpreterPrimitives>>#primitiveUtcAndTimezoneOffset */
+static void
+primitiveUtcAndTimezoneOffset(void)
+{   DECL_MAYBE_SQ_GLOBAL_STRUCT
+    sqInt resultArray;
+    char *sp;
+    sqInt valuePointer;
+    sqInt valuePointer1;
+
+	if (GIV(argumentCount) > 0) {
+		if (GIV(argumentCount) > 1) {
+			(GIV(primFailCode) = PrimErrBadNumArgs);
+			return;
+		}
+		resultArray = longAt(GIV(stackPointer));
+		if (!((((resultArray & (tagMask())) == 0)
+			 && (((((usqInt) (longAt(resultArray))) >> (formatShift())) & (formatMask())) <= 5))
+			 && ((lengthOfformat(resultArray, (((usqInt) (longAt(resultArray))) >> (formatShift())) & (formatMask()))) >= 2))) {
+			(GIV(primFailCode) = PrimErrBadArgument);
+			return;
+		}
+	}
+	else {
+		resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)ClassArray) << (shiftForWord()))), 2);
+	}
+	/* begin storePointerUnchecked:ofObject:withValue: */
+	valuePointer = (((ioLocalSecondsOffset()) << 3) | 1);
+	assert(!(isForwarded(resultArray)));
+	longAtput((resultArray + BaseHeaderSize) + (1LL << (shiftForWord())), valuePointer);
+	/* begin storePointer:ofObject:withValue: */
+	valuePointer1 = positive64BitIntegerFor(ioUTCMicroseconds());
+	assert(!(isForwarded(resultArray)));
+	if (isOldObject(resultArray)) {
+
+		/* most stores into young objects */
+		if (((valuePointer1 & (tagMask())) == 0)
+		 && (oopisLessThan(valuePointer1, GIV(newSpaceLimit)))) {
+			/* begin possibleRootStoreInto: */
+			if (!(((((usqInt) (longAt(resultArray))) >> (rememberedBitShift())) & 1) != 0)) {
+				remember(resultArray);
+			}
+		}
+	}
+	longAtput((resultArray + BaseHeaderSize) + (0LL << (shiftForWord())), valuePointer1);
+	/* begin pop:thenPush: */
+	longAtput((sp = GIV(stackPointer) + ((GIV(argumentCount) - 1) * BytesPerWord)), resultArray);
+	GIV(stackPointer) = sp;
+}
+
+
+/*	Answer an array with UTC microseconds since the Posix epoch and the
+	current seconds offset from GMT in the local time zone. An empty two
+	element array (or any object with two or more slots) may be supplied
+	as a parameter.
 	This is a named (not numbered) primitive in the null module (ie the VM) */
 
 	/* InterpreterPrimitives>>#primitiveUtcWithOffset */
 EXPORT(sqInt)
 primitiveUtcWithOffset(void)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
-    static usqLong epochDelta= 2177452800000000ULL;
-    sqLong offset;
-    sqInt oop;
-    sqInt oop1;
+    static usqLong epochDelta = 2177452800000000ULL;
     sqInt resultArray;
     char *sp;
-    usqLong utcMicroseconds;
     sqInt valuePointer;
+    sqInt valuePointer1;
 
-	utcMicroseconds = ioUTCMicroseconds();
-	offset = (ioLocalMicroseconds()) - utcMicroseconds;
-	offset = offset / 1000000;
-	/* begin pushRemappableOop: */
-	oop = positive64BitIntegerFor(utcMicroseconds - epochDelta);
-	assert(addressCouldBeOop(oop));
-	GIV(remapBuffer)[(GIV(remapBufferCount) += 1)] = oop;
-	if (!(GIV(remapBufferCount) <= RemapBufferSize)) {
-		error("remapBuffer overflow");
+	if (GIV(argumentCount) > 0) {
+		if (GIV(argumentCount) > 1) {
+			return (GIV(primFailCode) = PrimErrBadNumArgs);
+		}
+		resultArray = longAt(GIV(stackPointer));
+		if (!((((resultArray & (tagMask())) == 0)
+			 && (((((usqInt) (longAt(resultArray))) >> (formatShift())) & (formatMask())) <= 5))
+			 && ((lengthOfformat(resultArray, (((usqInt) (longAt(resultArray))) >> (formatShift())) & (formatMask()))) >= 2))) {
+			return (GIV(primFailCode) = PrimErrBadArgument);
+		}
 	}
-	resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)ClassArray) << (shiftForWord()))), 2);
+	else {
+		resultArray = instantiateClassindexableSize(longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)ClassArray) << (shiftForWord()))), 2);
+	}
+	/* begin storePointerUnchecked:ofObject:withValue: */
+	valuePointer = (((ioLocalSecondsOffset()) << 3) | 1);
+	assert(!(isForwarded(resultArray)));
+	longAtput((resultArray + BaseHeaderSize) + (1LL << (shiftForWord())), valuePointer);
 	/* begin storePointer:ofObject:withValue: */
-	oop1 = GIV(remapBuffer)[GIV(remapBufferCount)];
-	GIV(remapBufferCount) -= 1;
-	valuePointer = oop1;
+	valuePointer1 = positive64BitIntegerFor((ioUTCMicroseconds()) - epochDelta);
 	assert(!(isForwarded(resultArray)));
 	if (isOldObject(resultArray)) {
 
 		/* most stores into young objects */
-		if (((valuePointer & (tagMask())) == 0)
-		 && (oopisLessThan(valuePointer, GIV(newSpaceLimit)))) {
+		if (((valuePointer1 & (tagMask())) == 0)
+		 && (oopisLessThan(valuePointer1, GIV(newSpaceLimit)))) {
 			/* begin possibleRootStoreInto: */
 			if (!(((((usqInt) (longAt(resultArray))) >> (rememberedBitShift())) & 1) != 0)) {
 				remember(resultArray);
 			}
 		}
 	}
-	longAtput((resultArray + BaseHeaderSize) + (0LL << (shiftForWord())), valuePointer);
-	/* begin storePointerUnchecked:ofObject:withValue: */
-	assert(!(isForwarded(resultArray)));
-	longAtput((resultArray + BaseHeaderSize) + (1LL << (shiftForWord())), ((offset << 3) | 1));
+	longAtput((resultArray + BaseHeaderSize) + (0LL << (shiftForWord())), valuePointer1);
 	/* begin pop:thenPush: */
-	longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), resultArray);
+	longAtput((sp = GIV(stackPointer) + ((GIV(argumentCount) - 1) * BytesPerWord)), resultArray);
 	GIV(stackPointer) = sp;
 	return 0;
 }
@@ -41821,6 +42314,7 @@
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt ccIndex;
     sqInt ccIndex1;
+    unsigned int magnitude;
     sqInt negative;
     sqInt ok;
     int value;
@@ -41881,28 +42375,29 @@
 		}
 		return null;
 	}
-	value = 
+	magnitude = 
 #  if VMBIGENDIAN
 		(((byteAt((oop + BaseHeaderSize))) + (((long)(byteAt((oop + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop + BaseHeaderSize) + 3))) << 24)
 #  else /* VMBIGENDIAN */
-		long32At((oop + BaseHeaderSize) + (0LL << 2))
+		((usqInt)(long32At((oop + BaseHeaderSize) + (0LL << 2))))
 #  endif /* VMBIGENDIAN */
 		;
-	if (value < 0) {
-		assert((sizeof(value)) == 4);
-		if (negative
-		 && (0 == (((long)value) << 1))) {
-			return value;
-		}
+	if ((negative
+		? magnitude > 0x80000000ULL
+		: magnitude >= 0x80000000ULL)) {
 		/* begin primitiveFail */
 		if (!GIV(primFailCode)) {
 			GIV(primFailCode) = 1;
 		}
 		return 0;
 	}
-	return (negative
-		? 0 - value
-		: value);
+	if (negative) {
+		value = 0 - magnitude;
+	}
+	else {
+		value = magnitude;
+	}
+	return value;
 }
 
 
@@ -41919,6 +42414,7 @@
     sqInt ccIndex1;
     sqInt fmt;
     sqInt i;
+    usqLong magnitude;
     sqInt negative;
     sqInt ok;
     sqInt sz;
@@ -41974,37 +42470,37 @@
 	}
 	
 #  if VMBIGENDIAN
-	value = byteAt((oop + BaseHeaderSize) + (sz - 1));
+	magnitude = byteAt((oop + BaseHeaderSize) + (sz - 1));
 	for (i = (sz - 2); i >= 0; i += -1) {
-		value = (((long)value) << 8) + (byteAt((oop + BaseHeaderSize) + i));
+		magnitude = (((long)magnitude) << 8) + (byteAt((oop + BaseHeaderSize) + i));
 	}
 
 #  else /* VMBIGENDIAN */
 	if (sz > 4) {
-		value = long64At((oop + BaseHeaderSize) + (0LL << 3));
+		magnitude = long64At((oop + BaseHeaderSize) + (0LL << 3));
 	}
 	else {
-		value = ((usqInt)(long32At((oop + BaseHeaderSize) + (0LL << 2))));
+		magnitude = ((unsigned int) (long32At((oop + BaseHeaderSize) + (0LL << 2))));
 	}
 
 #  endif /* VMBIGENDIAN */
 
-	if (value < 0) {
-		assert((sizeof(value)) == 8);
-		assert((sizeof(((long)value) << 1)) == 8);
-		if (negative
-		 && (0 == (((long)value) << 1))) {
-			return value;
-		}
+	if ((negative
+		? magnitude > 0x8000000000000000ULL
+		: magnitude >= 0x8000000000000000ULL)) {
 		/* begin primitiveFail */
 		if (!GIV(primFailCode)) {
 			GIV(primFailCode) = 1;
 		}
 		return 0;
 	}
-	return (negative
-		? 0 - value
-		: value);
+	if (negative) {
+		value = 0 - magnitude;
+	}
+	else {
+		value = magnitude;
+	}
+	return value;
 }
 
 
@@ -42021,6 +42517,8 @@
     sqInt ccIndex;
     sqInt ccIndex1;
     sqInt fmt;
+    usqInt limit;
+    usqInt magnitude;
     sqInt negative;
     usqInt numBytes;
     usqInt numSlots;
@@ -42099,7 +42597,7 @@
 	}
 	if (((sizeof(unsigned long)) == 8)
 	 && (bs > 4)) {
-		value = 
+		magnitude = 
 #    if VMBIGENDIAN
 			(((((((byteAt((oop + BaseHeaderSize))) + (((long)(byteAt((oop + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop + BaseHeaderSize) + 3))) << 24)) + (((long)(byteAt((oop + BaseHeaderSize) + 4))) << 32)) + (((long)(byteAt((oop + BaseHeaderSize) + 5))) << 40)) + (((long)(byteAt((oop + BaseHeaderSize) + 6))) << 48)) + (((long)(byteAt((oop + BaseHeaderSize) + 7))) << 56)
 #    else /* VMBIGENDIAN */
@@ -42108,7 +42606,7 @@
 			;
 	}
 	else {
-		value = 
+		magnitude = 
 #    if VMBIGENDIAN
 			(((byteAt((oop + BaseHeaderSize))) + (((long)(byteAt((oop + BaseHeaderSize) + 1))) << 8)) + (((long)(byteAt((oop + BaseHeaderSize) + 2))) << 16)) + (((long)(byteAt((oop + BaseHeaderSize) + 3))) << 24)
 #    else /* VMBIGENDIAN */
@@ -42116,24 +42614,23 @@
 #    endif /* VMBIGENDIAN */
 			;
 	}
-	if (value < 0) {
-
-		/* Don't fail for -16r80000000[00000000].
-		   Alas the simple (negative and: [value - 1 > 0]) isn't adequate since in C the result of signed integer
-		   overflow is undefined and hence under optimization this may fail.  The shift, however, is well-defined. */
-		if (negative
-		 && (0 == (((long)value) << 1))) {
-			return value;
-		}
+	limit = ((long)(((usqInt)1))) << (((sizeof(usqInt)) * 8) - 1);
+	if ((negative
+		? magnitude > limit
+		: magnitude >= limit)) {
 		/* begin primitiveFail */
 		if (!GIV(primFailCode)) {
 			GIV(primFailCode) = 1;
 		}
-		return null;
+		return 0;
 	}
-	return (negative
-		? 0 - value
-		: value);
+	if (negative) {
+		value = 0 - magnitude;
+	}
+	else {
+		value = magnitude;
+	}
+	return value;
 }
 
 
@@ -43150,6 +43647,32 @@
 			(exp + (smallFloatExponentOffset())) - 0x3FE));
 }
 
+
+/*	index by word size, and return a pointer as long as the word size */
+
+	/* Spur64BitMemoryManager>>#fetchLong32:ofFloatObject: */
+static sqInt NoDbgRegParms
+fetchLong32ofFloatObject(sqInt fieldIndex, sqInt oop)
+{
+    sqInt bits;
+    sqInt rot;
+
+	if (!(oop & (smallFloatTag()))) {
+		return long32At((oop + BaseHeaderSize) + (((long)fieldIndex) << 2));
+	}
+	/* begin smallFloatBitsOf: */
+	assert(isImmediateFloat(oop));
+	rot = ((usqInt) (((usqInt)oop))) >> (numTagBits());
+	if (rot > 1) {
+
+		/* a.k.a. ~= +/-0.0 */
+		rot += ((long)(smallFloatExponentOffset())) << ((smallFloatMantissaBits()) + 1);
+	}
+	rot = (((long)rot) << 0x3F) + (((usqInt) (((unsigned long)rot))) >> 1);
+	bits = rot;
+	return (((int *) ((&bits))))[fieldIndex];
+}
+
 	/* Spur64BitMemoryManager>>#floatObjectOf: */
 sqInt
 floatObjectOf(double aFloat)
@@ -43453,7 +43976,7 @@
 sqInt
 integerObjectOf(sqInt value)
 {
-	return (((long)value) << (numTagBits())) + 1;
+	return (((long)(((usqInt)value))) << (numTagBits())) + 1;
 }
 
 
@@ -66926,7 +67449,7 @@
     sqInt limit;
     sqInt newEndOfMemory;
     sqInt next;
-    sqInt node;
+    usqInt node;
     usqInt numSlots;
     usqInt numSlots1;
     SpurSegmentInfo *seg;
@@ -67270,7 +67793,7 @@
     usqLong firstSavedBridgeWord;
     sqInt nWritten;
     usqInt pier1;
-    sqInt pier2;
+    usqInt pier2;
     usqLong secondSavedBridgeWord;
 
 	pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize);
@@ -74457,7 +74980,7 @@
 
 	/* StackInterpreter>>#positive64BitIntegerFor: */
 sqInt
-positive64BitIntegerFor(sqLong integerValue)
+positive64BitIntegerFor(usqLong integerValue)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt newLargeInteger;
     usqInt newObj;
@@ -74466,8 +74989,7 @@
     sqInt objFormat;
     sqInt sz;
 
-	if ((integerValue >= 0)
-	 && ((((((unsigned sqLong)integerValue) >> 60) + 1) & 15) <= 1)) {
+	if (integerValue <= (MaxSmallInteger)) {
 		return ((integerValue << 3) | 1);
 	}
 	sz = 8;
@@ -74506,13 +75028,13 @@
 l2:	/* end allocateSmallNewSpaceSlots:format:classIndex: */;
 	
 #  if VMBIGENDIAN
-	byteAtput((newLargeInteger + BaseHeaderSize) + 7, (((unsigned sqLong)integerValue) >> 56) & 0xFF);
-	byteAtput((newLargeInteger + BaseHeaderSize) + 6, (((unsigned sqLong)integerValue) >> 48) & 0xFF);
-	byteAtput((newLargeInteger + BaseHeaderSize) + 5, (((unsigned sqLong)integerValue) >> 40) & 0xFF);
-	byteAtput((newLargeInteger + BaseHeaderSize) + 4, (((unsigned sqLong)integerValue) >> 32) & 0xFF);
-	byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((unsigned sqLong)integerValue) >> 24) & 0xFF);
-	byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((unsigned sqLong)integerValue) >> 16) & 0xFF);
-	byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((unsigned sqLong)integerValue) >> 8) & 0xFF);
+	byteAtput((newLargeInteger + BaseHeaderSize) + 7, (integerValue >> 56) & 0xFF);
+	byteAtput((newLargeInteger + BaseHeaderSize) + 6, (integerValue >> 48) & 0xFF);
+	byteAtput((newLargeInteger + BaseHeaderSize) + 5, (integerValue >> 40) & 0xFF);
+	byteAtput((newLargeInteger + BaseHeaderSize) + 4, (integerValue >> 32) & 0xFF);
+	byteAtput((newLargeInteger + BaseHeaderSize) + 3, (integerValue >> 24) & 0xFF);
+	byteAtput((newLargeInteger + BaseHeaderSize) + 2, (integerValue >> 16) & 0xFF);
+	byteAtput((newLargeInteger + BaseHeaderSize) + 1, (integerValue >> 8) & 0xFF);
 	byteAtput((newLargeInteger + BaseHeaderSize), integerValue & 0xFF);
 
 #  else /* VMBIGENDIAN */
@@ -78370,7 +78892,7 @@
 signed64BitIntegerFor(sqLong integerValue)
 {   DECL_MAYBE_SQ_GLOBAL_STRUCT
     sqInt largeClass;
-    sqLong magnitude;
+    usqLong magnitude;
     sqInt newLargeInteger;
     usqInt newObj;
     usqInt numBytes;
@@ -78378,20 +78900,22 @@
     sqInt objFormat;
     sqInt sz;
 
-	sz = 0;
-	if ((((((unsigned sqLong)integerValue) >> 60) + 1) & 15) <= 1) {
-		return ((integerValue << 3) | 1);
-	}
-	sz = 8;
-
 	if (integerValue < 0) {
+		if (integerValue >= (MinSmallInteger)) {
+			return (((((sqInt)integerValue)) << 3) | 1);
+		}
 		largeClass = ClassLargeNegativeIntegerCompactIndex;
-		magnitude = 0 - integerValue;
+		magnitude = 0 - (((usqLong) integerValue));
 	}
 	else {
+		if (integerValue <= (MaxSmallInteger)) {
+			return (((((sqInt)integerValue)) << 3) | 1);
+		}
 		largeClass = ClassLargePositiveIntegerCompactIndex;
 		magnitude = integerValue;
 	}
+	sz = 8;
+
 	/* begin eeInstantiateSmallClassIndex:format:numSlots: */
 	objFormat = (firstByteFormat()) + ((8 - sz) & (BytesPerWord - 1));
 	numSlots = (sz + 3) / BytesPerOop;
@@ -78427,22 +78951,23 @@
 	
 #  if VMBIGENDIAN
 	if (sz > 4) {
-		byteAtput((newLargeInteger + BaseHeaderSize) + 7, (((unsigned sqLong)magnitude) >> 56) & 0xFF);
-		byteAtput((newLargeInteger + BaseHeaderSize) + 6, (((unsigned sqLong)magnitude) >> 48) & 0xFF);
-		byteAtput((newLargeInteger + BaseHeaderSize) + 5, (((unsigned sqLong)magnitude) >> 40) & 0xFF);
-		byteAtput((newLargeInteger + BaseHeaderSize) + 4, (((unsigned sqLong)magnitude) >> 32) & 0xFF);
+		byteAtput((newLargeInteger + BaseHeaderSize) + 7, (magnitude >> 56) & 0xFF);
+		byteAtput((newLargeInteger + BaseHeaderSize) + 6, (magnitude >> 48) & 0xFF);
+		byteAtput((newLargeInteger + BaseHeaderSize) + 5, (magnitude >> 40) & 0xFF);
+		byteAtput((newLargeInteger + BaseHeaderSize) + 4, (magnitude >> 32) & 0xFF);
 	}
-	byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((unsigned sqLong)magnitude) >> 24) & 0xFF);

@@ Diff output truncated at 50000 characters. @@


More information about the Vm-dev mailing list