[Vm-dev] [commit][3525] CogVM source as per VMMaker.oscog-eem.1594
commits at squeakvm.org
commits at squeakvm.org
Mon Dec 14 01:36:09 UTC 2015
Revision: 3525
Author: eliot
Date: 2015-12-13 17:36:08 -0800 (Sun, 13 Dec 2015)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1594
Eliminate warnings for %.*s string length parameters in printf.
Cogit:
Don't inline AndCq:R:R: because its translation contains a jump and hence
won't work in a statement list expression.
Nuke genJump[Not]SmallInteger:scratch: in favour of genJump[Not]SmallInteger:scratchReg:
Slang:
Eliminate leaves in statement lists generated as expressions (to reduce
warnings).
Modified Paths:
--------------
branches/Cog/nsspursrc/vm/cogit.h
branches/Cog/nsspursrc/vm/cogitARMv5.c
branches/Cog/nsspursrc/vm/cogitIA32.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/platforms/Cross/vm/dispdbg.h
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/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/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.h
branches/Cog/src/vm/cogitARMv5.c
branches/Cog/src/vm/cogitIA32.c
branches/Cog/src/vm/cointerp.c
branches/Cog/src/vm/cointerp.h
branches/Cog/src/vm/cointerpmt.c
branches/Cog/src/vm/cointerpmt.h
branches/Cog/src/vm/gcc3x-cointerp.c
branches/Cog/src/vm/gcc3x-cointerpmt.c
branches/Cog/stacksrc/vm/gcc3x-interp.c
branches/Cog/stacksrc/vm/interp.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h 2015-12-13 20:44:13 UTC (rev 3524)
+++ branches/Cog/nsspursrc/vm/cogit.h 2015-12-14 01:36:08 UTC (rev 3525)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1591 uuid: 27b9f438-09bc-4421-a07d-f70f493df338
+ CCodeGenerator VMMaker.oscog-eem.1594 uuid: 79da8b81-d1f3-469a-869c-16c79d12649a
*/
Modified: branches/Cog/nsspursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitARMv5.c 2015-12-13 20:44:13 UTC (rev 3524)
+++ branches/Cog/nsspursrc/vm/cogitARMv5.c 2015-12-14 01:36:08 UTC (rev 3525)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1591 uuid: 27b9f438-09bc-4421-a07d-f70f493df338
+ CCodeGenerator VMMaker.oscog-eem.1594 uuid: 79da8b81-d1f3-469a-869c-16c79d12649a
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1591 uuid: 27b9f438-09bc-4421-a07d-f70f493df338
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1594 uuid: 79da8b81-d1f3-469a-869c-16c79d12649a
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1591 uuid: 27b9f438-09bc-4421-a07d-f70f493df338 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1594 uuid: 79da8b81-d1f3-469a-869c-16c79d12649a " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -392,7 +392,6 @@
#define TstCqR 99
#define TstOpcode 8
#define UnfailingPrimitive 3
-#define UnimplementedOperation 2
#define UnimplementedPrimitive -7
#define ValueIndex 1
#define VarBaseReg -20
@@ -569,6 +568,7 @@
static sqInt NoDbgRegParms isUnconditionalBranch(BytecodeDescriptor * self_in_isUnconditionalBranch);
static AbstractInstruction * NoDbgRegParms gAddCqR(sqInt quickConstant, sqInt reg);
static AbstractInstruction * NoDbgRegParms gAndCqR(sqInt quickConstant, sqInt reg);
+static AbstractInstruction * NoDbgRegParms gAndCqRR(sqInt quickConstant, sqInt srcReg, sqInt destReg);
static AbstractInstruction * NoDbgRegParms gArithmeticShiftRightRR(sqInt reg1, sqInt reg2);
extern sqInt abortOffset(void);
static void addCleanBlockStarts(void);
@@ -840,7 +840,7 @@
static AbstractInstruction * NoDbgRegParms genCmpClassFloatCompactIndexR(sqInt reg);
static AbstractInstruction * NoDbgRegParms genCmpClassMethodContextCompactIndexR(sqInt reg);
static sqInt NoDbgRegParms genInnerPrimitiveNewMethod(sqInt retNoffset);
-static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerscratchReg(sqInt aRegister, sqInt scratch);
+static AbstractInstruction * NoDbgRegParms genJumpSmallIntegerscratchReg(sqInt aRegister, sqInt scratch);
static sqInt NoDbgRegParms genLoadSlotsourceRegdestReg(sqInt index, sqInt sourceReg, sqInt destReg);
static sqInt NoDbgRegParms isUnannotatableConstant(CogSimStackEntry *simStackEntry);
static sqInt NoDbgRegParms maybeGenConvertIfSmallFloatInscratchRegintoandJumpTo(sqInt oopReg, sqInt scratch, sqInt dpReg, AbstractInstruction *targetInst);
@@ -867,7 +867,6 @@
static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerInScratchReg(sqInt aRegister);
static AbstractInstruction * NoDbgRegParms genJumpNotSmallIntegerValuescratch(sqInt aRegister, sqInt scratchReg);
static AbstractInstruction * NoDbgRegParms genJumpNotSmallInteger(sqInt aRegister);
-static AbstractInstruction * NoDbgRegParms genJumpSmallIntegerInScratchReg(sqInt aRegister);
static AbstractInstruction * NoDbgRegParms genJumpSmallInteger(sqInt aRegister);
static sqInt NoDbgRegParms genRemoveSmallIntegerTagsInScratchReg(sqInt scratchReg);
static sqInt NoDbgRegParms genShiftAwaySmallIntegerTagsInScratchReg(sqInt scratchReg);
@@ -901,7 +900,7 @@
static sqInt NoDbgRegParms genGetClassIndexOfNonImminto(sqInt sourceReg, sqInt destReg);
static sqInt NoDbgRegParms genGetClassObjectOfClassIndexintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg);
static sqInt NoDbgRegParms genGetClassObjectOfintoscratchReginstRegIsReceiver(sqInt instReg, sqInt destReg, sqInt scratchReg, sqInt instRegIsReceiver);
-static AbstractInstruction * NoDbgRegParms genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg);
+static sqInt NoDbgRegParms genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg);
static sqInt NoDbgRegParms genGetCompactClassIndexNonImmOfinto(sqInt instReg, sqInt destReg);
static sqInt NoDbgRegParms genGetDoubleValueOfinto(sqInt srcReg, sqInt destFPReg);
static sqInt NoDbgRegParms genGetFormatOfinto(sqInt srcReg, sqInt destReg);
@@ -966,7 +965,6 @@
static CogSimStackEntry * NoDbgRegParms storeToReg(CogSimStackEntry * self_in_storeToReg, sqInt reg);
static AbstractInstruction * NoDbgRegParms allocateLiteral(sqInt aLiteral);
static AbstractInstruction * NoDbgRegParms checkLiteralforInstruction(sqInt literal, AbstractInstruction *anInstruction);
-static AbstractInstruction * NoDbgRegParms checkQuickConstantforInstruction(sqInt literal, AbstractInstruction *anInstruction);
static sqInt NoDbgRegParms dumpLiterals(sqInt generateBranchAround);
static sqInt endSizeOffset(void);
static sqInt NoDbgRegParms literalInstructionInRange(AbstractInstruction *litInst);
@@ -1017,8 +1015,8 @@
static sqInt genLongUnconditionalBackwardJump(void);
static sqInt genLongUnconditionalForwardJump(void);
static sqInt NoDbgRegParms genLookupForPerformNumArgs(sqInt numArgs);
-static AbstractInstruction * NoDbgRegParms genMoveFalseR(sqInt reg);
-static AbstractInstruction * NoDbgRegParms genMoveTrueR(sqInt reg);
+static AbstractInstruction * NoDbgRegParms genMoveConstantR(sqInt constant, sqInt reg);
+static sqInt NoDbgRegParms genMoveTrueR(sqInt reg);
static sqInt NoDbgRegParms genMustBeBooleanTrampolineForcalled(sqInt boolean, char *trampolineName);
static sqInt genPrimitiveEqual(void);
static sqInt genPrimitiveFloatAdd(void);
@@ -2061,6 +2059,7 @@
static sqInt NoDbgRegParms
genAlignCStackSavingRegistersnumArgswordAlignment(AbstractInstruction * self_in_genAlignCStackSavingRegistersnumArgswordAlignment, sqInt saveRegs, sqInt numArgs, sqInt alignment)
{
+ AbstractInstruction *anInstruction;
sqInt delta;
sqInt wordsPushedModAlignment;
@@ -2076,7 +2075,11 @@
delta = alignment - wordsPushedModAlignment;
/* begin SubCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(delta * BytesPerWord, genoperandoperand(SubCqR, delta * BytesPerWord, SPReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(SubCqR, delta * BytesPerWord, SPReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(delta * BytesPerWord));
+ }
}
return 0;
}
@@ -3328,7 +3331,7 @@
sqInt index2;
sqInt index3;
usqInt instrOffset;
- usqInt instrOffset1;
+ sqInt instrOffset1;
sqInt instrOffset10;
sqInt instrOffset11;
sqInt instrOffset12;
@@ -3340,17 +3343,17 @@
sqInt instrOffset18;
usqInt instrOffset19;
usqInt instrOffset2;
- sqInt instrOffset20;
+ usqInt instrOffset20;
usqInt instrOffset21;
- sqInt instrOffset22;
- sqInt instrOffset23;
+ usqInt instrOffset22;
+ usqInt instrOffset23;
usqInt instrOffset24;
usqInt instrOffset25;
sqInt instrOffset26;
sqInt instrOffset27;
sqInt instrOffset28;
- usqInt instrOffset3;
- usqInt instrOffset4;
+ sqInt instrOffset3;
+ sqInt instrOffset4;
sqInt instrOffset5;
usqInt instrOffset6;
usqInt instrOffset7;
@@ -5408,7 +5411,7 @@
? 1
: 0), abs(((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord211;
- instrOffset20 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4)));
+ instrOffset20 = ((self_in_dispatchConcretize->machineCodeSize) = 4);
/* begin machineCodeAt:put: */
aWord120 = strrnplusImm(self_in_dispatchConcretize, srcReg15, ConcreteIPReg, 0);
((self_in_dispatchConcretize->machineCode))[instrOffset20 / 4] = aWord120;
@@ -5464,7 +5467,7 @@
? 1
: 0), abs(((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord213;
- instrOffset22 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4)));
+ instrOffset22 = ((self_in_dispatchConcretize->machineCodeSize) = 4);
/* begin machineCodeAt:put: */
aWord122 = strbrnplusimm(self_in_dispatchConcretize, srcReg16, ConcreteIPReg, 1, 0);
((self_in_dispatchConcretize->machineCode))[instrOffset22 / 4] = aWord122;
@@ -5519,7 +5522,7 @@
? 1
: 0), abs(((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord310;
- instrOffset23 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4)));
+ instrOffset23 = ((self_in_dispatchConcretize->machineCodeSize) = 4);
}
/* begin machineCodeAt:put: */
aWord214 = ldrbrnrm(self_in_dispatchConcretize, destReg12, srcReg17, ConcreteIPReg);
@@ -5630,7 +5633,7 @@
? 1
: 0), abs(((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord37;
- instrOffset1 = ((self_in_dispatchConcretize->machineCodeSize) = 4);
+ instrOffset1 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4)));
/* begin machineCodeAt:put: */
aWord110 = ldrhrnrm(self_in_dispatchConcretize, destReg2, srcReg3, ConcreteIPReg);
((self_in_dispatchConcretize->machineCode))[instrOffset1 / 4] = aWord110;
@@ -5807,7 +5810,7 @@
? 1
: 0), abs(((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord39;
- instrOffset3 = ((self_in_dispatchConcretize->machineCodeSize) = 4);
+ instrOffset3 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4)));
/* begin machineCodeAt:put: */
aWord112 = strrnrm(self_in_dispatchConcretize, srcReg6, baseReg, ConcreteIPReg);
((self_in_dispatchConcretize->machineCode))[instrOffset3 / 4] = aWord112;
@@ -5901,7 +5904,7 @@
? 1
: 0), abs(((((self_in_dispatchConcretize->dependent))->address)) - (((self_in_dispatchConcretize->address)) + 8)));
((self_in_dispatchConcretize->machineCode))[0 / 4] = aWord40;
- instrOffset4 = ((self_in_dispatchConcretize->machineCodeSize) = 4);
+ instrOffset4 = ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 4)));
l12: /* end rotateable8bitBitwiseImmediate:ifTrue:ifFalse: */;
/* begin machineCodeAt:put: */
@@ -6248,14 +6251,25 @@
static AbstractInstruction * NoDbgRegParms
genPushRegisterArgsForAbortMissNumArgs(AbstractInstruction * self_in_genPushRegisterArgsForAbortMissNumArgs, sqInt numArgs)
{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
+
if (numArgs <= 2) {
assert((numRegArgs()) <= 2);
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(0, genoperandoperandoperand(MoveMwrR, 0, SPReg, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperandoperand(MoveMwrR, 0, SPReg, TempReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(0));
+ }
/* begin MoveR:Mw:r: */
/* begin gen:operand:quickConstant:operand: */
- checkQuickConstantforInstruction(0, genoperandoperandoperand(MoveRMwr, ReceiverResultReg, 0, SPReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperandoperand(MoveRMwr, ReceiverResultReg, 0, SPReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(0));
+ }
if (numArgs > 0) {
/* begin PushR: */
genoperand(PushR, Arg0Reg);
@@ -6908,12 +6922,17 @@
static AbstractInstruction * NoDbgRegParms
maybeEstablishVarBase(AbstractInstruction * self_in_maybeEstablishVarBase)
{
+ AbstractInstruction *anInstruction;
sqInt quickConstant;
/* begin MoveCq:R: */
quickConstant = varBaseAddress();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant, genoperandoperand(MoveCqR, quickConstant, VarBaseReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
return self_in_maybeEstablishVarBase;
}
@@ -7472,18 +7491,68 @@
static AbstractInstruction * NoDbgRegParms
gAddCqR(sqInt quickConstant, sqInt reg)
{
+ AbstractInstruction *anInstruction;
+
/* begin gen:quickConstant:operand: */
- return checkQuickConstantforInstruction(quickConstant, genoperandoperand(AddCqR, quickConstant, reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AddCqR, quickConstant, reg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
+ return anInstruction;
}
/* Cogit>>#AndCq:R: */
static AbstractInstruction * NoDbgRegParms
gAndCqR(sqInt quickConstant, sqInt reg)
{
+ AbstractInstruction *anInstruction;
+
/* begin gen:quickConstant:operand: */
- return checkQuickConstantforInstruction(quickConstant, genoperandoperand(AndCqR, quickConstant, reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AndCqR, quickConstant, reg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
+ return anInstruction;
}
+ /* Cogit>>#AndCq:R:R: */
+static AbstractInstruction * NoDbgRegParms
+gAndCqRR(sqInt quickConstant, sqInt srcReg, sqInt destReg)
+{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
+ AbstractInstruction *anInstruction2;
+ AbstractInstruction *first;
+
+ /* begin gen:quickConstant:operand:operand: */
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperandoperand(AndCqRR, quickConstant, srcReg, destReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
+ return anInstruction;
+
+ if (srcReg == destReg) {
+ /* begin gen:quickConstant:operand: */
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperand(AndCqR, quickConstant, destReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(quickConstant));
+ }
+ return anInstruction1;
+ }
+ first = genoperandoperand(MoveRR, srcReg, destReg);
+ /* begin gen:quickConstant:operand: */
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction2 = genoperandoperand(AndCqR, quickConstant, destReg);
+ if (usesOutOfLineLiteral(anInstruction2)) {
+ (anInstruction2->dependent = locateLiteral(quickConstant));
+ }
+ return first;
+}
+
/* Cogit>>#ArithmeticShiftRightR:R: */
static AbstractInstruction * NoDbgRegParms
gArithmeticShiftRightRR(sqInt reg1, sqInt reg2)
@@ -7946,8 +8015,15 @@
static AbstractInstruction * NoDbgRegParms
gCmpCqR(sqInt quickConstant, sqInt reg)
{
+ AbstractInstruction *anInstruction;
+
/* begin gen:quickConstant:operand: */
- return checkQuickConstantforInstruction(quickConstant, genoperandoperand(CmpCqR, quickConstant, reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(CmpCqR, quickConstant, reg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
+ return anInstruction;
}
/* Cogit>>#CmpCw:R: */
@@ -9133,7 +9209,7 @@
}
if ((methodClassAssociationOf(aMethodObj)) != (nilObject())) {
/* begin warnMultiple:selectors: */
- fprintf(stderr, "Warning, attempt to use method with selector %.*s and selector %.*s\n", numBytesOf((cogMethod->selector)), ((char *) (firstIndexableField((cogMethod->selector)))), numBytesOf(aSelectorOop), ((char *) (firstIndexableField(aSelectorOop))));
+ fprintf(stderr, "Warning, attempt to use method with selector %.*s and selector %.*s\n", ((int) (numBytesOf((cogMethod->selector)))), ((char *) (firstIndexableField((cogMethod->selector)))), numBytesOf(aSelectorOop), ((char *) (firstIndexableField(aSelectorOop))));
return null;
}
}
@@ -9210,11 +9286,17 @@
static AbstractInstruction *
compileAbort(void)
{
+ AbstractInstruction *anInstruction;
sqInt callTarget;
/* begin MoveCq:R: */
/* begin gen:quickConstant:operand: */
- stackOverflowCall = checkQuickConstantforInstruction(0, genoperandoperand(MoveCqR, 0, ReceiverResultReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(MoveCqR, 0, ReceiverResultReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(0));
+ }
+ stackOverflowCall = anInstruction;
/* If there is a link register it must be saved (pushed onto the stack) before it
is smashed by the abort call, and hence needs to be manually handled here */
@@ -9231,6 +9313,7 @@
static sqInt NoDbgRegParms
compileBlockDispatchFromto(sqInt lowBlockStartIndex, sqInt highBlockStartIndex)
{
+ AbstractInstruction *anInstruction;
BlockStart *blockStart;
sqInt halfWay;
AbstractInstruction *jmp;
@@ -9255,7 +9338,11 @@
/* begin CmpCq:R: */
quickConstant = (((((blockStart->startpc)) + 1) << 1) | 1);
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant, genoperandoperand(CmpCqR, quickConstant, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(CmpCqR, quickConstant, TempReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
if (lowBlockStartIndex == halfWay) {
/* begin JumpLessOrEqual: */
jumpTarget1 = (blockStart->entryLabel);
@@ -9358,6 +9445,10 @@
compileCallFornumArgsargargargargresultRegsaveRegs(void *aRoutine, sqInt numArgs, sqInt regOrConst0, sqInt regOrConst1, sqInt regOrConst2, sqInt regOrConst3, sqInt resultRegOrNone, sqInt saveRegs)
{
AbstractInstruction *abstractInstruction;
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
+ AbstractInstruction *anInstruction2;
+ AbstractInstruction *anInstruction3;
sqInt callTarget;
const int cStackAlignment = STACK_ALIGN_BYTES;
@@ -9375,7 +9466,11 @@
if (regOrConst0 >= 0) {
/* begin MoveCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(regOrConst0, genoperandoperand(MoveCqR, regOrConst0, CArg0Reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(MoveCqR, regOrConst0, CArg0Reg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(regOrConst0));
+ }
}
else {
/* begin MoveR:R: */
@@ -9388,7 +9483,11 @@
if (regOrConst1 >= 0) {
/* begin MoveCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(regOrConst1, genoperandoperand(MoveCqR, regOrConst1, CArg1Reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperand(MoveCqR, regOrConst1, CArg1Reg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(regOrConst1));
+ }
}
else {
/* begin MoveR:R: */
@@ -9401,7 +9500,11 @@
if (regOrConst2 >= 0) {
/* begin MoveCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(regOrConst2, genoperandoperand(MoveCqR, regOrConst2, CArg2Reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction2 = genoperandoperand(MoveCqR, regOrConst2, CArg2Reg);
+ if (usesOutOfLineLiteral(anInstruction2)) {
+ (anInstruction2->dependent = locateLiteral(regOrConst2));
+ }
}
else {
/* begin MoveR:R: */
@@ -9414,7 +9517,11 @@
if (regOrConst3 >= 0) {
/* begin MoveCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(regOrConst3, genoperandoperand(MoveCqR, regOrConst3, CArg3Reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction3 = genoperandoperand(MoveCqR, regOrConst3, CArg3Reg);
+ if (usesOutOfLineLiteral(anInstruction3)) {
+ (anInstruction3->dependent = locateLiteral(regOrConst3));
+ }
}
else {
/* begin MoveR:R: */
@@ -9535,13 +9642,19 @@
static sqInt NoDbgRegParms
compilePICAbort(sqInt numArgs)
{
+ AbstractInstruction *anInstruction;
sqInt callTarget;
sqInt callTarget1;
AbstractInstruction * picMNUAbort;
/* begin MoveCq:R: */
/* begin gen:quickConstant:operand: */
- picMNUAbort = checkQuickConstantforInstruction(0, genoperandoperand(MoveCqR, 0, ClassReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(MoveCqR, 0, ClassReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(0));
+ }
+ picMNUAbort = anInstruction;
/* If there is a link register it must be saved (pushed onto the stack) before it
is smashed by the abort call, and hence needs to be manually handled here */
@@ -9710,7 +9823,7 @@
{
sqInt caseEndAddress;
sqInt operand;
- void *targetEntry;
+ sqInt targetEntry;
assert(case1Method != null);
rewriteCallAttarget(backEnd, (((sqInt)cPIC)) + missOffset, picAbortTrampolineFor(numArgs));
@@ -9718,7 +9831,7 @@
if ((!isMNUCase)
&& (methodHasCogMethod(case1Method))) {
operand = 0;
- targetEntry = ((void *)((((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset));
+ targetEntry = (((sqInt)(cogMethodOf(case1Method)))) + cmNoCheckEntryOffset;
}
else {
@@ -10578,6 +10691,7 @@
sqInt address;
sqInt address1;
sqInt address2;
+ AbstractInstruction *anInstruction;
sqInt fixupSize;
sqInt opcodeSize;
sqInt quickConstant;
@@ -11155,11 +11269,16 @@
static sqInt NoDbgRegParms
genInnerPICAbortTrampoline(char *name)
{
+ AbstractInstruction *anInstruction;
AbstractInstruction *jumpMNUCase;
/* begin CmpCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(0, genoperandoperand(CmpCqR, 0, ClassReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(CmpCqR, 0, ClassReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(0));
+ }
/* begin JumpZero: */
jumpMNUCase = genConditionalBranchoperand(JumpZero, ((sqInt)0));
compileTrampolineFornumArgsargargargargsaveRegspushLinkRegresultReg(ceInterpretMethodFromPICreceiver, 2, SendNumArgsReg, ReceiverResultReg, null, null, 0, 0, NoReg);
@@ -11174,6 +11293,7 @@
sqInt address;
sqInt address1;
sqInt address2;
+ AbstractInstruction *anInstruction;
if (debugPrimCallStackOffset == 0) {
/* begin MoveAw:R: */
@@ -11188,7 +11308,11 @@
checkLiteralforInstruction(address1, genoperandoperand(MoveAwR, address1, TempReg));
/* begin SubCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(debugPrimCallStackOffset, genoperandoperand(SubCqR, debugPrimCallStackOffset, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(SubCqR, debugPrimCallStackOffset, TempReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(debugPrimCallStackOffset));
+ }
/* begin MoveR:R: */
genoperandoperand(MoveRR, TempReg, SPReg);
}
@@ -11279,6 +11403,13 @@
static sqInt NoDbgRegParms
genNSSendTrampolineFornumArgsenclosingObjectCheckcalled(void *aRoutine, sqInt numArgs, sqInt eoCheckFlag, char *aString)
{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
+ AbstractInstruction *anInstruction2;
+ AbstractInstruction *anInstruction3;
+ AbstractInstruction *anInstruction4;
+ AbstractInstruction *anInstruction5;
+ AbstractInstruction *anInstruction6;
AbstractInstruction *jumpItsTheReceiverStupid;
AbstractInstruction *jumpMiss;
sqInt offset;
@@ -11287,7 +11418,11 @@
genGetInlineCacheClassTagFromintoforEntry(ReceiverResultReg, ClassReg, 0);
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(NSCClassTagIndex * BytesPerWord, genoperandoperandoperand(MoveMwrR, NSCClassTagIndex * BytesPerWord, SendNumArgsReg, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction5 = genoperandoperandoperand(MoveMwrR, NSCClassTagIndex * BytesPerWord, SendNumArgsReg, TempReg);
+ if (usesOutOfLineLiteral(anInstruction5)) {
+ (anInstruction5->dependent = locateLiteral(NSCClassTagIndex * BytesPerWord));
+ }
/* begin CmpR:R: */
genoperandoperand(CmpRR, ClassReg, TempReg);
/* begin JumpNonZero: */
@@ -11295,10 +11430,18 @@
if (eoCheckFlag) {
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(NSCEnclosingObjectIndex * BytesPerWord, genoperandoperandoperand(MoveMwrR, NSCEnclosingObjectIndex * BytesPerWord, SendNumArgsReg, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction4 = genoperandoperandoperand(MoveMwrR, NSCEnclosingObjectIndex * BytesPerWord, SendNumArgsReg, TempReg);
+ if (usesOutOfLineLiteral(anInstruction4)) {
+ (anInstruction4->dependent = locateLiteral(NSCEnclosingObjectIndex * BytesPerWord));
+ }
/* begin CmpCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(0, genoperandoperand(CmpCqR, 0, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperand(CmpCqR, 0, TempReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(0));
+ }
/* begin JumpZero: */
jumpItsTheReceiverStupid = genConditionalBranchoperand(JumpZero, ((sqInt)0));
/* begin MoveR:R: */
@@ -11310,7 +11453,11 @@
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(NSCNumArgsIndex * BytesPerWord, genoperandoperandoperand(MoveMwrR, NSCNumArgsIndex * BytesPerWord, SendNumArgsReg, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction2 = genoperandoperandoperand(MoveMwrR, NSCNumArgsIndex * BytesPerWord, SendNumArgsReg, TempReg);
+ if (usesOutOfLineLiteral(anInstruction2)) {
+ (anInstruction2->dependent = locateLiteral(NSCNumArgsIndex * BytesPerWord));
+ }
/* begin MoveR:Xwr:R: */
genoperandoperandoperand(MoveRXwrR, ReceiverResultReg, TempReg, SPReg);
@@ -11322,14 +11469,22 @@
/* begin MoveR:Mw:r: */
offset = ((0) + numArgs) * BytesPerWord;
/* begin gen:operand:quickConstant:operand: */
- checkQuickConstantforInstruction(offset, genoperandoperandoperand(MoveRMwr, TempReg, offset, SPReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction3 = genoperandoperandoperand(MoveRMwr, TempReg, offset, SPReg);
+ if (usesOutOfLineLiteral(anInstruction3)) {
+ (anInstruction3->dependent = locateLiteral(offset));
+ }
}
}
jmpTarget(jumpItsTheReceiverStupid, gLabel());
}
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(NSCTargetIndex * BytesPerWord, genoperandoperandoperand(MoveMwrR, NSCTargetIndex * BytesPerWord, SendNumArgsReg, TempReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction6 = genoperandoperandoperand(MoveMwrR, NSCTargetIndex * BytesPerWord, SendNumArgsReg, TempReg);
+ if (usesOutOfLineLiteral(anInstruction6)) {
+ (anInstruction6->dependent = locateLiteral(NSCTargetIndex * BytesPerWord));
+ }
/* begin JumpR: */
genoperand(JumpR, TempReg);
jmpTarget(jumpMiss, gLabel());
@@ -12074,16 +12229,30 @@
static AbstractInstruction * NoDbgRegParms
gMoveMwrR(sqInt offset, sqInt baseReg, sqInt destReg)
{
+ AbstractInstruction *anInstruction;
+
/* begin gen:quickConstant:operand:operand: */
- return checkQuickConstantforInstruction(offset, genoperandoperandoperand(MoveMwrR, offset, baseReg, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperandoperand(MoveMwrR, offset, baseReg, destReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(offset));
+ }
+ return anInstruction;
}
/* Cogit>>#MoveR:Mw:r: */
static AbstractInstruction * NoDbgRegParms
gMoveRMwr(sqInt sourceReg, sqInt offset, sqInt baseReg)
{
+ AbstractInstruction *anInstruction;
+
/* begin gen:operand:quickConstant:operand: */
- return checkQuickConstantforInstruction(offset, genoperandoperandoperand(MoveRMwr, sourceReg, offset, baseReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperandoperand(MoveRMwr, sourceReg, offset, baseReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(offset));
+ }
+ return anInstruction;
}
/* Cogit>>#MoveR:R: */
@@ -16182,18 +16351,32 @@
static AbstractInstruction * NoDbgRegParms
genCmpClassFloatCompactIndexR(sqInt reg)
{
+ AbstractInstruction *anInstruction;
+
/* begin CmpCq:R: */
/* begin gen:quickConstant:operand: */
- return checkQuickConstantforInstruction(ClassFloatCompactIndex, genoperandoperand(CmpCqR, ClassFloatCompactIndex, reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(CmpCqR, ClassFloatCompactIndex, reg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(ClassFloatCompactIndex));
+ }
+ return anInstruction;
}
/* CogObjectRepresentation>>#genCmpClassMethodContextCompactIndexR: */
static AbstractInstruction * NoDbgRegParms
genCmpClassMethodContextCompactIndexR(sqInt reg)
{
+ AbstractInstruction *anInstruction;
+
/* begin CmpCq:R: */
/* begin gen:quickConstant:operand: */
- return checkQuickConstantforInstruction(ClassMethodContextCompactIndex, genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, reg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(ClassMethodContextCompactIndex));
+ }
+ return anInstruction;
}
@@ -16207,27 +16390,32 @@
}
-/* Generate a compare and branch to test if aRegister contains other than a
+/* Generate a compare and branch to test if aRegister contains a
SmallInteger. Answer the jump. Use scratch if required. Subclasses will
override if scratch is needed. */
- /* CogObjectRepresentation>>#genJumpNotSmallInteger:scratchReg: */
+ /* CogObjectRepresentation>>#genJumpSmallInteger:scratchReg: */
static AbstractInstruction * NoDbgRegParms
-genJumpNotSmallIntegerscratchReg(sqInt aRegister, sqInt scratch)
+genJumpSmallIntegerscratchReg(sqInt aRegister, sqInt scratch)
{
- return genJumpNotSmallInteger(aRegister);
+ return genJumpSmallInteger(aRegister);
}
/* CogObjectRepresentation>>#genLoadSlot:sourceReg:destReg: */
static sqInt NoDbgRegParms
genLoadSlotsourceRegdestReg(sqInt index, sqInt sourceReg, sqInt destReg)
{
+ AbstractInstruction *anInstruction;
sqInt offset;
/* begin MoveMw:r:R: */
offset = (index * BytesPerWord) + BaseHeaderSize;
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(offset, genoperandoperandoperand(MoveMwrR, offset, sourceReg, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperandoperand(MoveMwrR, offset, sourceReg, destReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(offset));
+ }
return 0;
}
@@ -16256,9 +16444,15 @@
static sqInt NoDbgRegParms
genAddSmallIntegerTagsTo(sqInt aRegister)
{
+ AbstractInstruction *anInstruction;
+
/* begin AddCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(1, genoperandoperand(AddCqR, 1, aRegister));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AddCqR, 1, aRegister);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(1));
+ }
return 0;
}
@@ -16292,11 +16486,17 @@
static sqInt NoDbgRegParms
genConvertIntegerToSmallIntegerInReg(sqInt reg)
{
+ AbstractInstruction *anInstruction;
+
/* begin LogicalShiftLeftCq:R: */
genoperandoperand(LogicalShiftLeftCqR, 1, reg);
/* begin AddCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(1, genoperandoperand(AddCqR, 1, reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AddCqR, 1, reg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(1));
+ }
return 0;
}
@@ -16332,13 +16532,19 @@
static sqInt NoDbgRegParms
genFetchIndexRegisterfrominto(sqInt indexReg, sqInt tableObj, sqInt destReg)
{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
sqInt operandOne;
assert(indexReg != destReg);
/* begin AddCq:R: */
/* begin gen:quickConstant:operand: */
operandOne = (BaseHeaderSize / BytesPerWord) - 1;
- checkQuickConstantforInstruction(operandOne, genoperandoperand(AddCqR, operandOne, indexReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AddCqR, operandOne, indexReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(operandOne));
+ }
/* begin genMoveConstant:R: */
if (shouldAnnotateObjectReference(tableObj)) {
annotateobjRef(gMoveCwR(tableObj, destReg), tableObj);
@@ -16346,7 +16552,11 @@
else {
/* begin MoveCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(tableObj, genoperandoperand(MoveCqR, tableObj, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperand(MoveCqR, tableObj, destReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(tableObj));
+ }
}
/* begin MoveXwr:R:R: */
genoperandoperandoperand(MoveXwrRR, indexReg, destReg, destReg);
@@ -16363,15 +16573,25 @@
static sqInt NoDbgRegParms
genGetHashFieldNonImmOfasSmallIntegerInto(sqInt instReg, sqInt destReg)
{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
sqInt quickConstant;
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(4, genoperandoperandoperand(MoveMwrR, 4, instReg, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperandoperand(MoveMwrR, 4, instReg, destReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(4));
+ }
/* begin AndCq:R: */
quickConstant = identityHashHalfWordMask();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant, genoperandoperand(AndCqR, quickConstant, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AndCqR, quickConstant, destReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
genConvertIntegerToSmallIntegerInReg(destReg);
return 0;
}
@@ -16383,15 +16603,25 @@
static sqInt NoDbgRegParms
genGetHashFieldNonImmOfinto(sqInt instReg, sqInt destReg)
{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
sqInt quickConstant;
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(4, genoperandoperandoperand(MoveMwrR, 4, instReg, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperandoperand(MoveMwrR, 4, instReg, destReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(4));
+ }
/* begin AndCq:R: */
quickConstant = identityHashHalfWordMask();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant, genoperandoperand(AndCqR, quickConstant, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AndCqR, quickConstant, destReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
return 0;
}
@@ -16440,15 +16670,15 @@
static AbstractInstruction * NoDbgRegParms
genGetInlineCacheClassTagFromintoforEntry(sqInt sourceReg, sqInt destReg, sqInt forEntry)
{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
+ AbstractInstruction *anInstruction2;
+ AbstractInstruction *anInstruction3;
AbstractInstruction *entryLabel;
- AbstractInstruction *first;
- AbstractInstruction *first1;
AbstractInstruction *immLabel;
AbstractInstruction *jumpCompare;
AbstractInstruction *jumpNotImm;
sqInt quickConstant;
- sqInt quickConstant1;
- sqInt quickConstant2;
if (forEntry) {
/* begin AlignmentNops: */
@@ -16457,63 +16687,51 @@
immLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
/* begin AndCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(1, genoperandoperand(AndCqR, 1, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(AndCqR, 1, destReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(1));
+ }
/* begin Jump: */
jumpCompare = genoperand(Jump, ((sqInt)0));
/* begin AlignmentNops: */
genoperand(AlignmentNops, BytesPerWord);
/* begin Label */
entryLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
- /* begin AndCq:R:R: */
- quickConstant1 = tagMask();
- /* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(quickConstant1, genoperandoperandoperand(AndCqRR, quickConstant1, sourceReg, destReg));
- goto l1;
-
- if (sourceReg == destReg) {
- /* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant1, genoperandoperand(AndCqR, quickConstant1, destReg));
- goto l1;
- }
- first = genoperandoperand(MoveRR, sourceReg, destReg);
- /* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant1, genoperandoperand(AndCqR, quickConstant1, destReg));
- l1: /* end AndCq:R:R: */;
+ gAndCqRR(tagMask(), sourceReg, destReg);
/* begin JumpNonZero: */
genConditionalBranchoperand(JumpNonZero, ((sqInt)immLabel));
flag("endianness");
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(0, genoperandoperandoperand(MoveMwrR, 0, sourceReg, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction3 = genoperandoperandoperand(MoveMwrR, 0, sourceReg, destReg);
+ if (usesOutOfLineLiteral(anInstruction3)) {
+ (anInstruction3->dependent = locateLiteral(0));
+ }
/* begin AndCq:R: */
quickConstant = classIndexMask();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant, genoperandoperand(AndCqR, quickConstant, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperand(AndCqR, quickConstant, destReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(quickConstant));
+ }
jmpTarget(jumpCompare, gLabel());
}
else {
/* begin Label */
entryLabel = genoperandoperand(Label, (labelCounter += 1), bytecodePC);
- /* begin AndCq:R:R: */
- quickConstant2 = tagMask();
- /* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(quickConstant2, genoperandoperandoperand(AndCqRR, quickConstant2, sourceReg, destReg));
- goto l2;
-
- if (sourceReg == destReg) {
- /* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant2, genoperandoperand(AndCqR, quickConstant2, destReg));
- goto l2;
- }
- first1 = genoperandoperand(MoveRR, sourceReg, destReg);
- /* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant2, genoperandoperand(AndCqR, quickConstant2, destReg));
- l2: /* end AndCq:R:R: */;
+ gAndCqRR(tagMask(), sourceReg, destReg);
/* begin JumpZero: */
jumpNotImm = genConditionalBranchoperand(JumpZero, ((sqInt)0));
/* begin AndCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(1, genoperandoperand(AndCqR, 1, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction2 = genoperandoperand(AndCqR, 1, destReg);
+ if (usesOutOfLineLiteral(anInstruction2)) {
+ (anInstruction2->dependent = locateLiteral(1));
+ }
/* begin Jump: */
jumpCompare = genoperand(Jump, ((sqInt)0));
flag("endianness");
@@ -16527,9 +16745,15 @@
static sqInt NoDbgRegParms
genGetOverflowSlotsOfinto(sqInt srcReg, sqInt destReg)
{
+ AbstractInstruction *anInstruction;
+
/* begin MoveMw:r:R: */
/* begin gen:quickConstant:operand:operand: */
- checkQuickConstantforInstruction(-BaseHeaderSize, genoperandoperandoperand(MoveMwrR, -BaseHeaderSize, srcReg, destReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperandoperand(MoveMwrR, -BaseHeaderSize, srcReg, destReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(-BaseHeaderSize));
+ }
return 0;
}
@@ -16540,6 +16764,21 @@
static sqInt NoDbgRegParms
genInnerPrimitiveAtPut(sqInt retNoffset)
{
+ AbstractInstruction *anInstruction;
+ AbstractInstruction *anInstruction1;
+ AbstractInstruction *anInstruction10;
+ AbstractInstruction *anInstruction11;
+ AbstractInstruction *anInstruction12;
+ AbstractInstruction *anInstruction13;
+ AbstractInstruction *anInstruction14;
+ AbstractInstruction *anInstruction2;
+ AbstractInstruction *anInstruction3;
+ AbstractInstruction *anInstruction4;
+ AbstractInstruction *anInstruction5;
+ AbstractInstruction *anInstruction6;
+ AbstractInstruction *anInstruction7;
+ AbstractInstruction *anInstruction8;
+ AbstractInstruction *anInstruction9;
sqInt formatReg;
AbstractInstruction *jumpArrayOutOfBounds;
AbstractInstruction *jumpBadIndex;
@@ -16572,24 +16811,37 @@
/* c.f. StackInterpreter>>stSizeOf: SpurMemoryManager>>lengthOf:format: fixedFieldsOf:format:length: */
jumpImmediate = genJumpImmediate(ReceiverResultReg);
- jumpBadIndex = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpBadIndex = genJumpNotSmallInteger(Arg0Reg);
genConvertSmallIntegerToIntegerInReg(Arg0Reg);
/* begin SubCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(1, genoperandoperand(SubCqR, 1, Arg0Reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction14 = genoperandoperand(SubCqR, 1, Arg0Reg);
+ if (usesOutOfLineLiteral(anInstruction14)) {
+ (anInstruction14->dependent = locateLiteral(1));
+ }
genGetFormatOfintoleastSignificantHalfOfBaseHeaderIntoScratch(ReceiverResultReg, (formatReg = SendNumArgsReg), NoReg);
genGetNumSlotsOfinto(ReceiverResultReg, ClassReg);
/* begin CmpCq:R: */
quickConstant = weakArrayFormat();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant, genoperandoperand(CmpCqR, quickConstant, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction1 = genoperandoperand(CmpCqR, quickConstant, formatReg);
+ if (usesOutOfLineLiteral(anInstruction1)) {
+ (anInstruction1->dependent = locateLiteral(quickConstant));
+ }
/* begin JumpAbove: */
jumpNotPointers = genConditionalBranchoperand(JumpAbove, ((sqInt)0));
genStoreCheckReceiverRegvalueRegscratchReginFrame(ReceiverResultReg, Arg1Reg, TempReg, 0);
/* begin CmpCq:R: */
quickConstant1 = arrayFormat();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant1, genoperandoperand(CmpCqR, quickConstant1, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction2 = genoperandoperand(CmpCqR, quickConstant1, formatReg);
+ if (usesOutOfLineLiteral(anInstruction2)) {
+ (anInstruction2->dependent = locateLiteral(quickConstant1));
+ }
/* begin JumpBelow: */
jumpNotIndexablePointers = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
/* begin JumpNonZero: */
@@ -16601,7 +16853,11 @@
/* begin AddCq:R: */
/* begin gen:quickConstant:operand: */
operandOne = ((usqInt) BaseHeaderSize) >> (shiftForWord());
- checkQuickConstantforInstruction(operandOne, genoperandoperand(AddCqR, operandOne, Arg0Reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction3 = genoperandoperand(AddCqR, operandOne, Arg0Reg);
+ if (usesOutOfLineLiteral(anInstruction3)) {
+ (anInstruction3->dependent = locateLiteral(operandOne));
+ }
/* begin MoveR:Xwr:R: */
genoperandoperandoperand(MoveRXwrR, Arg1Reg, Arg0Reg, ReceiverResultReg);
/* begin MoveR:R: */
@@ -16612,7 +16868,11 @@
genGetClassIndexOfNonImminto(ReceiverResultReg, formatReg);
/* begin CmpCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(ClassMethodContextCompactIndex, genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction4 = genoperandoperand(CmpCqR, ClassMethodContextCompactIndex, formatReg);
+ if (usesOutOfLineLiteral(anInstruction4)) {
+ (anInstruction4->dependent = locateLiteral(ClassMethodContextCompactIndex));
+ }
/* begin JumpZero: */
jumpIsContext = genConditionalBranchoperand(JumpZero, ((sqInt)0));
/* begin PushR: */
@@ -16625,13 +16885,21 @@
/* begin AndCq:R: */
quickConstant2 = fixedFieldsOfClassFormatMask();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant2, genoperandoperand(AndCqR, quickConstant2, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction5 = genoperandoperand(AndCqR, quickConstant2, formatReg);
+ if (usesOutOfLineLiteral(anInstruction5)) {
+ (anInstruction5->dependent = locateLiteral(quickConstant2));
+ }
/* begin SubR:R: */
genoperandoperand(SubRR, formatReg, ClassReg);
/* begin AddCq:R: */
/* begin gen:quickConstant:operand: */
operandOne1 = ((usqInt) BaseHeaderSize) >> (shiftForWord());
- checkQuickConstantforInstruction(operandOne1, genoperandoperand(AddCqR, operandOne1, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction6 = genoperandoperand(AddCqR, operandOne1, formatReg);
+ if (usesOutOfLineLiteral(anInstruction6)) {
+ (anInstruction6->dependent = locateLiteral(operandOne1));
+ }
/* begin CmpR:R: */
genoperandoperand(CmpRR, Arg0Reg, ClassReg);
/* begin JumpBelowOrEqual: */
@@ -16647,23 +16915,36 @@
jmpTarget(jumpNotPointers, gCmpCqR(firstCompiledMethodFormat(), formatReg));
/* begin JumpAboveOrEqual: */
jumpIsCompiledMethod = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
- jumpNonSmallIntegerValue = genJumpNotSmallIntegerscratchReg(Arg1Reg, TempReg);
+ /* begin genJumpNotSmallInteger:scratchReg: */
+ jumpNonSmallIntegerValue = genJumpNotSmallInteger(Arg1Reg);
/* begin CmpCq:R: */
quickConstant3 = firstByteFormat();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant3, genoperandoperand(CmpCqR, quickConstant3, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction7 = genoperandoperand(CmpCqR, quickConstant3, formatReg);
+ if (usesOutOfLineLiteral(anInstruction7)) {
+ (anInstruction7->dependent = locateLiteral(quickConstant3));
+ }
/* begin JumpAboveOrEqual: */
jumpIsBytes = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
/* begin CmpCq:R: */
quickConstant4 = firstShortFormat();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant4, genoperandoperand(CmpCqR, quickConstant4, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction8 = genoperandoperand(CmpCqR, quickConstant4, formatReg);
+ if (usesOutOfLineLiteral(anInstruction8)) {
+ (anInstruction8->dependent = locateLiteral(quickConstant4));
+ }
/* begin JumpAboveOrEqual: */
jumpShortsUnsupported = genConditionalBranchoperand(JumpAboveOrEqual, ((sqInt)0));
/* begin CmpCq:R: */
quickConstant5 = firstLongFormat();
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(quickConstant5, genoperandoperand(CmpCqR, quickConstant5, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction9 = genoperandoperand(CmpCqR, quickConstant5, formatReg);
+ if (usesOutOfLineLiteral(anInstruction9)) {
+ (anInstruction9->dependent = locateLiteral(quickConstant5));
+ }
/* begin JumpBelow: */
jumpNotIndexableBits = genConditionalBranchoperand(JumpBelow, ((sqInt)0));
/* begin CmpR:R: */
@@ -16676,14 +16957,22 @@
if (!(setsConditionCodesFor(lastOpcode(), JumpNegative))) {
/* begin CmpCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(0, genoperandoperand(CmpCqR, 0, ClassReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction = genoperandoperand(CmpCqR, 0, ClassReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(0));
+ }
}
/* begin JumpNegative: */
jumpNegative = genConditionalBranchoperand(JumpNegative, ((sqInt)0));
/* begin AddCq:R: */
/* begin gen:quickConstant:operand: */
operandOne2 = ((usqInt) BaseHeaderSize) >> (shiftForWord());
- checkQuickConstantforInstruction(operandOne2, genoperandoperand(AddCqR, operandOne2, Arg0Reg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction10 = genoperandoperand(AddCqR, operandOne2, Arg0Reg);
+ if (usesOutOfLineLiteral(anInstruction10)) {
+ (anInstruction10->dependent = locateLiteral(operandOne2));
+ }
/* begin MoveR:Xwr:R: */
genoperandoperandoperand(MoveRXwrR, TempReg, Arg0Reg, ReceiverResultReg);
/* begin MoveR:R: */
@@ -16697,7 +16986,11 @@
genoperandoperand(LogicalShiftLeftCqR, shiftForWord(), ClassReg);
/* begin AndCq:R: */
/* begin gen:quickConstant:operand: */
- checkQuickConstantforInstruction(BytesPerWord - 1, genoperandoperand(AndCqR, BytesPerWord - 1, formatReg));
+ /* begin checkQuickConstant:forInstruction: */
+ anInstruction11 = genoperandoperand(AndCqR, BytesPerWord - 1, formatReg);
+ if (usesOutOfLineLiteral(anInstruction11)) {
+ (anInstruction11->dependent = locateLiteral(BytesPerWord - 1));
+ }
/* begin SubR:R: */
genoperandoperand(SubRR, formatReg, ClassReg);
/* begin CmpR:R: */
@@ -16709,7 +17002,11 @@
genConvertSmallIntegerToIntegerInReg(TempReg);
/* begin AddCq:R: */
/* begin gen:quickConstant:operand: */
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list