[Vm-dev] [commit][3553] CogVm source as per VMMaker.oscog-eem.1630
commits at squeakvm.org
commits at squeakvm.org
Sun Jan 10 22:51:44 UTC 2016
Revision: 3553
Author: eliot
Date: 2016-01-10 14:51:42 -0800 (Sun, 10 Jan 2016)
Log Message:
-----------
CogVm source as per VMMaker.oscog-eem.1630
Cogit:
Fix the bug in ceCaptureStackPointers caused by pushing VarBasReg to save it
offsetting the stack pointer.
Eliminate all the maybe*VarBase methods since we have hasVarBaseRegister and
the few clients can test that and hnce not have to divine if maybeSaveVarBase
pushed something or not.
On Mac IS X modify the stack alignment definitions to reflect documented
Apple policy.
Modified Paths:
--------------
branches/Cog/nsspursrc/vm/cogit.h
branches/Cog/nsspursrc/vm/cogitARMv5.c
branches/Cog/nsspursrc/vm/cogitIA32.c
branches/Cog/nsspursrc/vm/cogitMIPSEL.c
branches/Cog/platforms/Cross/vm/sqCogStackAlignment.h
branches/Cog/spur64src/vm/cogit.h
branches/Cog/spur64src/vm/cogitX64.c
branches/Cog/spursistasrc/vm/cogit.h
branches/Cog/spursistasrc/vm/cogitARMv5.c
branches/Cog/spursistasrc/vm/cogitIA32.c
branches/Cog/spursistasrc/vm/cogitMIPSEL.c
branches/Cog/spursrc/vm/cogit.h
branches/Cog/spursrc/vm/cogitARMv5.c
branches/Cog/spursrc/vm/cogitIA32.c
branches/Cog/spursrc/vm/cogitMIPSEL.c
branches/Cog/src/vm/cogit.h
branches/Cog/src/vm/cogitARMv5.c
branches/Cog/src/vm/cogitIA32.c
branches/Cog/src/vm/cogitMIPSEL.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspursrc/vm/cogit.h
===================================================================
--- branches/Cog/nsspursrc/vm/cogit.h 2016-01-10 21:49:21 UTC (rev 3552)
+++ branches/Cog/nsspursrc/vm/cogit.h 2016-01-10 22:51:42 UTC (rev 3553)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ CCodeGenerator VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
*/
Modified: branches/Cog/nsspursrc/vm/cogitARMv5.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitARMv5.c 2016-01-10 21:49:21 UTC (rev 3552)
+++ branches/Cog/nsspursrc/vm/cogitARMv5.c 2016-01-10 22:51:42 UTC (rev 3553)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ CCodeGenerator VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -955,7 +955,6 @@
static sqInt endSizeOffset(void);
static sqInt NoDbgRegParms literalInstructionInRange(AbstractInstruction *litInst);
static AbstractInstruction * NoDbgRegParms locateLiteral(sqInt aLiteral);
-static sqInt NoDbgRegParms mustDumpLiterals(sqInt currentOpcodeIndex);
static sqInt resetForBlockCompile(void);
static sqInt saveForBlockCompile(void);
static sqInt compileBlockDispatch(void);
@@ -10067,14 +10066,14 @@
sqInt size;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
+ /* begin MoveCq:R: */
quickConstant = varBaseAddress();
/* begin gen:quickConstant:operand: */
anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
if (usesOutOfLineLiteral(anInstruction)) {
(anInstruction->dependent = locateLiteral(quickConstant));
}
- ((AbstractInstruction *) backEnd);
+
genLoadStackPointers(backEnd);
if (regArg3OrNone != NoReg) {
/* begin PopR: */
@@ -10163,6 +10162,7 @@
sqInt fixupSize;
sqInt opcodeSize;
sqInt quickConstant;
+ sqInt quickConstant1;
sqInt startAddress;
/* begin allocateOpcodes:bytecodes: */
@@ -10174,32 +10174,42 @@
fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
zeroOpcodeIndex();
labelCounter = 0;
+
+ /* Must happen first; value may be used in accessing any of the following addresses */
startAddress = methodZoneBase;
- /* begin maybeSaveVarBase */
+ /* begin PushR: */
genoperand(PushR, VarBaseReg);
- ((AbstractInstruction *) backEnd);
- /* begin maybeEstablishVarBase */
- quickConstant = varBaseAddress();
+ /* begin MoveCq:R: */
+ quickConstant1 = varBaseAddress();
/* begin gen:quickConstant:operand: */
- anInstruction1 = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
+ anInstruction1 = genoperandoperand(MoveCqR, quickConstant1, VarBaseReg);
if (usesOutOfLineLiteral(anInstruction1)) {
- (anInstruction1->dependent = locateLiteral(quickConstant));
+ (anInstruction1->dependent = locateLiteral(quickConstant1));
}
- ((AbstractInstruction *) backEnd);
+
if (captureFramePointer) {
/* begin MoveR:Aw: */
address = cFramePointerAddress();
/* begin gen:operand:literal: */
checkLiteralforInstruction(address, genoperandoperand(MoveRAw, FPReg, address));
}
+ /* begin MoveR:R: */
+ genoperandoperand(MoveRR, SPReg, TempReg);
+ /* begin AddCq:R: */
+ quickConstant = 0 + BytesPerWord;
+ /* begin gen:quickConstant:operand: */
+ anInstruction = genoperandoperand(AddCqR, quickConstant, TempReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
+ }
/* begin MoveR:Aw: */
address1 = cStackPointerAddress();
/* begin gen:operand:literal: */
- checkLiteralforInstruction(address1, genoperandoperand(MoveRAw, SPReg, address1));
+ checkLiteralforInstruction(address1, genoperandoperand(MoveRAw, TempReg, address1));
- /* begin maybeRestoreVarBase */
+ /* begin PopR: */
genoperand(PopR, VarBaseReg);
- ((AbstractInstruction *) backEnd);
+
/* begin RetN: */
genoperand(RetN, 0);
outputInstructionsForGeneratedRuntimeAt(startAddress);
@@ -16169,7 +16179,6 @@
jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
genRemoveSmallIntegerTagsInScratchReg(Arg1Reg);
- /* begin MulR:R: */
genMulRR(backEnd, Arg1Reg, ClassReg);
/* begin JumpOverflow: */
jumpOvfl = genConditionalBranchoperand(JumpOverflow, ((sqInt)0));
@@ -21984,14 +21993,6 @@
return litInst;
}
- /* OutOfLineLiteralsManager>>#mustDumpLiterals: */
-static sqInt NoDbgRegParms
-mustDumpLiterals(sqInt currentOpcodeIndex)
-{
- return (currentOpcodeIndex >= firstOpcodeIndex)
- && ((currentOpcodeIndex - firstOpcodeIndex) >= (outOfLineLiteralOpcodeLimit(backEnd())));
-}
-
/* OutOfLineLiteralsManager>>#resetForBlockCompile */
static sqInt
resetForBlockCompile(void)
@@ -23445,14 +23446,14 @@
sqInt reg;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
+ /* begin MoveCq:R: */
quickConstant = varBaseAddress();
/* begin gen:quickConstant:operand: */
- anInstruction6 = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
- if (usesOutOfLineLiteral(anInstruction6)) {
- (anInstruction6->dependent = locateLiteral(quickConstant));
+ anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
+ if (usesOutOfLineLiteral(anInstruction)) {
+ (anInstruction->dependent = locateLiteral(quickConstant));
}
- ((AbstractInstruction *) backEnd);
+
if (profiling) {
/* Test nextProfileTick for being non-zero and call checkProfileTick: if so.
@@ -23508,9 +23509,9 @@
checkLiteralforInstruction(address8, genoperandoperand(MoveAwR, address8, reg));
genLoadStackPointers(backEnd);
/* begin MoveMw:r:R: */
- anInstruction4 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
- if (usesOutOfLineLiteral(anInstruction4)) {
- (anInstruction4->dependent = locateLiteral(0));
+ anInstruction5 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
+ if (usesOutOfLineLiteral(anInstruction5)) {
+ (anInstruction5->dependent = locateLiteral(0));
}
/* begin RetN: */
@@ -24798,7 +24799,8 @@
(fixup->targetInstruction = abstractInstructionAt(nextOpcodeIndex));
}
/* begin maybeDumpLiterals: */
- if ((mustDumpLiterals(opcodeIndex))
+ if (((opcodeIndex >= firstOpcodeIndex)
+ && ((opcodeIndex - firstOpcodeIndex) >= (outOfLineLiteralOpcodeLimit(backEnd()))))
|| ((isUnconditionalBranch(descriptor))
|| ((descriptor->isReturn)))) {
dumpLiterals(!((isUnconditionalBranch(descriptor))
@@ -25439,14 +25441,14 @@
sqInt size;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
+ /* begin MoveCq:R: */
quickConstant = varBaseAddress();
/* begin gen:quickConstant:operand: */
anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
if (usesOutOfLineLiteral(anInstruction)) {
(anInstruction->dependent = locateLiteral(quickConstant));
}
- ((AbstractInstruction *) backEnd);
+
genLoadStackPointers(backEnd);
/* begin PopR: */
genoperand(PopR, ClassReg);
Modified: branches/Cog/nsspursrc/vm/cogitIA32.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitIA32.c 2016-01-10 21:49:21 UTC (rev 3552)
+++ branches/Cog/nsspursrc/vm/cogitIA32.c 2016-01-10 22:51:42 UTC (rev 3553)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ CCodeGenerator VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -929,8 +929,7 @@
static sqInt genLongUnconditionalForwardJump(void);
static sqInt NoDbgRegParms genLookupForPerformNumArgs(sqInt numArgs);
static AbstractInstruction * NoDbgRegParms genMoveConstantR(sqInt constant, sqInt reg);
-static AbstractInstruction * NoDbgRegParms genMoveFalseR(sqInt reg);
-static sqInt NoDbgRegParms genMoveTrueR(sqInt reg);
+static AbstractInstruction * NoDbgRegParms genMoveTrueR(sqInt reg);
static sqInt NoDbgRegParms genMustBeBooleanTrampolineForcalled(sqInt boolean, char *trampolineName);
static void NoDbgRegParms genPrimReturnEnterCogCodeEnilopmart(sqInt profiling);
static sqInt genPushClosureTempsBytecode(void);
@@ -3148,7 +3147,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset15) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset15) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset15) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpLongNonZero:
@@ -3188,7 +3187,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset17) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset17) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset17) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case Jump:
@@ -3253,7 +3252,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset19) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset19) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset19) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpNonNegative:
@@ -3291,7 +3290,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset110) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset110) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset110) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpOverflow:
@@ -3329,7 +3328,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset111) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset111) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset111) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpNoOverflow:
@@ -3367,7 +3366,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset112) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset112) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset112) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpCarry:
@@ -3407,7 +3406,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset113) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset113) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset113) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpNoCarry:
@@ -3447,7 +3446,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset114) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset114) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset114) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpLess:
@@ -3485,7 +3484,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset115) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset115) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset115) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpGreaterOrEqual:
@@ -3523,7 +3522,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset116) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset116) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset116) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpGreater:
@@ -3561,7 +3560,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset117) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset117) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset117) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpLessOrEqual:
@@ -3599,7 +3598,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset118) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset118) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset118) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpAbove:
@@ -3638,7 +3637,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset119) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset119) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset119) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpBelowOrEqual:
@@ -3677,7 +3676,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset120) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset120) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset120) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpFPOrdered:
@@ -3715,7 +3714,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset121) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset121) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset121) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case JumpFPUnordered:
@@ -3753,7 +3752,7 @@
((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) offset122) >> 8) & 0xFF);
((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset122) >> 16) & 0xFF);
((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset122) >> 24) & 0xFF);
- ((usqInt) (((self_in_dispatchConcretize->machineCodeSize) = 6)));
+ ((self_in_dispatchConcretize->machineCodeSize) = 6);
return;
case RetN:
@@ -9211,13 +9210,13 @@
static void (*genEnilopmartForandandforCallcalled(sqInt regArg1, sqInt regArg2OrNone, sqInt regArg3OrNone, sqInt forCall, char *trampolineName))(void)
{
+ AbstractInstruction *anInstruction;
sqInt endAddress;
sqInt enilopmart;
+ sqInt quickConstant;
sqInt size;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
genLoadStackPointers(backEnd);
if (regArg3OrNone != NoReg) {
/* begin PopR: */
@@ -9294,9 +9293,11 @@
AbstractInstruction *anInstruction1;
AbstractInstruction *anInstruction2;
AbstractInstruction *anInstruction3;
+ AbstractInstruction *anInstruction4;
sqInt fixupSize;
sqInt opcodeSize;
sqInt quickConstant;
+ sqInt quickConstant1;
sqInt startAddress;
/* begin allocateOpcodes:bytecodes: */
@@ -9308,16 +9309,14 @@
fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
zeroOpcodeIndex();
labelCounter = 0;
+
+ /* Must happen first; value may be used in accessing any of the following addresses */
startAddress = methodZoneBase;
- /* begin maybeSaveVarBase */
- ((AbstractInstruction *) backEnd);
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
if (captureFramePointer) {
/* begin MoveR:Aw: */
address = cFramePointerAddress();
/* begin gen:operand:literal: */
- anInstruction1 = genoperandoperand(MoveRAw, FPReg, address);
+ anInstruction2 = genoperandoperand(MoveRAw, FPReg, address);
}
/* begin MoveR:R: */
genoperandoperand(MoveRR, SPReg, TempReg);
@@ -9326,12 +9325,10 @@
/* begin gen:quickConstant:operand: */
anInstruction = genoperandoperand(AddCqR, quickConstant, TempReg);
/* begin MoveR:Aw: */
- address2 = cStackPointerAddress();
+ address1 = cStackPointerAddress();
/* begin gen:operand:literal: */
- anInstruction3 = genoperandoperand(MoveRAw, TempReg, address2);
+ anInstruction3 = genoperandoperand(MoveRAw, TempReg, address1);
- /* begin maybeRestoreVarBase */
- ((AbstractInstruction *) backEnd);
/* begin RetN: */
genoperand(RetN, 0);
outputInstructionsForGeneratedRuntimeAt(startAddress);
@@ -9554,12 +9551,12 @@
generateMapAtstart(sqInt addressOrNull, sqInt startAddress)
{
unsigned char annotation;
- usqInt delta;
+ sqInt delta;
sqInt i;
AbstractInstruction *instruction;
sqInt length;
- usqInt location;
- usqInt mapEntry;
+ sqInt location;
+ sqInt mapEntry;
sqInt maxDelta;
usqInt mcpc;
@@ -10912,7 +10909,8 @@
literal = literalBeforeFollowingAddress(backEnd, mcpc);
mappedLiteral = remapObject(literal);
if (mappedLiteral != literal) {
- storeLiteralbeforeFollowingAddress(backEnd, mappedLiteral, mcpc);
+ /* begin storeLiteral:atAnnotatedAddress:using: */
+ storeLiteralbeforeFollowingAddress(((AbstractInstruction *) backEnd), mappedLiteral, mcpc);
codeModified = 1;
}
}
@@ -12624,7 +12622,8 @@
if (couldBeObject(literal)) {
mappedLiteral = remapObject(literal);
if (literal != mappedLiteral) {
- storeLiteralbeforeFollowingAddress(backEnd, mappedLiteral, ((usqInt)mcpc));
+ /* begin storeLiteral:atAnnotatedAddress:using: */
+ storeLiteralbeforeFollowingAddress(((AbstractInstruction *) backEnd), mappedLiteral, ((usqInt)mcpc));
codeModified = 1;
}
if ((hasYoungPtr != 0)
@@ -14594,7 +14593,7 @@
/* FP jumps are a little weird */
jumpCond = jumpOpcodeGenerator(0);
- /* begin genMoveFalseR: */
+ /* begin genMoveConstant:R: */
constant = falseObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -14607,7 +14606,7 @@
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
genoperand(RetN, 0);
- jmpTarget(jumpCond, genMoveConstantR(trueObject(), ReceiverResultReg));
+ jmpTarget(jumpCond, genMoveTrueR(ReceiverResultReg));
/* begin genPrimReturn */
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
@@ -15378,7 +15377,7 @@
/* begin CmpR:R: */
genoperandoperand(CmpRR, Arg0Reg, ReceiverResultReg);
jumpTrue = genConditionalBranchoperand(jumpOpcode, 0);
- /* begin genMoveFalseR: */
+ /* begin genMoveConstant:R: */
constant = falseObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -15391,7 +15390,7 @@
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
genoperand(RetN, 0);
- jmpTarget(jumpTrue, genMoveConstantR(trueObject(), ReceiverResultReg));
+ jmpTarget(jumpTrue, genMoveTrueR(ReceiverResultReg));
/* begin genPrimReturn */
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
@@ -15446,7 +15445,7 @@
/* FP jumps are a little weird */
jumpCond = jumpFPOpcodeGenerator(0);
- /* begin genMoveFalseR: */
+ /* begin genMoveConstant:R: */
constant = falseObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -15459,7 +15458,7 @@
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
genoperand(RetN, 0);
- jmpTarget(jumpCond, genMoveConstantR(trueObject(), ReceiverResultReg));
+ jmpTarget(jumpCond, genMoveTrueR(ReceiverResultReg));
/* begin genPrimReturn */
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
@@ -18558,7 +18557,7 @@
/* begin JumpNonZero: */
jumpCmp = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
}
- /* begin genMoveConstant:R: */
+ /* begin genMoveTrueR: */
constant = trueObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -18571,7 +18570,7 @@
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
genoperand(RetN, 0);
- jmpTarget(jumpCmp, genMoveFalseR(ReceiverResultReg));
+ jmpTarget(jumpCmp, genMoveConstantR(falseObject(), ReceiverResultReg));
/* begin genPrimReturn */
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
@@ -20772,24 +20771,8 @@
anInstruction));
}
- /* SimpleStackBasedCogit>>#genMoveFalseR: */
-static AbstractInstruction * NoDbgRegParms
-genMoveFalseR(sqInt reg)
-{
- AbstractInstruction *anInstruction;
- sqInt constant;
-
- /* begin genMoveConstant:R: */
- constant = falseObject();
- return (shouldAnnotateObjectReference(constant)
- ? annotateobjRef(gMoveCwR(constant, reg), constant)
- : (/* begin MoveCq:R: */
- (anInstruction = genoperandoperand(MoveCqR, constant, reg)),
- anInstruction));
-}
-
/* SimpleStackBasedCogit>>#genMoveTrueR: */
-static sqInt NoDbgRegParms
+static AbstractInstruction * NoDbgRegParms
genMoveTrueR(sqInt reg)
{
AbstractInstruction *anInstruction;
@@ -20846,6 +20829,7 @@
AbstractInstruction *anInstruction15;
AbstractInstruction *anInstruction16;
AbstractInstruction *anInstruction17;
+ AbstractInstruction *anInstruction18;
AbstractInstruction *anInstruction2;
AbstractInstruction *anInstruction3;
AbstractInstruction *anInstruction4;
@@ -20858,11 +20842,10 @@
AbstractInstruction *continuePostSample;
AbstractInstruction *jmpFail;
AbstractInstruction *jmpSample;
+ sqInt quickConstant;
sqInt reg;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
if (profiling) {
/* Test nextProfileTick for being non-zero and call checkProfileTick: if so.
@@ -20870,11 +20853,11 @@
/* begin MoveAw:R: */
address = nextProfileTickAddress();
/* begin gen:literal:operand: */
- anInstruction = genoperandoperand(MoveAwR, address, TempReg);
+ anInstruction1 = genoperandoperand(MoveAwR, address, TempReg);
/* begin MoveAw:R: */
address1 = (nextProfileTickAddress()) + BytesPerWord;
/* begin gen:literal:operand: */
- anInstruction1 = genoperandoperand(MoveAwR, address1, ClassReg);
+ anInstruction2 = genoperandoperand(MoveAwR, address1, ClassReg);
/* begin OrR:R: */
genoperandoperand(OrRR, TempReg, ClassReg);
@@ -20887,21 +20870,21 @@
/* begin MoveAw:R: */
address6 = primFailCodeAddress();
/* begin gen:literal:operand: */
- anInstruction12 = genoperandoperand(MoveAwR, address6, TempReg);
+ anInstruction13 = genoperandoperand(MoveAwR, address6, TempReg);
flag("ask concrete code gen if move sets condition codes?");
/* begin CmpCq:R: */
- anInstruction13 = genoperandoperand(CmpCqR, 0, TempReg);
+ anInstruction14 = genoperandoperand(CmpCqR, 0, TempReg);
/* begin JumpNonZero: */
jmpFail = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
/* begin MoveAw:R: */
address5 = instructionPointerAddress();
/* begin gen:literal:operand: */
- anInstruction7 = genoperandoperand(MoveAwR, address5, ClassReg);
+ anInstruction8 = genoperandoperand(MoveAwR, address5, ClassReg);
genLoadStackPointers(backEnd);
/* begin MoveMw:r:R: */
- anInstruction8 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
+ anInstruction9 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
/* begin MoveR:Mw:r: */
- anInstruction9 = genoperandoperandoperand(MoveRMwr, ClassReg, 0, SPReg);
+ anInstruction10 = genoperandoperandoperand(MoveRMwr, ClassReg, 0, SPReg);
/* begin RetN: */
genoperand(RetN, 0);
@@ -20909,16 +20892,16 @@
/* begin MoveAw:R: */
address7 = cStackPointerAddress();
/* begin gen:literal:operand: */
- anInstruction14 = genoperandoperand(MoveAwR, address7, SPReg);
+ anInstruction15 = genoperandoperand(MoveAwR, address7, SPReg);
compileCallFornumArgsargargargargresultRegsaveRegs(ceActivateFailingPrimitiveMethod, 1, SendNumArgsReg, null, null, null, NoReg, 0);
/* begin MoveAw:R: */
address8 = instructionPointerAddress();
reg = ClassReg;
/* begin gen:literal:operand: */
- anInstruction15 = genoperandoperand(MoveAwR, address8, reg);
+ anInstruction16 = genoperandoperand(MoveAwR, address8, reg);
genLoadStackPointers(backEnd);
/* begin MoveMw:r:R: */
- anInstruction11 = genoperandoperandoperand(MoveMwrR, BytesPerWord, SPReg, ReceiverResultReg);
+ anInstruction12 = genoperandoperandoperand(MoveMwrR, BytesPerWord, SPReg, ReceiverResultReg);
/* begin PushR: */
genoperand(PushR, ClassReg);
@@ -20932,8 +20915,8 @@
/* begin CallFullRT: */
callTarget = (unsigned long)ceCheckProfileTick;
/* begin annotateCall: */
- anInstruction17 = genoperand(CallFull, callTarget);
- abstractInstruction = anInstruction17;
+ anInstruction18 = genoperand(CallFull, callTarget);
+ abstractInstruction = anInstruction18;
(abstractInstruction->annotation = IsRelativeCall);
@@ -22805,14 +22788,14 @@
static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void)
{
+ AbstractInstruction *anInstruction;
sqInt endAddress;
sqInt enilopmart;
+ sqInt quickConstant;
sqInt reg;
sqInt size;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
genLoadStackPointers(backEnd);
/* begin PopR: */
genoperand(PopR, ClassReg);
Modified: branches/Cog/nsspursrc/vm/cogitMIPSEL.c
===================================================================
--- branches/Cog/nsspursrc/vm/cogitMIPSEL.c 2016-01-10 21:49:21 UTC (rev 3552)
+++ branches/Cog/nsspursrc/vm/cogitMIPSEL.c 2016-01-10 22:51:42 UTC (rev 3553)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ CCodeGenerator VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -756,11 +756,11 @@
static sqInt NoDbgRegParms computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize);
static usqInt NoDbgRegParms concretizeAddCheckOverflowCqR(AbstractInstruction * self_in_concretizeAddCheckOverflowCqR);
static usqInt NoDbgRegParms concretizeAddCheckOverflowRR(AbstractInstruction * self_in_concretizeAddCheckOverflowRR);
-static usqInt NoDbgRegParms concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR);
+static sqInt NoDbgRegParms concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR);
static usqInt NoDbgRegParms concretizeAddCwR(AbstractInstruction * self_in_concretizeAddCwR);
static usqInt NoDbgRegParms concretizeAddRR(AbstractInstruction * self_in_concretizeAddRR);
static AbstractInstruction * NoDbgRegParms concretizeAlignmentNops(AbstractInstruction * self_in_concretizeAlignmentNops);
-static usqInt NoDbgRegParms concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR);
+static sqInt NoDbgRegParms concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR);
static usqInt NoDbgRegParms concretizeAndCqRR(AbstractInstruction * self_in_concretizeAndCqRR);
static usqInt NoDbgRegParms concretizeAndCwR(AbstractInstruction * self_in_concretizeAndCwR);
static usqInt NoDbgRegParms concretizeAndRR(AbstractInstruction * self_in_concretizeAndRR);
@@ -779,7 +779,7 @@
static usqInt NoDbgRegParms concretizeBrUnsignedGreaterRR(AbstractInstruction * self_in_concretizeBrUnsignedGreaterRR);
static usqInt NoDbgRegParms concretizeBrUnsignedLessEqualRR(AbstractInstruction * self_in_concretizeBrUnsignedLessEqualRR);
static usqInt NoDbgRegParms concretizeBrUnsignedLessRR(AbstractInstruction * self_in_concretizeBrUnsignedLessRR);
-static usqInt NoDbgRegParms concretizeCall(AbstractInstruction * self_in_concretizeCall);
+static sqInt NoDbgRegParms concretizeCall(AbstractInstruction * self_in_concretizeCall);
static usqInt NoDbgRegParms concretizeCallFull(AbstractInstruction * self_in_concretizeCallFull);
static sqInt NoDbgRegParms concretizeCmpCqR(AbstractInstruction * self_in_concretizeCmpCqR);
static sqInt NoDbgRegParms concretizeCmpCwR(AbstractInstruction * self_in_concretizeCmpCwR);
@@ -829,12 +829,12 @@
static usqInt NoDbgRegParms concretizeMulCheckOverflowRR(AbstractInstruction * self_in_concretizeMulCheckOverflowRR);
static usqInt NoDbgRegParms concretizeNegateR(AbstractInstruction * self_in_concretizeNegateR);
static usqInt NoDbgRegParms concretizeNop(AbstractInstruction * self_in_concretizeNop);
-static usqInt NoDbgRegParms concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR);
+static sqInt NoDbgRegParms concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR);
static usqInt NoDbgRegParms concretizeOrCwR(AbstractInstruction * self_in_concretizeOrCwR);
static usqInt NoDbgRegParms concretizeOrRR(AbstractInstruction * self_in_concretizeOrRR);
static usqInt NoDbgRegParms concretizePopR(AbstractInstruction * self_in_concretizePopR);
static usqInt NoDbgRegParms concretizePrefetchAw(AbstractInstruction * self_in_concretizePrefetchAw);
-static usqInt NoDbgRegParms concretizePushCq(AbstractInstruction * self_in_concretizePushCq);
+static sqInt NoDbgRegParms concretizePushCq(AbstractInstruction * self_in_concretizePushCq);
static usqInt NoDbgRegParms concretizePushCw(AbstractInstruction * self_in_concretizePushCw);
static usqInt NoDbgRegParms concretizePushR(AbstractInstruction * self_in_concretizePushR);
static usqInt NoDbgRegParms concretizeRetN(AbstractInstruction * self_in_concretizeRetN);
@@ -1037,7 +1037,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 sqInt NoDbgRegParms genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg);
+static AbstractInstruction * 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);
@@ -4843,7 +4843,7 @@
{
sqInt classTag;
usqInt classTagPC;
- usqInt entryPoint;
+ sqInt entryPoint;
sqInt errors;
sqInt i;
usqInt methodObjPC;
@@ -5337,13 +5337,18 @@
static void (*genEnilopmartForandandforCallcalled(sqInt regArg1, sqInt regArg2OrNone, sqInt regArg3OrNone, sqInt forCall, char *trampolineName))(void)
{
+ AbstractInstruction *anInstruction;
sqInt endAddress;
sqInt enilopmart;
+ sqInt quickConstant;
sqInt size;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
+ /* begin MoveCq:R: */
+ quickConstant = varBaseAddress();
+ /* begin gen:quickConstant:operand: */
+ anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
+
genLoadStackPointers(backEnd);
if (regArg3OrNone != NoReg) {
/* begin PopR: */
@@ -5433,8 +5438,11 @@
AbstractInstruction *anInstruction1;
AbstractInstruction *anInstruction2;
AbstractInstruction *anInstruction3;
+ AbstractInstruction *anInstruction4;
sqInt fixupSize;
sqInt opcodeSize;
+ sqInt quickConstant;
+ sqInt quickConstant1;
sqInt startAddress;
/* begin allocateOpcodes:bytecodes: */
@@ -5446,24 +5454,36 @@
fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
zeroOpcodeIndex();
labelCounter = 0;
+
+ /* Must happen first; value may be used in accessing any of the following addresses */
startAddress = methodZoneBase;
- /* begin maybeSaveVarBase */
- ((AbstractInstruction *) backEnd);
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
+ /* begin PushR: */
+ genoperand(PushR, VarBaseReg);
+ /* begin MoveCq:R: */
+ quickConstant1 = varBaseAddress();
+ /* begin gen:quickConstant:operand: */
+ anInstruction1 = genoperandoperand(MoveCqR, quickConstant1, VarBaseReg);
+
if (captureFramePointer) {
/* begin MoveR:Aw: */
address = cFramePointerAddress();
/* begin gen:operand:literal: */
- anInstruction1 = genoperandoperand(MoveRAw, FPReg, address);
+ anInstruction2 = genoperandoperand(MoveRAw, FPReg, address);
}
+ /* begin MoveR:R: */
+ genoperandoperand(MoveRR, SPReg, TempReg);
+ /* begin AddCq:R: */
+ quickConstant = 0 + BytesPerWord;
+ /* begin gen:quickConstant:operand: */
+ anInstruction = genoperandoperand(AddCqR, quickConstant, TempReg);
/* begin MoveR:Aw: */
address1 = cStackPointerAddress();
/* begin gen:operand:literal: */
- anInstruction2 = genoperandoperand(MoveRAw, SPReg, address1);
+ anInstruction3 = genoperandoperand(MoveRAw, TempReg, address1);
- /* begin maybeRestoreVarBase */
- ((AbstractInstruction *) backEnd);
+ /* begin PopR: */
+ genoperand(PopR, VarBaseReg);
+
/* begin RetN: */
genoperand(RetN, 0);
outputInstructionsForGeneratedRuntimeAt(startAddress);
@@ -5686,12 +5706,12 @@
generateMapAtstart(sqInt addressOrNull, sqInt startAddress)
{
unsigned char annotation;
- usqInt delta;
+ sqInt delta;
sqInt i;
AbstractInstruction *instruction;
sqInt length;
- usqInt location;
- usqInt mapEntry;
+ sqInt location;
+ sqInt mapEntry;
sqInt maxDelta;
usqInt mcpc;
@@ -10942,7 +10962,7 @@
}
/* CogMIPSELCompiler>>#concretizeAddCqR */
-static usqInt NoDbgRegParms
+static sqInt NoDbgRegParms
concretizeAddCqR(AbstractInstruction * self_in_concretizeAddCqR)
{
sqInt aWord;
@@ -11018,7 +11038,7 @@
}
/* CogMIPSELCompiler>>#concretizeAndCqR */
-static usqInt NoDbgRegParms
+static sqInt NoDbgRegParms
concretizeAndCqR(AbstractInstruction * self_in_concretizeAndCqR)
{
sqInt aWord;
@@ -11596,7 +11616,7 @@
the method zone. */
/* CogMIPSELCompiler>>#concretizeCall */
-static usqInt NoDbgRegParms
+static sqInt NoDbgRegParms
concretizeCall(AbstractInstruction * self_in_concretizeCall)
{
return concretizeCallFull(self_in_concretizeCall);
@@ -12465,7 +12485,7 @@
}
/* CogMIPSELCompiler>>#concretizeOrCqR */
-static usqInt NoDbgRegParms
+static sqInt NoDbgRegParms
concretizeOrCqR(AbstractInstruction * self_in_concretizeOrCqR)
{
sqInt aWord;
@@ -12567,7 +12587,7 @@
}
/* CogMIPSELCompiler>>#concretizePushCq */
-static usqInt NoDbgRegParms
+static sqInt NoDbgRegParms
concretizePushCq(AbstractInstruction * self_in_concretizePushCq)
{
return concretizePushCw(self_in_concretizePushCq);
@@ -15497,6 +15517,7 @@
jumpNotSI = genJumpNotSmallInteger(Arg0Reg);
genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
genRemoveSmallIntegerTagsInScratchReg(Arg1Reg);
+ /* begin MulR:R: */
genMulRR(backEnd, Arg1Reg, ClassReg);
/* begin JumpOverflow: */
jumpOvfl = genConditionalBranchoperand(JumpOverflow, ((sqInt)0));
@@ -18353,7 +18374,7 @@
}
/* CogObjectRepresentationForSpur>>#genGetClassTagOf:into:scratchReg: */
-static sqInt NoDbgRegParms
+static AbstractInstruction * NoDbgRegParms
genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg)
{
return genGetInlineCacheClassTagFromintoforEntry(instReg, destReg, 1);
@@ -21024,6 +21045,7 @@
AbstractInstruction *anInstruction15;
AbstractInstruction *anInstruction16;
AbstractInstruction *anInstruction17;
+ AbstractInstruction *anInstruction18;
AbstractInstruction *anInstruction2;
AbstractInstruction *anInstruction3;
AbstractInstruction *anInstruction4;
@@ -21037,11 +21059,15 @@
AbstractInstruction * inst;
AbstractInstruction *jmpFail;
AbstractInstruction *jmpSample;
+ sqInt quickConstant;
sqInt reg;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
+ /* begin MoveCq:R: */
+ quickConstant = varBaseAddress();
+ /* begin gen:quickConstant:operand: */
+ anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
+
if (profiling) {
/* Test nextProfileTick for being non-zero and call checkProfileTick: if so.
@@ -21049,11 +21075,11 @@
/* begin MoveAw:R: */
address = nextProfileTickAddress();
/* begin gen:literal:operand: */
- anInstruction = genoperandoperand(MoveAwR, address, TempReg);
+ anInstruction1 = genoperandoperand(MoveAwR, address, TempReg);
/* begin MoveAw:R: */
address1 = (nextProfileTickAddress()) + BytesPerWord;
/* begin gen:literal:operand: */
- anInstruction1 = genoperandoperand(MoveAwR, address1, ClassReg);
+ anInstruction2 = genoperandoperand(MoveAwR, address1, ClassReg);
/* begin OrR:R: */
genoperandoperand(OrRR, TempReg, ClassReg);
@@ -21066,19 +21092,19 @@
/* begin MoveAw:R: */
address6 = primFailCodeAddress();
/* begin gen:literal:operand: */
- anInstruction12 = genoperandoperand(MoveAwR, address6, TempReg);
+ anInstruction13 = genoperandoperand(MoveAwR, address6, TempReg);
flag("ask concrete code gen if move sets condition codes?");
/* begin CmpCq:R: */
- anInstruction13 = genoperandoperand(CmpCqR, 0, TempReg);
+ anInstruction14 = genoperandoperand(CmpCqR, 0, TempReg);
/* begin JumpNonZero: */
jmpFail = genConditionalBranchoperand(JumpNonZero, ((sqInt)0));
genLoadStackPointers(backEnd);
/* begin MoveMw:r:R: */
- anInstruction5 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
+ anInstruction6 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
/* begin MoveAw:R: */
address4 = instructionPointerAddress();
/* begin gen:literal:operand: */
- anInstruction6 = genoperandoperand(MoveAwR, address4, LinkReg);
+ anInstruction7 = genoperandoperand(MoveAwR, address4, LinkReg);
/* begin RetN: */
genoperand(RetN, BytesPerWord);
@@ -21087,16 +21113,16 @@
/* begin MoveAw:R: */
address7 = cStackPointerAddress();
/* begin gen:literal:operand: */
- anInstruction14 = genoperandoperand(MoveAwR, address7, SPReg);
+ anInstruction15 = genoperandoperand(MoveAwR, address7, SPReg);
compileCallFornumArgsargargargargresultRegsaveRegs(ceActivateFailingPrimitiveMethod, 1, SendNumArgsReg, null, null, null, NoReg, 0);
/* begin MoveAw:R: */
address8 = instructionPointerAddress();
reg = LinkReg;
/* begin gen:literal:operand: */
- anInstruction15 = genoperandoperand(MoveAwR, address8, reg);
+ anInstruction16 = genoperandoperand(MoveAwR, address8, reg);
genLoadStackPointers(backEnd);
/* begin MoveMw:r:R: */
- anInstruction10 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
+ anInstruction11 = genoperandoperandoperand(MoveMwrR, 0, SPReg, ReceiverResultReg);
/* begin RetN: */
genoperand(RetN, BytesPerWord);
@@ -21110,7 +21136,7 @@
/* begin CallFullRT: */
callTarget = (unsigned long)ceCheckProfileTick;
/* begin CallFull: */
- anInstruction16 = genoperand(CallFull, callTarget);
+ anInstruction17 = genoperand(CallFull, callTarget);
/* begin PopR: */
@@ -22985,14 +23011,19 @@
static void (*genCallPICEnilopmartNumArgs(sqInt numArgs))(void)
{
+ AbstractInstruction *anInstruction;
sqInt endAddress;
sqInt enilopmart;
+ sqInt quickConstant;
sqInt reg;
sqInt size;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
- ((AbstractInstruction *) backEnd);
+ /* begin MoveCq:R: */
+ quickConstant = varBaseAddress();
+ /* begin gen:quickConstant:operand: */
+ anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
+
genLoadStackPointers(backEnd);
/* begin PopR: */
genoperand(PopR, ClassReg);
Modified: branches/Cog/platforms/Cross/vm/sqCogStackAlignment.h
===================================================================
--- branches/Cog/platforms/Cross/vm/sqCogStackAlignment.h 2016-01-10 21:49:21 UTC (rev 3552)
+++ branches/Cog/platforms/Cross/vm/sqCogStackAlignment.h 2016-01-10 22:51:42 UTC (rev 3553)
@@ -37,8 +37,22 @@
* __m256 is passed on stack) byte boundary. In other words, the value
* (%rsp + 8) is always a multiple of 16 (32) when control is transferred to
* the function entry point.
+ * However,
+ * https://developer.apple.com/library/mac/documentation/DeveloperTools/
+ * Conceptual/LowLevelABI/140-x86-64_Function_Calling_Conventions/x86_64.html
+ * claims
+ * "The OS X x86-64 function calling conventions are the same as the function
+ * calling conventions described in System V Application Binary Interface AMD64
+ * Architecture Processor Supplement, found at
+ * http://people.freebsd.org/~obrien/amd64-elf-abi.pdf. See that document for
+ * details."
+ * and that document states:
+ * "The end of the input argument area shall be aligned on a 16 byte boundary.
+ * In other words, the value (%rsp ? 8) is always a multiple of 16 when control
+ * is transferred to the function entry point. The stack pointer, %rsp, always
+ * points to the end of the latest allocated stack frame."
*/
-# if __APPLE__ && __MACH__ /* i.e. the __m256 regime */
+# if __APPLE__ && __MACH__ && 0/* i.e. the __m256 regime */
# define STACK_ALIGN_BYTES 32
# define STACK_FP_ALIGNMENT 16 /* aligned sp - retpc - saved fp */
# else
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
- Sun Jan 10 13:47:59 PST 2016
+ Sun Jan 10 14:48:56 PST 2016
Modified: branches/Cog/spur64src/vm/cogit.h
===================================================================
--- branches/Cog/spur64src/vm/cogit.h 2016-01-10 21:49:21 UTC (rev 3552)
+++ branches/Cog/spur64src/vm/cogit.h 2016-01-10 22:51:42 UTC (rev 3553)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ CCodeGenerator VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
*/
Modified: branches/Cog/spur64src/vm/cogitX64.c
===================================================================
--- branches/Cog/spur64src/vm/cogitX64.c 2016-01-10 21:49:21 UTC (rev 3552)
+++ branches/Cog/spur64src/vm/cogitX64.c 2016-01-10 22:51:42 UTC (rev 3553)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ CCodeGenerator VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1629 uuid: e706b773-41e5-482b-aa41-bacdf83d47e7 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1630 uuid: 2ed025ea-f400-4440-8e8b-5aa46d06c9ab " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -782,7 +782,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 sqInt NoDbgRegParms genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg);
+static AbstractInstruction * 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);
@@ -912,6 +912,7 @@
static sqInt genLongUnconditionalForwardJump(void);
static sqInt NoDbgRegParms genLookupForPerformNumArgs(sqInt numArgs);
static AbstractInstruction * NoDbgRegParms genMoveConstantR(sqInt constant, sqInt reg);
+static AbstractInstruction * NoDbgRegParms genMoveFalseR(sqInt reg);
static sqInt NoDbgRegParms genMoveTrueR(sqInt reg);
static sqInt NoDbgRegParms genMustBeBooleanTrampolineForcalled(sqInt boolean, char *trampolineName);
static void NoDbgRegParms genPrimReturnEnterCogCodeEnilopmart(sqInt profiling);
@@ -5016,11 +5017,11 @@
sqInt size;
zeroOpcodeIndex();
- /* begin maybeEstablishVarBase */
+ /* begin MoveCq:R: */
quickConstant = varBaseAddress();
/* begin gen:quickConstant:operand: */
anInstruction = genoperandoperand(MoveCqR, quickConstant, VarBaseReg);
- ((AbstractInstruction *) backEnd);
+
genLoadStackPointers(backEnd);
if (regArg3OrNone != NoReg) {
/* begin PopR: */
@@ -5113,35 +5114,36 @@
fixups = ((void *)((((usqInt)abstractOpcodes)) + opcodeSize));
zeroOpcodeIndex();
labelCounter = 0;
+
+ /* Must happen first; value may be used in accessing any of the following addresses */
startAddress = methodZoneBase;
- /* begin maybeSaveVarBase */
+ /* begin PushR: */
genoperand(PushR, VarBaseReg);
- ((AbstractInstruction *) backEnd);
- /* begin maybeEstablishVarBase */
+ /* begin MoveCq:R: */
quickConstant1 = varBaseAddress();
/* begin gen:quickConstant:operand: */
- anInstruction4 = genoperandoperand(MoveCqR, quickConstant1, VarBaseReg);
- ((AbstractInstruction *) backEnd);
+ anInstruction1 = genoperandoperand(MoveCqR, quickConstant1, VarBaseReg);
+
if (captureFramePointer) {
/* begin MoveR:Aw: */
address = cFramePointerAddress();
/* begin gen:operand:literal: */
- anInstruction1 = genoperandoperand(MoveRAw, FPReg, address);
+ anInstruction2 = genoperandoperand(MoveRAw, FPReg, address);
}
/* begin MoveR:R: */
genoperandoperand(MoveRR, SPReg, TempReg);
/* begin AddCq:R: */
- quickConstant = leafCallStackPointerDelta(backEnd);
+ quickConstant = (leafCallStackPointerDelta(backEnd)) + BytesPerWord;
/* begin gen:quickConstant:operand: */
anInstruction = genoperandoperand(AddCqR, quickConstant, TempReg);
/* begin MoveR:Aw: */
- address2 = cStackPointerAddress();
+ address1 = cStackPointerAddress();
/* begin gen:operand:literal: */
- anInstruction3 = genoperandoperand(MoveRAw, TempReg, address2);
+ anInstruction3 = genoperandoperand(MoveRAw, TempReg, address1);
- /* begin maybeRestoreVarBase */
+ /* begin PopR: */
genoperand(PopR, VarBaseReg);
- ((AbstractInstruction *) backEnd);
+
/* begin RetN: */
genoperand(RetN, 0);
outputInstructionsForGeneratedRuntimeAt(startAddress);
@@ -6047,6 +6049,8 @@
((methodLabel->operands))[0] = 0;
((methodLabel->operands))[1] = 0;
callerSavedRegMask = callerSavedRegisterMask(backEnd);
+ assert(((registerMaskFor(VarBaseReg)) & callerSavedRegMask) == 0);
+
/* begin allocateLiterals: */
}
@@ -9779,7 +9783,7 @@
/* FP jumps are a little weird */
jumpCond = jumpOpcodeGenerator(0);
- /* begin genMoveConstant:R: */
+ /* begin genMoveFalseR: */
constant = falseObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -10657,7 +10661,7 @@
/* begin CmpR:R: */
genoperandoperand(CmpRR, Arg0Reg, ReceiverResultReg);
jumpTrue = genConditionalBranchoperand(jumpOpcode, 0);
- /* begin genMoveConstant:R: */
+ /* begin genMoveFalseR: */
constant = falseObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -10725,7 +10729,7 @@
/* FP jumps are a little weird */
jumpCond = jumpFPOpcodeGenerator(0);
- /* begin genMoveConstant:R: */
+ /* begin genMoveFalseR: */
constant = falseObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -12094,7 +12098,7 @@
/* FP jumps are a little weird */
jumpCond = jumpOpcodeGenerator(0);
- /* begin genMoveConstant:R: */
+ /* begin genMoveFalseR: */
constant = falseObject();
if (shouldAnnotateObjectReference(constant)) {
annotateobjRef(gMoveCwR(constant, ReceiverResultReg), constant);
@@ -12950,7 +12954,7 @@
}
/* CogObjectRepresentationForSpur>>#genGetClassTagOf:into:scratchReg: */
-static sqInt NoDbgRegParms
+static AbstractInstruction * NoDbgRegParms
genGetClassTagOfintoscratchReg(sqInt instReg, sqInt destReg, sqInt scratchReg)
{
return genGetInlineCacheClassTagFromintoforEntry(instReg, destReg, 1);
@@ -13332,7 +13336,7 @@
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
genoperand(RetN, 0);
- jmpTarget(jumpCmp, genMoveConstantR(falseObject(), ReceiverResultReg));
+ jmpTarget(jumpCmp, genMoveFalseR(ReceiverResultReg));
/* begin genPrimReturn */
assert(methodOrBlockNumArgs <= (numRegArgs()));
/* begin RetN: */
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list