[Vm-dev] [commit][3264] CogVM source as per VMMaker.oscog-eem.1083
commits at squeakvm.org
commits at squeakvm.org
Tue Mar 3 21:29:33 UTC 2015
Revision: 3264
Author: eliot
Date: 2015-03-03 13:29:31 -0800 (Tue, 03 Mar 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1083
Avoid duplication in fetching active process and
scheduler in process-switch machinery.
Take advantage of endianness for simpler large integer initialization.
Slang:
Fix inlining of (u)sqLong expressions bound to untyped formals; since the system
expects untyped formals to be of type #sqInt the expr must be cast to #sqInt.
Modified Paths:
--------------
branches/Cog/nsspursrc/vm/cogit.c
branches/Cog/nsspursrc/vm/cogit.h
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/sistasrc/vm/cogit.c
branches/Cog/sistasrc/vm/cogit.h
branches/Cog/sistasrc/vm/cointerp.c
branches/Cog/sistasrc/vm/cointerp.h
branches/Cog/sistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursistasrc/vm/cogit.c
branches/Cog/spursistasrc/vm/cogit.h
branches/Cog/spursistasrc/vm/cointerp.c
branches/Cog/spursistasrc/vm/cointerp.h
branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursrc/vm/cogit.c
branches/Cog/spursrc/vm/cogit.h
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/cogit.c
branches/Cog/src/vm/cogit.h
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/nsspursrc/vm/cogit.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.c 2015-02-24 22:04:06 UTC (rev 3263)
+++ branches/Cog/nsspursrc/vm/cogit.c 2015-03-03 21:29:31 UTC (rev 3264)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ CCodeGenerator VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -13616,7 +13616,7 @@
while (((mapByte = byteAt(map))) != MapEnd) {
if (mapByte >= FirstAnnotation) {
mcpc += mapByte & DisplacementMask;
- result = relocateIfCallOrMethodReferencemcpcdelta((((usqInt) mapByte) >> AnnotationShift), (((char *) mcpc)), delta);
+ result = relocateIfCallOrMethodReferencemcpcdelta((((usqInt) mapByte) >> AnnotationShift), (((char *) mcpc)), (((sqInt) delta)));
if (result != 0) {
result;
goto l1;
@@ -17514,7 +17514,7 @@
address1 = freeStartAddress();
genoperandoperand(MoveRAw, scratch1, address1);
/* begin MoveCq:R: */
- genoperandoperand(MoveCqR, newFloatHeader, scratch2);
+ genoperandoperand(MoveCqR, ((sqInt) newFloatHeader), scratch2);
flag("endianness");
/* begin MoveCq:R: */
genoperandoperand(MoveCqR, newFloatHeader >> 32, scratch1);
Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h 2015-02-24 22:04:06 UTC (rev 3263)
+++ branches/Cog/nsspursrc/vm/cogit.h 2015-03-03 21:29:31 UTC (rev 3264)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ CCodeGenerator VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
*/
Modified: branches/Cog/nsspursrc/vm/cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.c 2015-02-24 22:04:06 UTC (rev 3263)
+++ branches/Cog/nsspursrc/vm/cointerp.c 2015-03-03 21:29:31 UTC (rev 3264)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
from
- CoInterpreter VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ CoInterpreter VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -821,6 +821,7 @@
static sqInt addressAfter(sqInt objOop) NoDbgRegParms;
static sqInt allocateSlotsForPinningInOldSpacebytesformatclassIndex(sqInt numSlots, usqInt totalBytes, sqInt formatField, sqInt classIndex) NoDbgRegParms;
static sqInt allocateSlotsInOldSpacebytesformatclassIndex(sqInt numSlots, usqInt totalBytes, sqInt formatField, sqInt classIndex) NoDbgRegParms;
+static usqInt allocateSlotsformatclassIndex(sqInt numSlots, sqInt formatField, sqInt classIndex) NoDbgRegParms;
sqInt byteSwapped(sqInt w);
static usqInt bytesInObject(sqInt objOop) NoDbgRegParms;
static sqInt changeClassOfto(sqInt rcvr, sqInt argClass) NoDbgRegParms;
@@ -2365,7 +2366,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-eem.1079";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1083";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -8746,10 +8747,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l71: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) shifted) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) shifted) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) shifted) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, shifted & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), shifted);
+
+# endif /* VMBIGENDIAN */
+
shifted = newLargeInteger;
l74: /* end maybeInlinePositive32BitIntegerFor: */;
goto l72;
@@ -9128,10 +9137,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l82: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) result1) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) result1) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) result1) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, result1 & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), result1);
+
+# endif /* VMBIGENDIAN */
+
result = newLargeInteger;
goto l88;
@@ -11344,10 +11361,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l165: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) shifted) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) shifted) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) shifted) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, shifted & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), shifted);
+
+# endif /* VMBIGENDIAN */
+
shifted = newLargeInteger;
l168: /* end maybeInlinePositive32BitIntegerFor: */;
goto l166;
@@ -11726,10 +11751,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l176: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) result1) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) result1) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) result1) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, result1 & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), result1);
+
+# endif /* VMBIGENDIAN */
+
result = newLargeInteger;
goto l182;
@@ -21632,10 +21665,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l1: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger;
}
@@ -23226,10 +23267,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) value) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) value) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) value) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, value & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), value);
+
+# endif /* VMBIGENDIAN */
+
object = newLargeInteger;
l2: /* end maybeInlinePositive32BitIntegerFor: */;
goto l4;
@@ -23277,10 +23326,18 @@
GIV(freeStart) += numBytes1;
newLargeInteger1 = newObj1;
l5: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger1 + BaseHeaderSize) + 3, (((usqInt) value1) >> 24) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 2, (((usqInt) value1) >> 16) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 1, (((usqInt) value1) >> 8) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 0, value1 & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger1 + BaseHeaderSize) + (0 << 2), value1);
+
+# endif /* VMBIGENDIAN */
+
object1 = newLargeInteger1;
l7: /* end maybeInlinePositive32BitIntegerFor: */;
goto l6;
@@ -23328,10 +23385,18 @@
GIV(freeStart) += numBytes2;
newLargeInteger2 = newObj2;
l8: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger2 + BaseHeaderSize) + 3, (((usqInt) value2) >> 24) & 0xFF);
byteAtput((newLargeInteger2 + BaseHeaderSize) + 2, (((usqInt) value2) >> 16) & 0xFF);
byteAtput((newLargeInteger2 + BaseHeaderSize) + 1, (((usqInt) value2) >> 8) & 0xFF);
byteAtput((newLargeInteger2 + BaseHeaderSize) + 0, value2 & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger2 + BaseHeaderSize) + (0 << 2), value2);
+
+# endif /* VMBIGENDIAN */
+
object2 = newLargeInteger2;
l10: /* end maybeInlinePositive32BitIntegerFor: */;
goto l9;
@@ -23379,10 +23444,18 @@
GIV(freeStart) += numBytes3;
newLargeInteger3 = newObj3;
l11: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger3 + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger3 + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger3 + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger3 + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger3 + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
object3 = newLargeInteger3;
l12: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -23655,10 +23728,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l5: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) thunkPtr) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) thunkPtr) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) thunkPtr) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, thunkPtr & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), thunkPtr);
+
+# endif /* VMBIGENDIAN */
+
object = newLargeInteger;
l6: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -23704,10 +23785,18 @@
GIV(freeStart) += numBytes1;
newLargeInteger1 = newObj1;
l7: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger1 + BaseHeaderSize) + 3, (((usqInt) stackPtr) >> 24) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 2, (((usqInt) stackPtr) >> 16) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 1, (((usqInt) stackPtr) >> 8) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 0, stackPtr & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger1 + BaseHeaderSize) + (0 << 2), stackPtr);
+
+# endif /* VMBIGENDIAN */
+
object1 = newLargeInteger1;
l8: /* end maybeInlinePositive32BitIntegerFor: */;
goto l2;
@@ -23753,10 +23842,18 @@
GIV(freeStart) += numBytes2;
newLargeInteger2 = newObj2;
l9: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger2 + BaseHeaderSize) + 3, (((usqInt) regsPtr) >> 24) & 0xFF);
byteAtput((newLargeInteger2 + BaseHeaderSize) + 2, (((usqInt) regsPtr) >> 16) & 0xFF);
byteAtput((newLargeInteger2 + BaseHeaderSize) + 1, (((usqInt) regsPtr) >> 8) & 0xFF);
byteAtput((newLargeInteger2 + BaseHeaderSize) + 0, regsPtr & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger2 + BaseHeaderSize) + (0 << 2), regsPtr);
+
+# endif /* VMBIGENDIAN */
+
object2 = newLargeInteger2;
l10: /* end maybeInlinePositive32BitIntegerFor: */;
goto l3;
@@ -23802,10 +23899,18 @@
GIV(freeStart) += numBytes3;
newLargeInteger3 = newObj3;
l11: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger3 + BaseHeaderSize) + 3, (((usqInt) jmpBufPtr) >> 24) & 0xFF);
byteAtput((newLargeInteger3 + BaseHeaderSize) + 2, (((usqInt) jmpBufPtr) >> 16) & 0xFF);
byteAtput((newLargeInteger3 + BaseHeaderSize) + 1, (((usqInt) jmpBufPtr) >> 8) & 0xFF);
byteAtput((newLargeInteger3 + BaseHeaderSize) + 0, jmpBufPtr & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger3 + BaseHeaderSize) + (0 << 2), jmpBufPtr);
+
+# endif /* VMBIGENDIAN */
+
object3 = newLargeInteger3;
l12: /* end maybeInlinePositive32BitIntegerFor: */;
goto l4;
@@ -24319,13 +24424,11 @@
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt activeContext;
sqInt aMethodObj;
- sqInt aProcess;
sqInt index;
StackPage *lastUsedPage;
StackPage *lruOrFree;
sqInt newContext;
StackPage *newPage;
- sqInt objOop;
sqInt oldProc;
sqInt sched;
sqInt senderOop;
@@ -24335,18 +24438,6 @@
char *theSP;
sqInt top;
- /* begin recordContextSwitchFrom:in: */
- /* begin fetchPointer:ofObject: */
- /* begin fetchPointer:ofObject: */
- objOop = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << (shiftForWord())))) + BaseHeaderSize) + (ValueIndex << (shiftForWord())));
- aProcess = longAt((objOop + BaseHeaderSize) + (ActiveProcessIndex << (shiftForWord())));
- if (recordEventTrace()) {
- /* begin recordTrace:thing:source: */
- GIV(traceLog)[GIV(traceLogIndex)] = TraceContextSwitch;
- GIV(traceLog)[GIV(traceLogIndex) + 1] = aProcess;
- GIV(traceLog)[GIV(traceLogIndex) + 2] = sourceCode;
- GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
- }
GIV(statProcessSwitch) += 1;
/* begin push: */
longAtput((sp = GIV(stackPointer) - BytesPerWord), GIV(instructionPointer));
@@ -24369,6 +24460,14 @@
/* begin fetchPointer:ofObject: */
sched = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << (shiftForWord())))) + BaseHeaderSize) + (ValueIndex << (shiftForWord())));
oldProc = longAt((sched + BaseHeaderSize) + (ActiveProcessIndex << (shiftForWord())));
+ /* begin recordContextSwitchFrom:in: */
+ if (recordEventTrace()) {
+ /* begin recordTrace:thing:source: */
+ GIV(traceLog)[GIV(traceLogIndex)] = TraceContextSwitch;
+ GIV(traceLog)[GIV(traceLogIndex) + 1] = oldProc;
+ GIV(traceLog)[GIV(traceLogIndex) + 2] = sourceCode;
+ GIV(traceLogIndex) = (GIV(traceLogIndex) + 3) % TraceBufferSize;
+ }
/* begin ensureFrameIsMarried:SP: */
theSP = GIV(stackPointer) + BytesPerWord;
if (((((usqInt)(longAt(GIV(framePointer) + FoxMethod)))) < (startOfMemory())
@@ -26754,25 +26853,20 @@
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt activeProc;
sqInt inInterpreter;
- sqInt objOop;
- sqInt objOop1;
sqInt oop;
sqInt priority;
sqInt processList;
sqInt processLists;
+ sqInt scheduler;
/* begin fetchPointer:ofObject: */
- /* begin fetchPointer:ofObject: */
- objOop = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << (shiftForWord())))) + BaseHeaderSize) + (ValueIndex << (shiftForWord())));
- activeProc = longAt((objOop + BaseHeaderSize) + (ActiveProcessIndex << (shiftForWord())));
+ scheduler = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << (shiftForWord())))) + BaseHeaderSize) + (ValueIndex << (shiftForWord())));
+ activeProc = longAt((scheduler + BaseHeaderSize) + (ActiveProcessIndex << (shiftForWord())));
/* begin quickFetchInteger:ofObject: */
oop = longAt((activeProc + BaseHeaderSize) + (PriorityIndex << (shiftForWord())));
assert((oop & 1));
priority = (oop >> 1);
- /* begin fetchPointer:ofObject: */
- /* begin fetchPointer:ofObject: */
- objOop1 = longAt(((longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (SchedulerAssociation << (shiftForWord())))) + BaseHeaderSize) + (ValueIndex << (shiftForWord())));
- processLists = longAt((objOop1 + BaseHeaderSize) + (ProcessListsIndex << (shiftForWord())));
+ processLists = longAt((scheduler + BaseHeaderSize) + (ProcessListsIndex << (shiftForWord())));
processList = longAt((processLists + BaseHeaderSize) + ((priority - 1) << (shiftForWord())));
if (isEmptyList(processList)) {
return;
@@ -27246,8 +27340,6 @@
magnitude64BitIntegerForneg(usqLong magnitude, sqInt isNegative)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
usqInt highWord;
- sqInt i;
- usqInt intValue;
sqInt isSmall;
sqInt largeClass;
sqInt newLargeInteger;
@@ -27291,10 +27383,27 @@
}
newLargeInteger = instantiateClassindexableSize(largeClass, sz);
- for (i = 0; i < sz; i += 1) {
- intValue = (magnitude >> (i * 8)) & 0xFF;
- byteAtput((newLargeInteger + BaseHeaderSize) + i, intValue);
+
+# if VMBIGENDIAN
+ if (sz > 4) {
+ 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, (magnitude >> 24) & 0xFF);
+ byteAtput((newLargeInteger + BaseHeaderSize) + 2, (magnitude >> 16) & 0xFF);
+ byteAtput((newLargeInteger + BaseHeaderSize) + 1, (magnitude >> 8) & 0xFF);
+ byteAtput((newLargeInteger + BaseHeaderSize) + 0, magnitude & 0xFF);
+
+# else /* VMBIGENDIAN */
+ if (sz > 4) {
+ long32Atput((newLargeInteger + BaseHeaderSize) + (1 << 2), magnitude >> 32);
+ }
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), magnitude);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger;
}
@@ -28145,10 +28254,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l4: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
result = newLargeInteger;
goto l6;
@@ -28199,8 +28316,8 @@
sqInt totalLength1;
sqInt value;
sqInt value1;
- usqInt valueToStore;
- usqInt valueToStore1;
+ sqInt valueToStore;
+ sqInt valueToStore1;
/* begin commonAtPut: */
value = longAt(GIV(stackPointer));
@@ -28740,7 +28857,7 @@
if (!GIV(primFailCode)) {
/* begin pop:thenPush: */
/* begin positive32BitIntegerFor: */
- integerValue = integerArgument & integerReceiver;
+ integerValue = ((sqInt) (integerArgument & integerReceiver));
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((integerValue >= 0)
@@ -28776,10 +28893,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
oop1 = newLargeInteger;
l2: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -28845,7 +28970,7 @@
if (!GIV(primFailCode)) {
/* begin pop:thenPush: */
/* begin positive32BitIntegerFor: */
- integerValue = integerArgument | integerReceiver;
+ integerValue = ((sqInt) (integerArgument | integerReceiver));
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((integerValue >= 0)
@@ -28881,10 +29006,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
oop1 = newLargeInteger;
l2: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -29013,10 +29146,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) shifted) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) shifted) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) shifted) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, shifted & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), shifted);
+
+# endif /* VMBIGENDIAN */
+
shifted = newLargeInteger;
l2: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -29130,7 +29271,7 @@
/* xoring will leave the tag bits zero, whether the tag is 1 or zero, so add it back in. */
/* begin pop:thenPush: */
- oop = (integerArgument ^ integerReceiver) + 1;
+ oop = ((sqInt) ((integerArgument ^ integerReceiver) + 1));
longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), oop);
GIV(stackPointer) = sp;
}
@@ -29140,7 +29281,7 @@
if (!GIV(primFailCode)) {
/* begin pop:thenPush: */
/* begin positive32BitIntegerFor: */
- integerValue = integerArgument ^ integerReceiver;
+ integerValue = ((sqInt) (integerArgument ^ integerReceiver));
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((integerValue >= 0)
@@ -29176,10 +29317,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
oop2 = newLargeInteger;
l2: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -29417,12 +29566,8 @@
primitiveClipboardText(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt fmt;
- sqInt formatField;
- usqInt newObj;
usqInt numBytes;
- usqInt numBytes1;
usqInt numSlots;
- sqInt numSlots1;
sqInt s;
char *sp;
sqInt sz;
@@ -29476,45 +29621,7 @@
/* begin allocateBytes:classIndex: */
assert(addressCouldBeClassObj(classAtIndex(ClassByteStringCompactIndex)));
assert((instSpecOfClass(classAtIndex(ClassByteStringCompactIndex))) == (firstByteFormat()));
- /* begin allocateSlots:format:classIndex: */
- numSlots1 = ((sz + BytesPerOop) - 1) / BytesPerOop;
- formatField = 16 + ((8 - sz) & (BytesPerWord - 1));
- if (numSlots1 >= 0xFF) {
- newObj = GIV(freeStart) + BaseHeaderSize;
- numBytes1 = (BaseHeaderSize + BaseHeaderSize) + ((numSlots1 + (numSlots1 & 1)) * BytesPerOop);
- }
- else {
- newObj = GIV(freeStart);
- numBytes1 = BaseHeaderSize + ((numSlots1 <= 1
- ? 8
- : (numSlots1 + (numSlots1 & 1)) * BytesPerOop));
- }
- if ((GIV(freeStart) + numBytes1) > GIV(scavengeThreshold)) {
- if (!GIV(needGCFlag)) {
- /* begin scheduleScavenge */
- GIV(needGCFlag) = 1;
- forceInterruptCheck();
- }
- s = allocateSlotsInOldSpacebytesformatclassIndex(numSlots1, numBytes1, formatField, ClassByteStringCompactIndex);
- goto l2;
- }
- if (numSlots1 >= 0xFF) {
-
- /* for header parsing we put a saturated slot count in the prepended overflow size word */
-
- flag("endianness");
- longAtput(GIV(freeStart), numSlots1);
- longAtput(GIV(freeStart) + 4, 0xFF << 24);
- long64Atput(newObj, (((((usqLong) 0xFF)) << 56) + (formatField << 24)) + ClassByteStringCompactIndex);
- }
- else {
- long64Atput(newObj, (((((usqLong) numSlots1)) << 56) + (formatField << 24)) + ClassByteStringCompactIndex);
- }
- assert((numBytes1 % (allocationUnit())) == 0);
- assert((newObj % (allocationUnit())) == 0);
- GIV(freeStart) += numBytes1;
- s = newObj;
- l2: /* end allocateSlots:format:classIndex: */;
+ s = ((usqInt) (allocateSlotsformatclassIndex(((sz + BytesPerOop) - 1) / BytesPerOop, 16 + ((8 - sz) & (BytesPerWord - 1)), ClassByteStringCompactIndex)));
if (!(s)) {
/* begin primitiveFail */
if (!GIV(primFailCode)) {
@@ -29632,10 +29739,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l5: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
v1 = newLargeInteger;
l3: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -29678,10 +29793,18 @@
GIV(freeStart) += numBytes1;
newLargeInteger1 = newObj1;
l6: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger1 + BaseHeaderSize) + 3, (((usqInt) integerValue1) >> 24) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 2, (((usqInt) integerValue1) >> 16) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 1, (((usqInt) integerValue1) >> 8) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 0, integerValue1 & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger1 + BaseHeaderSize) + (0 << 2), integerValue1);
+
+# endif /* VMBIGENDIAN */
+
v2 = newLargeInteger1;
l4: /* end maybeInlinePositive32BitIntegerFor: */;
goto l2;
@@ -30712,16 +30835,12 @@
end = rcvr + (((numSlotsOf(rcvr)) << (shiftForWord())) + BaseHeaderSize);
i = rcvr + BaseHeaderSize;
if (rcvrIsBytes) {
- while (i < end) {
- byteAtput(i, fillValue);
- i += 1;
- }
+ fillValue = fillValue & 0xFF;
+ fillValue = ((fillValue + (fillValue << 8)) + (fillValue << 16)) + (fillValue << 24);
}
- else {
- while (i < end) {
- long32Atput(i, fillValue);
- i += 4;
- }
+ while (i < end) {
+ long32Atput(i, fillValue);
+ i += 4;
}
/* begin pop: */
GIV(stackPointer) += 1 * BytesPerWord;
@@ -30799,7 +30918,7 @@
sqInt arg;
sqInt fmt;
sqInt i;
- usqInt length;
+ sqInt length;
usqInt numBytes;
usqInt numSlots;
usqInt numSlots1;
@@ -30840,18 +30959,18 @@
/* bytes (the common case), including CompiledMethod */
- length = ((sqInt) (numBytes - (fmt & 7)));
+ length = numBytes - (fmt & 7);
goto l1;
}
if (fmt <= 9) {
- length = ((sqInt) numBytes);
+ length = numBytes;
goto l1;
}
if (fmt >= 12) {
- length = ((sqInt) (numBytes - ((fmt & 3) << 1)));
+ length = numBytes - ((fmt & 3) << 1);
goto l1;
}
- length = ((sqInt) (numBytes - ((fmt & 1) << 2)));
+ length = numBytes - ((fmt & 1) << 2);
l1: /* end numBytesOf: */;
if (!((((((usqInt) (longAt(rcvr))) >> 24) & 0x1F) == ((((usqInt) (longAt(arg))) >> 24) & 0x1F))
&& (length == (numBytesOf(arg))))) {
@@ -30869,9 +30988,9 @@
flag("endianness");
assert((classIndexOf(rcvr)) > (isForwardedObjectClassIndexPun()));
numSlots1 = byteAt(rcvr + 7);
- length = (numSlots1 == 0xFF
- ? longAt(rcvr - BaseHeaderSize)
- : numSlots1);
+ length = ((usqInt) ((numSlots1 == 0xFF
+ ? longAt(rcvr - BaseHeaderSize)
+ : numSlots1)));
if (!((isAppropriateForCopyObject(arg))
&& (length == (lengthOfformat(arg, (((usqInt) (longAt(arg))) >> 24) & 0x1F))))) {
(GIV(primFailCode) = PrimErrBadArgument);
@@ -33207,10 +33326,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
oop = newLargeInteger;
l2: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -34869,7 +34996,7 @@
sqInt err;
sqInt hash;
sqInt instSpec;
- sqInt newObj;
+ usqInt newObj;
usqInt newObj1;
usqInt numBytes;
sqInt numSlots;
@@ -34984,7 +35111,7 @@
sqInt i;
sqInt instSpec;
sqInt literalCount;
- sqInt newObj;
+ usqInt newObj;
usqInt newObj1;
usqInt numBytes;
sqInt numSlots;
@@ -36867,10 +36994,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
oop = newLargeInteger;
l2: /* end maybeInlinePositive32BitIntegerFor: */;
goto l1;
@@ -38127,10 +38262,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l4: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
result = newLargeInteger;
goto l6;
@@ -38190,8 +38333,8 @@
sqInt totalLength1;
sqInt value;
sqInt value1;
- usqInt valueToStore;
- usqInt valueToStore1;
+ sqInt valueToStore;
+ sqInt valueToStore1;
/* begin commonAtPut: */
value = longAt(GIV(stackPointer));
@@ -40381,6 +40524,59 @@
}
+/* Allocate an object with numSlots space. If there is room beneath
+ scavengeThreshold allocate in newSpace, otherwise alocate in oldSpace. If
+ there is not room in newSpace
+ and a scavenge is not already scheduled, schedule a scavenge. */
+/* Object headers are 8 bytes in length if the slot size fits in the num
+ slots field (max implies overflow),
+ 16 bytes otherwise (num slots in preceeding word).
+ Objects always have at least one slot, for the forwarding pointer,
+ and are multiples of 8 bytes in length. */
+
+static usqInt
+allocateSlotsformatclassIndex(sqInt numSlots, sqInt formatField, sqInt classIndex)
+{ DECL_MAYBE_SQ_GLOBAL_STRUCT
+ usqInt newObj;
+ usqInt numBytes;
+
+ if (numSlots >= 0xFF) {
+ newObj = GIV(freeStart) + BaseHeaderSize;
+ numBytes = (BaseHeaderSize + BaseHeaderSize) + ((numSlots + (numSlots & 1)) * BytesPerOop);
+ }
+ else {
+ newObj = GIV(freeStart);
+ numBytes = BaseHeaderSize + ((numSlots <= 1
+ ? 8
+ : (numSlots + (numSlots & 1)) * BytesPerOop));
+ }
+ if ((GIV(freeStart) + numBytes) > GIV(scavengeThreshold)) {
+ if (!GIV(needGCFlag)) {
+ /* begin scheduleScavenge */
+ GIV(needGCFlag) = 1;
+ forceInterruptCheck();
+ }
+ return allocateSlotsInOldSpacebytesformatclassIndex(numSlots, numBytes, formatField, classIndex);
+ }
+ if (numSlots >= 0xFF) {
+
+ /* for header parsing we put a saturated slot count in the prepended overflow size word */
+
+ flag("endianness");
+ longAtput(GIV(freeStart), numSlots);
+ longAtput(GIV(freeStart) + 4, 0xFF << 24);
+ long64Atput(newObj, (((((usqLong) 0xFF)) << 56) + (formatField << 24)) + classIndex);
+ }
+ else {
+ long64Atput(newObj, (((((usqLong) numSlots)) << 56) + (formatField << 24)) + classIndex);
+ }
+ assert((numBytes % (allocationUnit())) == 0);
+ assert((newObj % (allocationUnit())) == 0);
+ GIV(freeStart) += numBytes;
+ return newObj;
+}
+
+
/* Answer the given integer with its bytes in the reverse order. */
sqInt
@@ -40757,7 +40953,7 @@
sqInt fillValue;
sqInt hash;
sqInt instSpec;
- sqInt newObj;
+ usqInt newObj;
usqInt newObj1;
usqInt numBytes;
usqInt numSlots;
@@ -42626,7 +42822,7 @@
sqInt entry;
sqInt expectedIndex;
sqInt expectedIndex1;
- sqInt freeChunk;
+ usqInt freeChunk;
sqInt i;
sqInt i1;
sqInt index;
@@ -42665,7 +42861,7 @@
sqInt ptr1;
sqInt ptr2;
sqInt slotBytes;
- sqInt smallObj;
+ usqInt smallObj;
sqInt start;
classIndex = (long32At(aClass + 4)) & 0x3FFFFF;
@@ -45600,7 +45796,7 @@
sqInt fmt;
sqInt hasYoung;
sqInt i;
- sqInt newObj;
+ usqInt newObj;
usqInt newObj1;
usqInt numBytes;
usqInt numSlots;
@@ -56724,13 +56920,13 @@
sqInt obj21;
sqInt pigBytes;
usqInt prevFree;
- usqInt prevFreeChunk;
+ sqInt prevFreeChunk;
usqInt prevPrevFree;
- usqInt prevPrevFreeChunk;
+ sqInt prevPrevFreeChunk;
sqInt slotBytes;
sqInt slotBytes1;
usqInt there;
- usqInt thisFreeChunk;
+ sqInt thisFreeChunk;
sqInt usedChunk;
sqInt valuePointer;
sqInt valuePointer1;
@@ -59795,8 +59991,8 @@
sqInt prevPrevObj;
sqInt prevPrevObj1;
sqInt ptr;
- sqInt savedInHashes;
- sqInt savedOutHashes;
+ usqInt savedInHashes;
+ usqInt savedOutHashes;
sqInt segAddr;
sqInt segStart;
sqInt slotBytes;
@@ -60269,7 +60465,7 @@
sqInt formatField;
sqInt len;
usqInt newObj;
- sqInt newString;
+ usqInt newString;
usqInt numBytes;
sqInt numSlots;
@@ -61496,7 +61692,7 @@
usqLong firstSavedBridgeWord;
sqInt nWritten;
usqInt pier1;
- usqInt pier2;
+ sqInt pier2;
usqLong secondSavedBridgeWord;
pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize);
@@ -62001,7 +62197,7 @@
static sqInt
checkForAndFollowForwardedPrimitiveState(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
- signed char accessorDepth;
+ sqInt accessorDepth;
sqInt firstBytecode;
sqInt found;
sqInt header;
@@ -67294,10 +67490,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l1: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger;
}
@@ -67624,10 +67828,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l1: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) value) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) value) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) value) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, value & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), value);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger;
}
@@ -67807,6 +68019,7 @@
positive64BitIntegerFor(sqLong integerValue)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt highWord;
+ sqInt integerValue1;
sqInt newLargeInteger;
sqInt newLargeInteger1;
usqInt newObj;
@@ -67821,10 +68034,11 @@
if (((highWord = ((sqLong) integerValue) >> 32)) == 0) {
/* begin positive32BitIntegerFor: */
/* begin maybeInlinePositive32BitIntegerFor: */
+ integerValue1 = ((sqInt) integerValue);
assert(!((hasSixtyFourBitImmediates())));
- if ((integerValue >= 0)
- && ((integerValue ^ (integerValue << 1)) >= 0)) {
- return ((integerValue << 1) | 1);
+ if ((integerValue1 >= 0)
+ && ((integerValue1 ^ (integerValue1 << 1)) >= 0)) {
+ return ((integerValue1 << 1) | 1);
}
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
objFormat1 = 16 + ((8 - 4) & (BytesPerWord - 1));
@@ -67854,10 +68068,18 @@
GIV(freeStart) += numBytes;
newLargeInteger1 = newObj;
l1: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
- byteAtput((newLargeInteger1 + BaseHeaderSize) + 3, (((unsigned sqLong)integerValue) >> 24) & 0xFF);
- byteAtput((newLargeInteger1 + BaseHeaderSize) + 2, (((unsigned sqLong)integerValue) >> 16) & 0xFF);
- byteAtput((newLargeInteger1 + BaseHeaderSize) + 1, (((unsigned sqLong)integerValue) >> 8) & 0xFF);
- byteAtput((newLargeInteger1 + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# if VMBIGENDIAN
+ byteAtput((newLargeInteger1 + BaseHeaderSize) + 3, (((usqInt) integerValue1) >> 24) & 0xFF);
+ byteAtput((newLargeInteger1 + BaseHeaderSize) + 2, (((usqInt) integerValue1) >> 16) & 0xFF);
+ byteAtput((newLargeInteger1 + BaseHeaderSize) + 1, (((usqInt) integerValue1) >> 8) & 0xFF);
+ byteAtput((newLargeInteger1 + BaseHeaderSize) + 0, integerValue1 & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger1 + BaseHeaderSize) + (0 << 2), integerValue1);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger1;
}
@@ -67904,6 +68126,8 @@
GIV(freeStart) += numBytes1;
newLargeInteger = newObj1;
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);
@@ -67912,6 +68136,12 @@
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((unsigned sqLong)integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((unsigned sqLong)integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long64Atput((newLargeInteger + BaseHeaderSize) + (0 << 3), integerValue);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger;
}
@@ -71612,7 +71842,7 @@
&& ((integerValue >= 0)
|| (0 != (integerValue << 1)))) {
/* begin signed32BitIntegerFor: */
- return noInlineSigned32BitIntegerFor(integerValue);
+ return noInlineSigned32BitIntegerFor(((sqInt) integerValue));
}
if (((highWord = ((unsigned sqLong)magnitude) >> 32)) == 0) {
@@ -71663,6 +71893,8 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l1: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
if (sz > 4) {
byteAtput((newLargeInteger + BaseHeaderSize) + 7, (((unsigned sqLong)magnitude) >> 56) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 6, (((unsigned sqLong)magnitude) >> 48) & 0xFF);
@@ -71673,6 +71905,15 @@
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((unsigned sqLong)magnitude) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((unsigned sqLong)magnitude) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, magnitude & 0xFF);
+
+# else /* VMBIGENDIAN */
+ if (sz > 4) {
+ long32Atput((newLargeInteger + BaseHeaderSize) + (1 << 2), ((unsigned sqLong)magnitude) >> 32);
+ }
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), magnitude);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger;
}
@@ -72884,10 +73125,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l4: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
return newLargeInteger;
}
@@ -72916,7 +73165,7 @@
sqInt sp1;
sqInt stSize;
sqInt totalLength;
- usqInt valueToStore;
+ sqInt valueToStore;
hdr = long64At(array);
fmt = (((unsigned sqLong)hdr) >> 24) & 0x1F;
@@ -73949,10 +74198,18 @@
GIV(freeStart) += numBytes1;
newLargeInteger1 = newObj1;
l10: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger1 + BaseHeaderSize) + 3, (((usqInt) integerValue1) >> 24) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 2, (((usqInt) integerValue1) >> 16) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 1, (((usqInt) integerValue1) >> 8) & 0xFF);
byteAtput((newLargeInteger1 + BaseHeaderSize) + 0, integerValue1 & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger1 + BaseHeaderSize) + (0 << 2), integerValue1);
+
+# endif /* VMBIGENDIAN */
+
value = newLargeInteger1;
goto l11;
@@ -74092,10 +74349,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l8: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
value = newLargeInteger;
goto l9;
@@ -74163,8 +74428,8 @@
sqInt totalLength;
sqInt totalLength1;
sqInt value;
- usqInt valueToStore;
- usqInt valueToStore1;
+ sqInt valueToStore;
+ sqInt valueToStore1;
value = longAt(GIV(stackPointer));
index = longAt(GIV(stackPointer) + (1 * BytesPerWord));
@@ -75706,7 +75971,7 @@
(GIV(stackPage)->headSP = GIV(stackPointer));
assert(pageListIsWellFormed());
/* begin pop:thenPushInteger: */
- integerVal = fullGC();
+ integerVal = ((sqInt) (fullGC()));
longAtput((sp = GIV(stackPointer) + ((1 - 1) * BytesPerWord)), ((integerVal << 1) | 1));
GIV(stackPointer) = sp;
return;
@@ -75900,10 +76165,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l4: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
value = newLargeInteger;
goto l5;
@@ -75929,7 +76202,7 @@
sqInt rcvr;
char *sp;
sqInt totalLength;
- usqInt valueToStore;
+ sqInt valueToStore;
newValue = longAt(GIV(stackPointer));
/* begin stackIntegerValue: */
@@ -76752,10 +77025,18 @@
GIV(freeStart) += numBytes1;
newLargeInteger = newObj;
l3: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) integerValue) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) integerValue) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) integerValue) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, integerValue & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), integerValue);
+
+# endif /* VMBIGENDIAN */
+
oop1 = newLargeInteger;
goto l2;
Modified: branches/Cog/nsspursrc/vm/cointerp.h
===================================================================
--- branches/Cog/nsspursrc/vm/cointerp.h 2015-02-24 22:04:06 UTC (rev 3263)
+++ branches/Cog/nsspursrc/vm/cointerp.h 2015-03-03 21:29:31 UTC (rev 3264)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
*/
Modified: branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-02-24 22:04:06 UTC (rev 3263)
+++ branches/Cog/nsspursrc/vm/gcc3x-cointerp.c 2015-03-03 21:29:31 UTC (rev 3264)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
from
- CoInterpreter VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b
+ CoInterpreter VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1079 uuid: fdd342f3-6d47-4bbe-be50-86e2865b8b3b " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1083 uuid: 4d0a08c2-6218-4726-816c-1d6e3ae601d8 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -824,6 +824,7 @@
static sqInt addressAfter(sqInt objOop) NoDbgRegParms;
static sqInt allocateSlotsForPinningInOldSpacebytesformatclassIndex(sqInt numSlots, usqInt totalBytes, sqInt formatField, sqInt classIndex) NoDbgRegParms;
static sqInt allocateSlotsInOldSpacebytesformatclassIndex(sqInt numSlots, usqInt totalBytes, sqInt formatField, sqInt classIndex) NoDbgRegParms;
+static usqInt allocateSlotsformatclassIndex(sqInt numSlots, sqInt formatField, sqInt classIndex) NoDbgRegParms;
sqInt byteSwapped(sqInt w);
static usqInt bytesInObject(sqInt objOop) NoDbgRegParms;
static sqInt changeClassOfto(sqInt rcvr, sqInt argClass) NoDbgRegParms;
@@ -2368,7 +2369,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-eem.1079";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1083";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -8755,10 +8756,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l71: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) shifted) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) shifted) >> 16) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 1, (((usqInt) shifted) >> 8) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 0, shifted & 0xFF);
+
+# else /* VMBIGENDIAN */
+ long32Atput((newLargeInteger + BaseHeaderSize) + (0 << 2), shifted);
+
+# endif /* VMBIGENDIAN */
+
shifted = newLargeInteger;
l74: /* end maybeInlinePositive32BitIntegerFor: */;
goto l72;
@@ -9137,10 +9146,18 @@
GIV(freeStart) += numBytes;
newLargeInteger = newObj;
l82: /* end allocateSmallNewSpaceSlots:format:classIndex: */;
+
+# if VMBIGENDIAN
byteAtput((newLargeInteger + BaseHeaderSize) + 3, (((usqInt) result1) >> 24) & 0xFF);
byteAtput((newLargeInteger + BaseHeaderSize) + 2, (((usqInt) result1) >> 16) & 0xFF);
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list