Revision: 3562
Author: eliot
Date: 2016-01-16 20:02:34 -0800 (Sat, 16 Jan 2016)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1647
Newspeak 64-bit Cogit:
x64 must define nsSendCacheAt:
Unix: sqUnixMain.c must define accessing sp & fp on x64 linux.
Modified Paths:
--------------
branches/Cog/nsspur64src/vm/cogit.h
branches/Cog/nsspur64src/vm/cogitX64.c
branches/Cog/platforms/unix/vm/sqUnixMain.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspur64src/vm/cogit.h
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.h 2016-01-17 03:12:08 UTC (rev 3561)
+++ branches/Cog/nsspur64src/vm/cogit.h 2016-01-17 04:02:34 UTC (rev 3562)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026
+ CCodeGenerator VMMaker.oscog-eem.1647 uuid: 013e4a41-bb4b-46ba-86e0-16c6977c4865
*/
Modified: branches/Cog/nsspur64src/vm/cogitX64.c
===================================================================
--- branches/Cog/nsspur64src/vm/cogitX64.c 2016-01-17 03:12:08 UTC (rev 3561)
+++ branches/Cog/nsspur64src/vm/cogitX64.c 2016-01-17 04:02:34 UTC (rev 3562)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026
+ CCodeGenerator VMMaker.oscog-eem.1647 uuid: 013e4a41-bb4b-46ba-86e0-16c6977c4865
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1647 uuid: 013e4a41-bb4b-46ba-86e0-16c6977c4865
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1646 uuid: 83280f1d-a69e-4201-a103-e3236315d026 " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1647 uuid: 013e4a41-bb4b-46ba-86e0-16c6977c4865 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -893,6 +893,7 @@
static usqInt NoDbgRegParms machineCodeAt(AbstractInstruction * self_in_machineCodeAt, sqInt anOffset);
static sqInt NoDbgRegParms machineCodeBytes(AbstractInstruction * self_in_machineCodeBytes);
static sqInt NoDbgRegParms modRMRO(AbstractInstruction * self_in_modRMRO, sqInt mod, sqInt regMode, sqInt regOpcode);
+static sqInt NoDbgRegParms nsSendCacheAt(AbstractInstruction * self_in_nsSendCacheAt, char *callSiteReturnAddress);
static sqInt NoDbgRegParms numIntRegArgs(AbstractInstruction * self_in_numIntRegArgs);
static AbstractInstruction * NoDbgRegParms padIfPossibleWithStopsFromto(AbstractInstruction * self_in_padIfPossibleWithStopsFromto, sqInt startAddr, sqInt endAddr);
static AbstractInstruction * NoDbgRegParms relocateCallBeforeReturnPCby(AbstractInstruction * self_in_relocateCallBeforeReturnPCby, sqInt retpc, sqInt delta);
@@ -5858,12 +5859,12 @@
generateMapAtstart(sqInt addressOrNull, sqInt startAddress)
{
unsigned char annotation;
- sqInt delta;
+ usqInt delta;
sqInt i;
AbstractInstruction *instruction;
sqInt length;
- sqInt location;
- sqInt mapEntry;
+ usqInt location;
+ usqInt mapEntry;
sqInt maxDelta;
usqInt mcpc;
@@ -11417,7 +11418,6 @@
jumpNotSI = genJumpNotSmallIntegerscratchReg(Arg0Reg, TempReg);
genShiftAwaySmallIntegerTagsInScratchReg(ClassReg);
genRemoveSmallIntegerTagsInScratchReg(Arg1Reg);
- /* begin MulR:R: */
genMulRR(backEnd, Arg1Reg, ClassReg);
/* begin JumpOverflow: */
jumpOvfl = genConditionalBranchoperand(JumpOverflow, ((sqInt)0));
@@ -20190,6 +20190,17 @@
return ((((long)mod) << 6) + (((long)(regOpcode & 7)) << 3)) + (regMode & 7);
}
+
+/* Answer the NSSendCache for the return address of a Newspeak
+ self, super, outer, or implicit receiver send. */
+
+ /* CogX64Compiler>>#nsSendCacheAt: */
+static sqInt NoDbgRegParms
+nsSendCacheAt(AbstractInstruction * self_in_nsSendCacheAt, char *callSiteReturnAddress)
+{
+ return literalBeforeFollowingAddress(self_in_nsSendCacheAt, (((usqInt)callSiteReturnAddress)) - 5);
+}
+
/* CogX64Compiler>>#numIntRegArgs */
static sqInt NoDbgRegParms
numIntRegArgs(AbstractInstruction * self_in_numIntRegArgs)
@@ -25119,7 +25130,6 @@
return ssPushRegister(SendNumArgsReg);
}
genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg);
- /* begin genJumpNotSmallIntegerInScratchReg: */
jmpSingle = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
/* begin MoveCq:R: */
anInstruction1 = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg);
@@ -25351,8 +25361,6 @@
AbstractInstruction *instToAnnotate;
AbstractInstruction *jumpContinue;
AbstractInstruction *jumpNotSmallInts;
- sqInt literal;
- sqInt literal1;
BytecodeDescriptor *primDescriptor;
sqInt rcvrInt;
sqInt rcvrIsConst;
@@ -25421,7 +25429,6 @@
}
if (argIsInt
|| (rcvrIsInt)) {
- /* begin genJumpNotSmallIntegerInScratchReg: */
jumpNotSmallInts = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
}
else {
@@ -25432,7 +25439,6 @@
case AddRR:
if (argIsInt) {
/* begin AddCq:R: */
- literal = argInt - ConstZero;
anInstruction = genoperandoperand(AddCqR, argInt - ConstZero, ReceiverResultReg);
instToAnnotate = anInstruction;
/* begin JumpNoOverflow: */
@@ -25465,7 +25471,6 @@
/* begin JumpNoOverflow: */
jumpContinue = genConditionalBranchoperand(JumpNoOverflow, ((sqInt)0));
/* begin AddCq:R: */
- literal1 = argInt - ConstZero;
anInstruction4 = genoperandoperand(AddCqR, argInt - ConstZero, ReceiverResultReg);
}
else {
@@ -25639,7 +25644,6 @@
}
if (argIsInt
|| (rcvrIsInt)) {
- /* begin genJumpNotSmallIntegerInScratchReg: */
jumpNotSmallInts = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
}
else {
@@ -25648,13 +25652,13 @@
if (argIsInt) {
if (annotateInst) {
/* begin annotateBytecode: */
- anInstruction = genoperandoperand(CmpCqR, argInt, ReceiverResultReg);
- abstractInstruction = anInstruction;
+ anInstruction2 = genoperandoperand(CmpCqR, argInt, ReceiverResultReg);
+ abstractInstruction = anInstruction2;
(abstractInstruction->annotation = HasBytecodePC);
}
else {
/* begin CmpCq:R: */
- anInstruction1 = genoperandoperand(CmpCqR, argInt, ReceiverResultReg);
+ anInstruction = genoperandoperand(CmpCqR, argInt, ReceiverResultReg);
}
}
else {
@@ -25670,7 +25674,7 @@
jmpTarget(jumpNotSmallInts, gLabel());
if (argIsInt) {
/* begin MoveCq:R: */
- anInstruction2 = genoperandoperand(MoveCqR, argInt, Arg0Reg);
+ anInstruction1 = genoperandoperand(MoveCqR, argInt, Arg0Reg);
}
index = byte0 - ((bytecodeSetOffset == 256
? AltFirstSpecialSelector + 256
@@ -26083,7 +26087,6 @@
genLoadSlotsourceRegdestReg(SenderIndex, ReceiverResultReg, TempReg);
ssStorePoptoReg(popBoolean, ClassReg);
- /* begin genJumpNotSmallIntegerInScratchReg: */
jmpSingle = genJumpNotSmallIntegerscratchReg(TempReg, TempReg);
/* begin MoveCq:R: */
anInstruction = genoperandoperand(MoveCqR, slotIndex, SendNumArgsReg);
Property changes on: branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
___________________________________________________________________
Modified: checkindate
- Sat Jan 16 19:09:12 PST 2016
+ Sat Jan 16 20:01:36 PST 2016
Modified: branches/Cog/platforms/unix/vm/sqUnixMain.c
===================================================================
--- branches/Cog/platforms/unix/vm/sqUnixMain.c 2016-01-17 03:12:08 UTC (rev 3561)
+++ branches/Cog/platforms/unix/vm/sqUnixMain.c 2016-01-17 04:02:34 UTC (rev 3562)
@@ -828,6 +828,9 @@
# elif __linux__ && __i386__
void *fp = (void *)(uap ? uap->uc_mcontext.gregs[REG_EBP]: 0);
void *sp = (void *)(uap ? uap->uc_mcontext.gregs[REG_ESP]: 0);
+# elif __linux__ && __x86_64__
+ void *fp = (void *)(uap ? uap->uc_mcontext.gregs[REG_RBP]: 0);
+ void *sp = (void *)(uap ? uap->uc_mcontext.gregs[REG_RSP]: 0);
# elif __FreeBSD__ && __i386__
void *fp = (void *)(uap ? uap->uc_mcontext.mc_ebp: 0);
void *sp = (void *)(uap ? uap->uc_mcontext.mc_esp: 0);
@@ -837,9 +840,6 @@
# elif defined(__arm__) || defined(__arm32__) || defined(ARM32)
void *fp = (void *)(uap ? uap->uc_mcontext.arm_fp: 0);
void *sp = (void *)(uap ? uap->uc_mcontext.arm_sp: 0);
-# elif __x86_64__
-# error Currently this VM must be build as a 32-bit binary.
-# error See section 3e in unixbuild/HowToBuild.
# else
# error need to implement extracting pc from a ucontext_t on this system
# endif