[Vm-dev] [commit][3678] CogVM source as per VMMaker.oscog-eem.1833
commits at squeakvm.org
commits at squeakvm.org
Fri Apr 22 18:26:59 UTC 2016
Revision: 3678
Author: eliot
Date: 2016-04-22 11:26:57 -0700 (Fri, 22 Apr 2016)
Log Message:
-----------
CogVM source as per VMMaker.oscog-eem.1833
Cogit:
- split compileAbstractInstruction in sub methods to understand what is
going on.
- Fix a bug in genUpArrowReturn (deadCode should be set to true for non
local return). Fixing this allow to simplify compileAbstractInstruction
64-bit Cogit:
is32BitSignedImmediate: & isSignExtendedFourByteValue: are the same; we
only need one. Fix PushCq for fully 64-bit quick constants (eg immediate
floats).
Plugins:
Generate integer type checking as C macros rather than direct/indirect
interpreterProxy function call in plugins. Merge the LargeIntegersPlugin acceleration for type checking again (VMMaker.oscog-nice.1823).
This remove the need for (compatibility broken)
platforms/Cross/vm/sqVirtualMemory.[ch] rev 3673
which can now safely be reverted.
Fix primAlienReplace to use positiveMachineIntegerValueOf: instead of
positive32BitValueOf:.
Modified Paths:
--------------
branches/Cog/nsspur64src/vm/cogit.h
branches/Cog/nsspur64src/vm/cogitX64.c
branches/Cog/nsspur64src/vm/cointerp.c
branches/Cog/nsspur64src/vm/cointerp.h
branches/Cog/nsspur64src/vm/gcc3x-cointerp.c
branches/Cog/nsspursrc/vm/cogit.h
branches/Cog/nsspursrc/vm/cogitARMv5.c
branches/Cog/nsspursrc/vm/cogitIA32.c
branches/Cog/nsspursrc/vm/cogitMIPSEL.c
branches/Cog/nsspursrc/vm/cointerp.c
branches/Cog/nsspursrc/vm/cointerp.h
branches/Cog/nsspursrc/vm/gcc3x-cointerp.c
branches/Cog/nsspurstack64src/vm/gcc3x-interp.c
branches/Cog/nsspurstack64src/vm/interp.c
branches/Cog/nsspurstacksrc/vm/gcc3x-interp.c
branches/Cog/nsspurstacksrc/vm/interp.c
branches/Cog/spur64src/vm/cogit.h
branches/Cog/spur64src/vm/cogitX64.c
branches/Cog/spur64src/vm/cointerp.c
branches/Cog/spur64src/vm/cointerp.h
branches/Cog/spur64src/vm/gcc3x-cointerp.c
branches/Cog/spursistasrc/vm/cogit.h
branches/Cog/spursistasrc/vm/cogitARMv5.c
branches/Cog/spursistasrc/vm/cogitIA32.c
branches/Cog/spursistasrc/vm/cogitMIPSEL.c
branches/Cog/spursistasrc/vm/cointerp.c
branches/Cog/spursistasrc/vm/cointerp.h
branches/Cog/spursistasrc/vm/gcc3x-cointerp.c
branches/Cog/spursrc/vm/cogit.h
branches/Cog/spursrc/vm/cogitARMv5.c
branches/Cog/spursrc/vm/cogitIA32.c
branches/Cog/spursrc/vm/cogitMIPSEL.c
branches/Cog/spursrc/vm/cointerp.c
branches/Cog/spursrc/vm/cointerp.h
branches/Cog/spursrc/vm/gcc3x-cointerp.c
branches/Cog/spurstack64src/vm/gcc3x-interp.c
branches/Cog/spurstack64src/vm/interp.c
branches/Cog/spurstacksrc/vm/gcc3x-interp.c
branches/Cog/spurstacksrc/vm/interp.c
branches/Cog/src/plugins/ADPCMCodecPlugin/ADPCMCodecPlugin.c
branches/Cog/src/plugins/B2DPlugin/B2DPlugin.c
branches/Cog/src/plugins/BitBltPlugin/BitBltPlugin.c
branches/Cog/src/plugins/FilePlugin/FilePlugin.c
branches/Cog/src/plugins/FloatArrayPlugin/FloatArrayPlugin.c
branches/Cog/src/plugins/IA32ABI/IA32ABI.c
branches/Cog/src/plugins/LargeIntegers/LargeIntegers.c
branches/Cog/src/plugins/Matrix2x3Plugin/Matrix2x3Plugin.c
branches/Cog/src/plugins/MiscPrimitivePlugin/MiscPrimitivePlugin.c
branches/Cog/src/plugins/SoundGenerationPlugin/SoundGenerationPlugin.c
branches/Cog/src/plugins/Squeak3D/Squeak3D.c
branches/Cog/src/plugins/SqueakFFIPrims/ARM32FFIPlugin.c
branches/Cog/src/plugins/SqueakFFIPrims/IA32FFIPlugin.c
branches/Cog/src/plugins/SqueakFFIPrims/X64SysVFFIPlugin.c
branches/Cog/src/plugins/SqueakFFIPrims/X64Win64FFIPlugin.c
branches/Cog/src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c
branches/Cog/src/vm/cogit.h
branches/Cog/src/vm/cogitARMv5.c
branches/Cog/src/vm/cogitIA32.c
branches/Cog/src/vm/cogitMIPSEL.c
branches/Cog/src/vm/cointerp.c
branches/Cog/src/vm/cointerp.h
branches/Cog/src/vm/cointerpmt.c
branches/Cog/src/vm/cointerpmt.h
branches/Cog/src/vm/gcc3x-cointerp.c
branches/Cog/src/vm/gcc3x-cointerpmt.c
branches/Cog/stacksrc/vm/gcc3x-interp.c
branches/Cog/stacksrc/vm/interp.c
Property Changed:
----------------
branches/Cog/platforms/Cross/vm/sqSCCSVersion.h
Modified: branches/Cog/nsspur64src/vm/cogit.h
===================================================================
--- branches/Cog/nsspur64src/vm/cogit.h 2016-04-21 23:51:51 UTC (rev 3677)
+++ branches/Cog/nsspur64src/vm/cogit.h 2016-04-22 18:26:57 UTC (rev 3678)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe
+ CCodeGenerator VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a
*/
Modified: branches/Cog/nsspur64src/vm/cogitX64.c
===================================================================
--- branches/Cog/nsspur64src/vm/cogitX64.c 2016-04-21 23:51:51 UTC (rev 3677)
+++ branches/Cog/nsspur64src/vm/cogitX64.c 2016-04-22 18:26:57 UTC (rev 3678)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGenerator VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe
+ CCodeGenerator VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a
from
- StackToRegisterMappingCogit VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe
+ StackToRegisterMappingCogit VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a
*/
-static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe " __DATE__ ;
+static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;
@@ -598,6 +598,7 @@
static AbstractInstruction * lastOpcode(void);
extern void linkNSSendCacheclassTagenclosingObjecttargetcaller(NSSendCache *nsSendCache, sqInt classTag, sqInt enclosingObject, CogMethod *targetMethod, CogMethod *callingMethod);
extern void linkSendAtintooffsetreceiver(sqInt callSiteReturnAddress, CogMethod *sendingMethod, CogMethod *targetMethod, sqInt theEntryOffset, sqInt receiver);
+static BytecodeDescriptor * loadBytesAndGetDescriptor(void);
static void NoDbgRegParms loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc);
static AbstractInstruction * NoDbgRegParms gMoveAwR(sqInt address, sqInt reg);
static AbstractInstruction * NoDbgRegParms gMoveCwR(sqInt wordConstant, sqInt reg);
@@ -902,6 +903,7 @@
static sqInt NoDbgRegParms cmpC32RTempByteSize(AbstractInstruction * self_in_cmpC32RTempByteSize);
static sqInt NoDbgRegParms computeMaximumSize(AbstractInstruction * self_in_computeMaximumSize);
static sqInt NoDbgRegParms computeShiftRRSize(AbstractInstruction * self_in_computeShiftRRSize);
+static sqInt NoDbgRegParms computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw);
static usqInt NoDbgRegParms concretizeArithCqRWithROraxOpcode(AbstractInstruction * self_in_concretizeArithCqRWithROraxOpcode, sqInt regOpcode, sqInt raxOpcode);
static usqInt NoDbgRegParms concretizeFill32(AbstractInstruction * self_in_concretizeFill32);
static usqInt NoDbgRegParms concretizeMoveRX32rR(AbstractInstruction * self_in_concretizeMoveRX32rR);
@@ -931,7 +933,6 @@
static sqInt NoDbgRegParms isCallPrecedingReturnPC(AbstractInstruction * self_in_isCallPrecedingReturnPC, sqInt mcpc);
static sqInt NoDbgRegParms isJumpAt(AbstractInstruction * self_in_isJumpAt, sqInt pc);
static sqInt NoDbgRegParms isQuick(AbstractInstruction * self_in_isQuick, unsigned long operand);
-static sqInt NoDbgRegParms isSignExtendedFourByteValue(AbstractInstruction * self_in_isSignExtendedFourByteValue, sqInt unsigned64BitValue);
static sqInt NoDbgRegParms isWithinMwOffsetRange(AbstractInstruction * self_in_isWithinMwOffsetRange, sqInt anAddress);
static AbstractInstruction * NoDbgRegParms jmpTarget(AbstractInstruction * self_in_jmpTarget, AbstractInstruction *anAbstractInstruction);
static sqInt NoDbgRegParms jumpLongByteSize(AbstractInstruction * self_in_jumpLongByteSize);
@@ -1147,6 +1148,7 @@
static void NoDbgRegParms initSimStackForFramelessBlock(sqInt startpc);
static void NoDbgRegParms initSimStackForFramelessMethod(sqInt startpc);
static sqInt liveRegisters(void);
+static sqInt NoDbgRegParms mapDeadDescriptorIfNeeded(BytecodeDescriptor *descriptor);
static void NoDbgRegParms marshallAbsentReceiverSendArguments(sqInt numArgs);
static void NoDbgRegParms marshallSendArguments(sqInt numArgs);
static sqInt NoDbgRegParms mergeWithFixupIfRequired(BytecodeFixup *fixup);
@@ -1270,6 +1272,7 @@
static sqInt cPICEndSize;
static sqInt cPICPrototype;
static sqInt deadCode;
+static sqInt debugBytecodePointers;
static sqInt debugFixupBreaks;
static sqInt debugOpcodeIndices;
unsigned long debugPrimCallStackOffset;
@@ -2233,7 +2236,7 @@
if (isQuick(self_in_computeSizeOfArithCqR, ((self_in_computeSizeOfArithCqR->operands))[0])) {
return 4;
}
- if (isSignExtendedFourByteValue(self_in_computeSizeOfArithCqR, ((self_in_computeSizeOfArithCqR->operands))[0])) {
+ if (is32BitSignedImmediate(self_in_computeSizeOfArithCqR, ((self_in_computeSizeOfArithCqR->operands))[0])) {
return ((((self_in_computeSizeOfArithCqR->operands))[1]) == RAX
? 6
: 7);
@@ -5920,12 +5923,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;
@@ -7067,6 +7070,18 @@
flushICacheFromto(processor, (((usqInt)callSiteReturnAddress)) - extent, ((usqInt)callSiteReturnAddress));
}
+ /* Cogit>>#loadBytesAndGetDescriptor */
+static BytecodeDescriptor *
+loadBytesAndGetDescriptor(void)
+{
+ BytecodeDescriptor *descriptor;
+
+ byte0 = (fetchByteofObject(bytecodePC, methodObj)) + bytecodeSetOffset;
+ descriptor = generatorAt(byte0);
+ loadSubsequentBytesForDescriptorat(descriptor, bytecodePC);
+ return descriptor;
+}
+
/* Cogit>>#loadSubsequentBytesForDescriptor:at: */
static void NoDbgRegParms
loadSubsequentBytesForDescriptorat(BytecodeDescriptor *descriptor, sqInt pc)
@@ -17021,7 +17036,7 @@
if (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])) {
return 4;
}
- if (isSignExtendedFourByteValue(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])) {
+ if (is32BitSignedImmediate(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])) {
return ((((self_in_computeMaximumSize->operands))[1]) == RAX
? 6
: 7);
@@ -17240,12 +17255,12 @@
case PushCq:
return (isQuick(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
? 2
- : 5);
+ : (is32BitSignedImmediate(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
+ ? 5
+ : computeSizeOfPushCw(self_in_computeMaximumSize)));
case PushCw:
- return (inCurrentCompilation(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
- ? 9
- : 12);
+ return computeSizeOfPushCw(self_in_computeMaximumSize);
case PrefetchAw:
return (isAddressRelativeToVarBase(self_in_computeMaximumSize, ((self_in_computeMaximumSize->operands))[0])
@@ -17277,7 +17292,16 @@
: (3 + 3) + 3));
}
+ /* CogX64Compiler>>#computeSizeOfPushCw */
+static sqInt NoDbgRegParms
+computeSizeOfPushCw(AbstractInstruction * self_in_computeSizeOfPushCw)
+{
+ return (inCurrentCompilation(self_in_computeSizeOfPushCw, ((self_in_computeSizeOfPushCw->operands))[0])
+ ? 9
+ : 12);
+}
+
/* Will get inlined into concretizeAt: switch. */
/* CogX64Compiler>>#concretizeArithCqRWithRO:raxOpcode: */
@@ -17296,7 +17320,7 @@
((self_in_concretizeArithCqRWithROraxOpcode->machineCode))[3] = (value & 0xFF);
return ((self_in_concretizeArithCqRWithROraxOpcode->machineCodeSize) = 4);
}
- if (isSignExtendedFourByteValue(self_in_concretizeArithCqRWithROraxOpcode, value)) {
+ if (is32BitSignedImmediate(self_in_concretizeArithCqRWithROraxOpcode, value)) {
if (reg == RAX) {
((self_in_concretizeArithCqRWithROraxOpcode->machineCode))[1] = raxOpcode;
((self_in_concretizeArithCqRWithROraxOpcode->machineCode))[2] = (value & 0xFF);
@@ -17637,7 +17661,7 @@
unsigned long offset15;
unsigned long offset16;
unsigned long offset17;
- sqInt offset18;
+ unsigned long offset18;
sqInt offset19;
unsigned long offset2;
sqInt offset20;
@@ -17659,6 +17683,7 @@
sqInt offset35;
sqInt offset36;
sqInt offset37;
+ sqInt offset38;
unsigned long offset4;
unsigned long offset5;
unsigned long offset6;
@@ -17740,6 +17765,7 @@
unsigned long value5;
unsigned long value6;
unsigned long value7;
+ unsigned long value8;
unsigned long word;
@@ -17894,12 +17920,12 @@
}
assert(jumpTarget12 != 0);
jumpTarget3 = jumpTarget12;
- offset22 = (((int) jumpTarget3)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset23 = (((int) jumpTarget3)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset22)
+ ? isQuick(self_in_dispatchConcretize, offset23)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 4);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset22 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset23 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -17934,12 +17960,12 @@
}
assert(jumpTarget13 != 0);
jumpTarget4 = jumpTarget13;
- offset23 = (((int) jumpTarget4)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset24 = (((int) jumpTarget4)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset23)
+ ? isQuick(self_in_dispatchConcretize, offset24)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 5);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset23 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset24 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -17999,12 +18025,12 @@
}
assert(jumpTarget14 != 0);
jumpTarget5 = jumpTarget14;
- offset24 = (((int) jumpTarget5)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset25 = (((int) jumpTarget5)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset24)
+ ? isQuick(self_in_dispatchConcretize, offset25)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 8);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset24 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset25 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18037,12 +18063,12 @@
}
assert(jumpTarget15 != 0);
jumpTarget6 = jumpTarget15;
- offset25 = (((int) jumpTarget6)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset26 = (((int) jumpTarget6)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset25)
+ ? isQuick(self_in_dispatchConcretize, offset26)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 9);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset25 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset26 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18075,12 +18101,12 @@
}
assert(jumpTarget16 != 0);
jumpTarget7 = jumpTarget16;
- offset26 = (((int) jumpTarget7)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset27 = (((int) jumpTarget7)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset26)
+ ? isQuick(self_in_dispatchConcretize, offset27)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset26 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset27 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18113,12 +18139,12 @@
}
assert(jumpTarget17 != 0);
jumpTarget8 = jumpTarget17;
- offset27 = (((int) jumpTarget8)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset28 = (((int) jumpTarget8)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset27)
+ ? isQuick(self_in_dispatchConcretize, offset28)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 1);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset27 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset28 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18153,12 +18179,12 @@
}
assert(jumpTarget18 != 0);
jumpTarget9 = jumpTarget18;
- offset28 = (((int) jumpTarget9)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset29 = (((int) jumpTarget9)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset28)
+ ? isQuick(self_in_dispatchConcretize, offset29)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 2);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset28 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset29 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18193,12 +18219,12 @@
}
assert(jumpTarget19 != 0);
jumpTarget10 = jumpTarget19;
- offset29 = (((int) jumpTarget10)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset30 = (((int) jumpTarget10)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset29)
+ ? isQuick(self_in_dispatchConcretize, offset30)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 3);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset29 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset30 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18231,12 +18257,12 @@
}
assert(jumpTarget110 != 0);
jumpTarget20 = jumpTarget110;
- offset30 = (((int) jumpTarget20)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset31 = (((int) jumpTarget20)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset30)
+ ? isQuick(self_in_dispatchConcretize, offset31)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 12);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset30 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset31 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18269,12 +18295,12 @@
}
assert(jumpTarget119 != 0);
jumpTarget29 = jumpTarget119;
- offset31 = (((int) jumpTarget29)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset32 = (((int) jumpTarget29)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset31)
+ ? isQuick(self_in_dispatchConcretize, offset32)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 13);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset31 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset32 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18307,12 +18333,12 @@
}
assert(jumpTarget120 != 0);
jumpTarget30 = jumpTarget120;
- offset32 = (((int) jumpTarget30)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset33 = (((int) jumpTarget30)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset32)
+ ? isQuick(self_in_dispatchConcretize, offset33)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 15);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset32 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset33 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18345,12 +18371,12 @@
}
assert(jumpTarget121 != 0);
jumpTarget31 = jumpTarget121;
- offset33 = (((int) jumpTarget31)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset34 = (((int) jumpTarget31)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset33)
+ ? isQuick(self_in_dispatchConcretize, offset34)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 14);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset33 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset34 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18384,12 +18410,12 @@
}
assert(jumpTarget122 != 0);
jumpTarget32 = jumpTarget122;
- offset34 = (((int) jumpTarget32)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset35 = (((int) jumpTarget32)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset34)
+ ? isQuick(self_in_dispatchConcretize, offset35)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 7);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset34 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset35 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18423,12 +18449,12 @@
}
assert(jumpTarget123 != 0);
jumpTarget33 = jumpTarget123;
- offset35 = (((int) jumpTarget33)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset36 = (((int) jumpTarget33)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset35)
+ ? isQuick(self_in_dispatchConcretize, offset36)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 6);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset35 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset36 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18461,12 +18487,12 @@
}
assert(jumpTarget124 != 0);
jumpTarget34 = jumpTarget124;
- offset36 = (((int) jumpTarget34)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset37 = (((int) jumpTarget34)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset36)
+ ? isQuick(self_in_dispatchConcretize, offset37)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 11);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset36 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset37 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18499,12 +18525,12 @@
}
assert(jumpTarget125 != 0);
jumpTarget35 = jumpTarget125;
- offset37 = (((int) jumpTarget35)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
+ offset38 = (((int) jumpTarget35)) - (((int) (((self_in_dispatchConcretize->address)) + 2)));
if ((((self_in_dispatchConcretize->machineCodeSize)) == 0
- ? isQuick(self_in_dispatchConcretize, offset37)
+ ? isQuick(self_in_dispatchConcretize, offset38)
: ((self_in_dispatchConcretize->machineCodeSize)) == 2)) {
((self_in_dispatchConcretize->machineCode))[0] = (112 + 10);
- ((self_in_dispatchConcretize->machineCode))[1] = (offset37 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[1] = (offset38 & 0xFF);
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
@@ -18594,7 +18620,7 @@
((self_in_dispatchConcretize->machineCodeSize) = 4);
return;
}
- if (isSignExtendedFourByteValue(self_in_dispatchConcretize, value)) {
+ if (is32BitSignedImmediate(self_in_dispatchConcretize, value)) {
if (reg3 == RAX) {
((self_in_dispatchConcretize->machineCode))[1] = 169;
((self_in_dispatchConcretize->machineCode))[2] = (value & 0xFF);
@@ -19089,53 +19115,53 @@
((self_in_dispatchConcretize->operands))[1] = RBX;
((self_in_dispatchConcretize->operands))[2] = save1;
/* begin concretizeMoveMwrR */
- offset17 = ((self_in_dispatchConcretize->operands))[0];
+ offset18 = ((self_in_dispatchConcretize->operands))[0];
srcReg12 = ((self_in_dispatchConcretize->operands))[1];
destReg13 = ((self_in_dispatchConcretize->operands))[2];
((self_in_dispatchConcretize->machineCode))[0] = (rexRxb(self_in_dispatchConcretize, destReg13, 0, srcReg12));
((self_in_dispatchConcretize->machineCode))[1] = 139;
if ((srcReg12 != RSP)
&& (srcReg12 != R12)) {
- if ((offset17 == 0)
+ if ((offset18 == 0)
&& ((srcReg12 != RBP)
&& (srcReg12 != R13))) {
((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegInd, srcReg12, destReg13));
(self_in_dispatchConcretize->machineCodeSize) = 3;
goto l1;
}
- if (isQuick(self_in_dispatchConcretize, offset17)) {
+ if (isQuick(self_in_dispatchConcretize, offset18)) {
((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg12, destReg13));
- ((self_in_dispatchConcretize->machineCode))[3] = (offset17 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3] = (offset18 & 0xFF);
(self_in_dispatchConcretize->machineCodeSize) = 4;
goto l1;
}
((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg12, destReg13));
- ((self_in_dispatchConcretize->machineCode))[3] = (offset17 & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset17) >> 8) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset17) >> 16) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset17) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3] = (offset18 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset18) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset18) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset18) >> 24) & 0xFF);
(self_in_dispatchConcretize->machineCodeSize) = 7;
goto l1;
}
- if (offset17 == 0) {
+ if (offset18 == 0) {
((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegInd, srcReg12, destReg13));
((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg12));
(self_in_dispatchConcretize->machineCodeSize) = 4;
goto l1;
}
- if (isQuick(self_in_dispatchConcretize, offset17)) {
+ if (isQuick(self_in_dispatchConcretize, offset18)) {
((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp8, srcReg12, destReg13));
((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg12));
- ((self_in_dispatchConcretize->machineCode))[4] = (offset17 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4] = (offset18 & 0xFF);
(self_in_dispatchConcretize->machineCodeSize) = 5;
goto l1;
}
((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegRegDisp32, srcReg12, destReg13));
((self_in_dispatchConcretize->machineCode))[3] = (sib(self_in_dispatchConcretize, SIB1, 4, srcReg12));
- ((self_in_dispatchConcretize->machineCode))[4] = (offset17 & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset17) >> 8) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset17) >> 16) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset17) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4] = (offset18 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset18) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset18) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) offset18) >> 24) & 0xFF);
(self_in_dispatchConcretize->machineCodeSize) = 8;
l1: /* end concretizeMoveMwrR */;
((self_in_dispatchConcretize->operands))[0] = save0;
@@ -19146,23 +19172,23 @@
}
reg18 = ((self_in_dispatchConcretize->operands))[1];
if (reg18 == RAX) {
- offset18 = 0;
+ offset19 = 0;
}
else {
((self_in_dispatchConcretize->machineCode))[0] = (rexRxb(self_in_dispatchConcretize, 0, 0, reg18));
((self_in_dispatchConcretize->machineCode))[1] = (144 + (reg18 % 8));
- offset18 = 2;
+ offset19 = 2;
}
- ((self_in_dispatchConcretize->machineCode))[0 + offset18] = 72;
- ((self_in_dispatchConcretize->machineCode))[1 + offset18] = 161;
- ((self_in_dispatchConcretize->machineCode))[2 + offset18] = (addressOperand & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[3 + offset18] = ((((usqInt) addressOperand) >> 8) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[4 + offset18] = ((((usqInt) addressOperand) >> 16) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[5 + offset18] = ((((usqInt) addressOperand) >> 24) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[6 + offset18] = ((((usqInt) addressOperand) >> 32) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[7 + offset18] = ((((usqInt) addressOperand) >> 40) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[8 + offset18] = ((((usqInt) addressOperand) >> 48) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[9 + offset18] = ((((usqInt) addressOperand) >> 56) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[0 + offset19] = 72;
+ ((self_in_dispatchConcretize->machineCode))[1 + offset19] = 161;
+ ((self_in_dispatchConcretize->machineCode))[2 + offset19] = (addressOperand & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3 + offset19] = ((((usqInt) addressOperand) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4 + offset19] = ((((usqInt) addressOperand) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5 + offset19] = ((((usqInt) addressOperand) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6 + offset19] = ((((usqInt) addressOperand) >> 32) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[7 + offset19] = ((((usqInt) addressOperand) >> 40) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[8 + offset19] = ((((usqInt) addressOperand) >> 48) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[9 + offset19] = ((((usqInt) addressOperand) >> 56) & 0xFF);
if (reg18 == RAX) {
((self_in_dispatchConcretize->machineCodeSize) = 10);
return;
@@ -19242,23 +19268,23 @@
return;
}
if (reg19 == RAX) {
- offset19 = 0;
+ offset20 = 0;
}
else {
((self_in_dispatchConcretize->machineCode))[0] = (rexRxb(self_in_dispatchConcretize, 0, 0, reg19));
((self_in_dispatchConcretize->machineCode))[1] = (144 + (reg19 % 8));
- offset19 = 2;
+ offset20 = 2;
}
- ((self_in_dispatchConcretize->machineCode))[0 + offset19] = 72;
- ((self_in_dispatchConcretize->machineCode))[1 + offset19] = 163;
- ((self_in_dispatchConcretize->machineCode))[2 + offset19] = (addressOperand1 & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[3 + offset19] = ((((usqInt) addressOperand1) >> 8) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[4 + offset19] = ((((usqInt) addressOperand1) >> 16) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[5 + offset19] = ((((usqInt) addressOperand1) >> 24) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[6 + offset19] = ((((usqInt) addressOperand1) >> 32) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[7 + offset19] = ((((usqInt) addressOperand1) >> 40) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[8 + offset19] = ((((usqInt) addressOperand1) >> 48) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[9 + offset19] = ((((usqInt) addressOperand1) >> 56) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[0 + offset20] = 72;
+ ((self_in_dispatchConcretize->machineCode))[1 + offset20] = 163;
+ ((self_in_dispatchConcretize->machineCode))[2 + offset20] = (addressOperand1 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3 + offset20] = ((((usqInt) addressOperand1) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4 + offset20] = ((((usqInt) addressOperand1) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5 + offset20] = ((((usqInt) addressOperand1) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6 + offset20] = ((((usqInt) addressOperand1) >> 32) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[7 + offset20] = ((((usqInt) addressOperand1) >> 40) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[8 + offset20] = ((((usqInt) addressOperand1) >> 48) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[9 + offset20] = ((((usqInt) addressOperand1) >> 56) & 0xFF);
if (reg19 == RAX) {
((self_in_dispatchConcretize->machineCodeSize) = 10);
return;
@@ -19341,23 +19367,23 @@
}
reg20 = ((self_in_dispatchConcretize->operands))[1];
if (reg20 == RAX) {
- offset20 = 0;
+ offset21 = 0;
}
else {
((self_in_dispatchConcretize->machineCode))[0] = (rexRxb(self_in_dispatchConcretize, 0, 0, reg20));
((self_in_dispatchConcretize->machineCode))[1] = (144 + (reg20 % 8));
- offset20 = 2;
+ offset21 = 2;
}
- ((self_in_dispatchConcretize->machineCode))[0 + offset20] = 72;
- ((self_in_dispatchConcretize->machineCode))[1 + offset20] = 160;
- ((self_in_dispatchConcretize->machineCode))[2 + offset20] = (addressOperand2 & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[3 + offset20] = ((((usqInt) addressOperand2) >> 8) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[4 + offset20] = ((((usqInt) addressOperand2) >> 16) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[5 + offset20] = ((((usqInt) addressOperand2) >> 24) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[6 + offset20] = ((((usqInt) addressOperand2) >> 32) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[7 + offset20] = ((((usqInt) addressOperand2) >> 40) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[8 + offset20] = ((((usqInt) addressOperand2) >> 48) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[9 + offset20] = ((((usqInt) addressOperand2) >> 56) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[0 + offset21] = 72;
+ ((self_in_dispatchConcretize->machineCode))[1 + offset21] = 160;
+ ((self_in_dispatchConcretize->machineCode))[2 + offset21] = (addressOperand2 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3 + offset21] = ((((usqInt) addressOperand2) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4 + offset21] = ((((usqInt) addressOperand2) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5 + offset21] = ((((usqInt) addressOperand2) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6 + offset21] = ((((usqInt) addressOperand2) >> 32) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[7 + offset21] = ((((usqInt) addressOperand2) >> 40) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[8 + offset21] = ((((usqInt) addressOperand2) >> 48) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[9 + offset21] = ((((usqInt) addressOperand2) >> 56) & 0xFF);
if (reg20 == RAX) {
((self_in_dispatchConcretize->machineCodeSize) = 10);
return;
@@ -19437,23 +19463,23 @@
return;
}
if (reg21 == RAX) {
- offset21 = 0;
+ offset22 = 0;
}
else {
((self_in_dispatchConcretize->machineCode))[0] = (rexRxb(self_in_dispatchConcretize, 0, 0, reg21));
((self_in_dispatchConcretize->machineCode))[1] = (144 + (reg21 % 8));
- offset21 = 2;
+ offset22 = 2;
}
- ((self_in_dispatchConcretize->machineCode))[0 + offset21] = 72;
- ((self_in_dispatchConcretize->machineCode))[1 + offset21] = 162;
- ((self_in_dispatchConcretize->machineCode))[2 + offset21] = (addressOperand3 & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[3 + offset21] = ((((usqInt) addressOperand3) >> 8) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[4 + offset21] = ((((usqInt) addressOperand3) >> 16) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[5 + offset21] = ((((usqInt) addressOperand3) >> 24) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[6 + offset21] = ((((usqInt) addressOperand3) >> 32) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[7 + offset21] = ((((usqInt) addressOperand3) >> 40) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[8 + offset21] = ((((usqInt) addressOperand3) >> 48) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[9 + offset21] = ((((usqInt) addressOperand3) >> 56) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[0 + offset22] = 72;
+ ((self_in_dispatchConcretize->machineCode))[1 + offset22] = 162;
+ ((self_in_dispatchConcretize->machineCode))[2 + offset22] = (addressOperand3 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3 + offset22] = ((((usqInt) addressOperand3) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4 + offset22] = ((((usqInt) addressOperand3) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5 + offset22] = ((((usqInt) addressOperand3) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6 + offset22] = ((((usqInt) addressOperand3) >> 32) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[7 + offset22] = ((((usqInt) addressOperand3) >> 40) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[8 + offset22] = ((((usqInt) addressOperand3) >> 48) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[9 + offset22] = ((((usqInt) addressOperand3) >> 56) & 0xFF);
if (reg21 == RAX) {
((self_in_dispatchConcretize->machineCodeSize) = 10);
return;
@@ -20041,16 +20067,15 @@
((self_in_dispatchConcretize->machineCodeSize) = 2);
return;
}
- assert(isSignExtendedFourByteValue(self_in_dispatchConcretize, value4));
- ((self_in_dispatchConcretize->machineCode))[0] = 104;
- ((self_in_dispatchConcretize->machineCode))[1] = (value4 & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value4) >> 8) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value4) >> 16) & 0xFF);
- ((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value4) >> 24) & 0xFF);
- ((self_in_dispatchConcretize->machineCodeSize) = 5);
- return;
-
- case PushCw:
+ if (is32BitSignedImmediate(self_in_dispatchConcretize, value4)) {
+ ((self_in_dispatchConcretize->machineCode))[0] = 104;
+ ((self_in_dispatchConcretize->machineCode))[1] = (value4 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[2] = ((((usqInt) value4) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value4) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value4) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCodeSize) = 5);
+ return;
+ }
/* begin concretizePushCw */
value7 = ((self_in_dispatchConcretize->operands))[0];
if ((addressIsInInstructions(((AbstractInstruction *) value7)))
@@ -20088,6 +20113,44 @@
((self_in_dispatchConcretize->machineCodeSize) = 12);
return;
+ case PushCw:
+ /* begin concretizePushCw */
+ value8 = ((self_in_dispatchConcretize->operands))[0];
+ if ((addressIsInInstructions(((AbstractInstruction *) value8)))
+ || ((((AbstractInstruction *) value8)) == (methodLabel()))) {
+ value8 = ((((AbstractInstruction *) value8))->address);
+ }
+ if (addressIsInCurrentCompilation(value8)) {
+ offset17 = value8 - (((self_in_dispatchConcretize->address)) + 7);
+ ((self_in_dispatchConcretize->machineCode))[0] = (rexRxb(self_in_dispatchConcretize, RISCTempReg, 0, 0));
+ ((self_in_dispatchConcretize->machineCode))[1] = 141;
+ ((self_in_dispatchConcretize->machineCode))[2] = (modRMRO(self_in_dispatchConcretize, ModRegInd, 5, RISCTempReg));
+ ((self_in_dispatchConcretize->machineCode))[3] = (offset17 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) offset17) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) offset17) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) offset17) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[7] = 65;
+ ((self_in_dispatchConcretize->machineCode))[8] = (72 + RISCTempReg);
+ ((self_in_dispatchConcretize->machineCodeSize) = 9);
+ return;
+ }
+ ((self_in_dispatchConcretize->machineCode))[0] = (rexRxb(self_in_dispatchConcretize, RISCTempReg, 0, RISCTempReg));
+ ((self_in_dispatchConcretize->machineCode))[1] = (184 + (RISCTempReg & 7));
+ ((self_in_dispatchConcretize->machineCode))[2] = (value8 & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[3] = ((((usqInt) value8) >> 8) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[4] = ((((usqInt) value8) >> 16) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[5] = ((((usqInt) value8) >> 24) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[6] = ((((usqInt) value8) >> 32) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[7] = ((((usqInt) value8) >> 40) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[8] = ((((usqInt) value8) >> 48) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[9] = ((((usqInt) value8) >> 56) & 0xFF);
+ ((self_in_dispatchConcretize->machineCode))[10] = 65;
+ ((self_in_dispatchConcretize->machineCode))[11] = (72 + RISCTempReg);
+ assert(RISCTempReg >= 8);
+ assert((modRMRO(self_in_dispatchConcretize, ModReg, 0, 0)) > 87);
+ ((self_in_dispatchConcretize->machineCodeSize) = 12);
+ return;
+
case PrefetchAw:
concretizePrefetchAw(self_in_dispatchConcretize);
return;
@@ -20626,6 +20689,11 @@
}
}
+
+/* Top 32 bits all the same as the bottom 32 bits' sign bit implies we can
+ use a sign-extended 4 byte offset.
+ */
+
/* CogX64Compiler>>#is32BitSignedImmediate: */
static sqInt NoDbgRegParms
is32BitSignedImmediate(AbstractInstruction * self_in_is32BitSignedImmediate, sqInt a64BitUnsignedOperand)
@@ -20686,17 +20754,6 @@
}
-/* Top 32 bits all the same as the bottom 32 bits' sign bit implies we can
- use a sign-extended 4 byte offset. */
-
- /* CogX64Compiler>>#isSignExtendedFourByteValue: */
-static sqInt NoDbgRegParms
-isSignExtendedFourByteValue(AbstractInstruction * self_in_isSignExtendedFourByteValue, sqInt unsigned64BitValue)
-{
- return (((((sqInt) unsigned64BitValue) >> 32) + 1) ^ 1) == ((((usqInt) unsigned64BitValue) >> 0x1F) & 1);
-}
-
-
/* Answer if an address can be accessed using the offset in a MoveMw:r:R: or
similar instruction.
We assume this is true for 32-bit processors and expect 64-bit processors
@@ -24432,8 +24489,6 @@
static sqInt NoDbgRegParms
compileAbstractInstructionsFromthrough(sqInt start, sqInt end)
{
- AbstractInstruction *abstractInstruction;
- sqInt debugBytecodePointers;
BytecodeDescriptor *descriptor;
BytecodeFixup *fixup;
sqInt generateBranchAround;
@@ -24443,45 +24498,26 @@
traceSimStack();
bytecodePC = start;
- nExts = 0;
+ nExts = (result = 0);
descriptor = null;
deadCode = 0;
while (1) {
-
- /* If there's no fixup following a return there's no jump to that code and it is dead. */
fixup = fixupAt(bytecodePC - initialPC);
- if ((descriptor != null)
- && ((descriptor->isReturn))) {
- deadCode = 1;
- }
mergeWithFixupIfRequired(fixup);
- byte0 = (fetchByteofObject(bytecodePC, methodObj)) + bytecodeSetOffset;
- descriptor = generatorAt(byte0);
- loadSubsequentBytesForDescriptorat(descriptor, bytecodePC);
+ /* begin assertCorrectSimStackPtr */
+ descriptor = loadBytesAndGetDescriptor();
nextOpcodeIndex = opcodeIndex;
- if (deadCode) {
-
- /* insert nops for dead code that is mapped so that bc to mc mapping is not many to one */
- if (((descriptor->isMapped))
- || (inBlock
- && ((descriptor->isMappedInBlock)))) {
- /* begin annotateBytecode: */
- abstractInstruction = gen(Nop);
- (abstractInstruction->annotation = HasBytecodePC);
- }
- result = 0;
- }
- else {
- result = ((descriptor->generator))();
- }
+ result = (deadCode
+ ? mapDeadDescriptorIfNeeded(descriptor)
+ : ((descriptor->generator))());
+ /* begin assertExtsAreConsumed: */
if (!((descriptor->isExtension))) {
-
- /* extended bytecodes must consume their extensions */
assert((extA == 0)
&& (extB == 0));
}
traceDescriptor(descriptor);
traceSimStack();
+ /* begin patchFixupTargetIfNeeded:nextOpcodeIndex: */
if ((((((usqInt)((fixup->targetInstruction)))) >= NeedsNonMergeFixupFlag) && ((((usqInt)((fixup->targetInstruction)))) <= NeedsMergeFixupFlag))) {
/* There is a fixup for this bytecode. It must point to the first generated
@@ -27172,6 +27208,9 @@
AbstractInstruction *abstractInstruction1;
sqInt offset;
+
+ /* can't fall through */
+ deadCode = 1;
if (inBlock) {
assert(needsFrame);
/* begin CallRT: */
@@ -27198,9 +27237,6 @@
: 0);
genoperand(RetN, offset);
}
-
- /* can't fall through */
- deadCode = 1;
return 0;
}
@@ -27363,6 +27399,27 @@
return regsSet;
}
+
+/* insert nops for dead code that is mapped so that bc
+ to mc mapping is not many to one */
+
+ /* StackToRegisterMappingCogit>>#mapDeadDescriptorIfNeeded: */
+static sqInt NoDbgRegParms
+mapDeadDescriptorIfNeeded(BytecodeDescriptor *descriptor)
+{
+ AbstractInstruction *abstractInstruction;
+
+ flag("annotateInstruction");
+ if (((descriptor->isMapped))
+ || (inBlock
+ && ((descriptor->isMappedInBlock)))) {
+ /* begin annotateBytecode: */
+ abstractInstruction = gen(Nop);
+ (abstractInstruction->annotation = HasBytecodePC);
+ }
+ return 0;
+}
+
/* StackToRegisterMappingCogit>>#marshallAbsentReceiverSendArguments: */
static void NoDbgRegParms
marshallAbsentReceiverSendArguments(sqInt numArgs)
Modified: branches/Cog/nsspur64src/vm/cointerp.c
===================================================================
--- branches/Cog/nsspur64src/vm/cointerp.c 2016-04-21 23:51:51 UTC (rev 3677)
+++ branches/Cog/nsspur64src/vm/cointerp.c 2016-04-22 18:26:57 UTC (rev 3678)
@@ -1,9 +1,9 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a
from
- CoInterpreter VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe
+ CoInterpreter VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a
*/
-static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe " __DATE__ ;
+static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a " __DATE__ ;
char *__interpBuildInfo = __buildInfo;
@@ -1383,6 +1383,10 @@
static sqInt NoDbgRegParms isEmptyList(sqInt aLinkedList);
extern sqInt isFloatObject(sqInt oop);
static sqInt NoDbgRegParms isFrameonPage(char *aFrame, StackPage *aPage);
+extern sqInt isKindOfInteger(sqInt oop);
+extern sqInt isLargeIntegerObject(sqInt oop);
+extern sqInt isLargeNegativeIntegerObject(sqInt oop);
+extern sqInt isLargePositiveIntegerObject(sqInt oop);
static sqInt NoDbgRegParms isLiveContext(sqInt oop);
static sqInt NoDbgRegParms isMarriedOrWidowedContext(sqInt aContext);
static sqInt NoDbgRegParms isNullExternalPrimitiveCall(sqInt aMethodObj);
@@ -1604,8 +1608,8 @@
_iss StackPage * stackPage;
_iss sqInt nilObj;
_iss sqInt argumentCount;
+_iss sqInt bytecodeSetSelector;
_iss sqInt specialObjectsOop;
-_iss sqInt bytecodeSetSelector;
_iss sqInt messageSelector;
_iss usqInt instructionPointer;
_iss usqInt newMethod;
@@ -2430,7 +2434,7 @@
/*560*/ -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1, 0, 0, 0,-1,-1
};
char expensiveAsserts = 0;
-const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1824";
+const char *interpreterVersion = "Newspeak Virtual Machine CoInterpreterPrimitives_VMMaker.oscog-eem.1832";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
volatile int sendTrace;
@@ -61674,7 +61678,7 @@
usqInt prevFree;
usqInt prevFreeChunk;
usqInt prevPrevFree;
- sqInt prevPrevFreeChunk;
+ usqInt prevPrevFreeChunk;
sqInt slotBytes;
sqInt slotBytes1;
usqInt there;
@@ -67088,7 +67092,7 @@
bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
{
usqInt bridgeSpan;
- sqInt clifton;
+ usqInt clifton;
usqInt segEnd;
segEnd = ((aSegment->segSize)) + ((aSegment->segStart));
@@ -67332,7 +67336,7 @@
sqInt limit;
sqInt newEndOfMemory;
sqInt next;
- usqInt node;
+ sqInt node;
usqInt numSlots;
usqInt numSlots1;
SpurSegmentInfo *seg;
@@ -67675,8 +67679,8 @@
{
usqLong firstSavedBridgeWord;
sqInt nWritten;
- sqInt pier1;
- sqInt pier2;
+ usqInt pier1;
+ usqInt pier2;
usqLong secondSavedBridgeWord;
pier1 = (((segment->segSize)) + ((segment->segStart))) - (2 * BaseHeaderSize);
@@ -71922,6 +71926,42 @@
}
+/* Answer true if the oop is kind of Integer (Small or Large). */
+
+ /* StackInterpreter>>#isKindOfInteger: */
+sqInt
+isKindOfInteger(sqInt oop)
+{
+ return ((((oop) & 7) == 1))
+ || (((oop & (tagMask())) == 0)
+ && ((((usqInt)(((longAt(oop)) & (classIndexMask())) - ClassLargeNegativeIntegerCompactIndex))) <= 1));
+}
+
+ /* StackInterpreter>>#isLargeIntegerObject: */
+sqInt
+isLargeIntegerObject(sqInt oop)
+{
+ return ((oop & (tagMask())) == 0)
+ && ((((usqInt)(((longAt(oop)) & (classIndexMask())) - ClassLargeNegativeIntegerCompactIndex))) <= 1);
+}
+
+ /* StackInterpreter>>#isLargeNegativeIntegerObject: */
+sqInt
+isLargeNegativeIntegerObject(sqInt oop)
+{
+ return ((oop & (tagMask())) == 0)
+ && (((longAt(oop)) & (classIndexMask())) == ClassLargeNegativeIntegerCompactIndex);
+}
+
+ /* StackInterpreter>>#isLargePositiveIntegerObject: */
+sqInt
+isLargePositiveIntegerObject(sqInt oop)
+{
+ return ((oop & (tagMask())) == 0)
+ && (((longAt(oop)) & (classIndexMask())) == ClassLargePositiveIntegerCompactIndex);
+}
+
+
/* Answer if the argument, which can be any object, is a live context. */
/* StackInterpreter>>#isLiveContext: */
@@ -77659,8 +77699,8 @@
cnt = ((((max = 128)) < ((len = lengthOfformat(oop, (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask()))))) ? ((max = 128)) : ((len = lengthOfformat(oop, (((usqInt) (longAt(oop))) >> (formatShift())) & (formatMask())))));
i = 0;
if ((isinstanceOfcompactClassIndex(oop, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)ClassByteArray) << (shiftForWord()))), GIV(classByteArrayCompactIndex)))
- || ((isinstanceOfcompactClassIndex(oop, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)ClassLargePositiveInteger) << (shiftForWord()))), ClassLargePositiveIntegerCompactIndex))
- || (isinstanceOfcompactClassIndex(oop, longAt((GIV(specialObjectsOop) + BaseHeaderSize) + (((long)ClassLargeNegativeInteger) << (shiftForWord()))), ClassLargeNegativeIntegerCompactIndex)))) {
+ || (((oop & (tagMask())) == 0)
+ && ((((usqInt)(((longAt(oop)) & (classIndexMask())) - ClassLargeNegativeIntegerCompactIndex))) <= 1))) {
while (i < cnt) {
printHex(byteAt((oop + BaseHeaderSize) + i));
i += 1;
Modified: branches/Cog/nsspur64src/vm/cointerp.h
===================================================================
--- branches/Cog/nsspur64src/vm/cointerp.h 2016-04-21 23:51:51 UTC (rev 3677)
+++ branches/Cog/nsspur64src/vm/cointerp.h 2016-04-22 18:26:57 UTC (rev 3678)
@@ -1,5 +1,5 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a
*/
@@ -272,6 +272,10 @@
extern sqInt headerIndicatesAlternateBytecodeSet(sqInt methodHeader);
extern sqInt highBit(usqInt anUnsignedValue);
extern sqInt isFloatObject(sqInt oop);
+extern sqInt isKindOfInteger(sqInt oop);
+extern sqInt isLargeIntegerObject(sqInt oop);
+extern sqInt isLargeNegativeIntegerObject(sqInt oop);
+extern sqInt isLargePositiveIntegerObject(sqInt oop);
extern sqInt isQuickPrimitiveIndex(sqInt anInteger);
extern sqInt isReadMediatedContextInstVarIndex(sqInt index);
extern sqInt isWriteMediatedContextInstVarIndex(sqInt index);
Modified: branches/Cog/nsspur64src/vm/gcc3x-cointerp.c
===================================================================
--- branches/Cog/nsspur64src/vm/gcc3x-cointerp.c 2016-04-21 23:51:51 UTC (rev 3677)
+++ branches/Cog/nsspur64src/vm/gcc3x-cointerp.c 2016-04-22 18:26:57 UTC (rev 3678)
@@ -2,11 +2,11 @@
/* Automatically generated by
- CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1824 uuid: 3e604324-d371-4ad6-ac2d-8acf325accfe
+ CCodeGeneratorGlobalStructure VMMaker.oscog-eem.1832 uuid: 3e4d6e88-f60d-4a01-930d-7c5895b8a86a
from
@@ Diff output truncated at 50000 characters. @@
More information about the Vm-dev
mailing list