|
@@ -2,6 +2,29 @@
|
|
|
|
|
|
|
|
#include "InMemoryBuffer.h"
|
|
#include "InMemoryBuffer.h"
|
|
|
|
|
|
|
|
|
|
+enum OperandSizeOverwrite
|
|
|
|
|
+{
|
|
|
|
|
+ NO_PREFIX = 0,
|
|
|
|
|
+ X66 = 0x66,
|
|
|
|
|
+ XF2 = 0xF2,
|
|
|
|
|
+ XF3 = 0xF3
|
|
|
|
|
+};
|
|
|
|
|
+
|
|
|
|
|
+bool isVolatile(Framework::Assembly::GPRegister reg)
|
|
|
|
|
+{
|
|
|
|
|
+ return reg == Framework::Assembly::RAX || reg == Framework::Assembly::RCX
|
|
|
|
|
+ || reg == Framework::Assembly::RDX || reg == Framework::Assembly::R8
|
|
|
|
|
+ || reg == Framework::Assembly::R9 || reg == Framework::Assembly::R10
|
|
|
|
|
+ || reg == Framework::Assembly::R11;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+bool isVolatile(Framework::Assembly::FPRegister reg)
|
|
|
|
|
+{
|
|
|
|
|
+ return reg == Framework::Assembly::MM0 || reg == Framework::Assembly::MM1
|
|
|
|
|
+ || reg == Framework::Assembly::MM2 || reg == Framework::Assembly::MM3
|
|
|
|
|
+ || reg == Framework::Assembly::MM4 || reg == Framework::Assembly::MM5;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
struct MachineCodeInstruction
|
|
struct MachineCodeInstruction
|
|
|
{
|
|
{
|
|
|
bool needsRex;
|
|
bool needsRex;
|
|
@@ -15,7 +38,7 @@ struct MachineCodeInstruction
|
|
|
char dispLength;
|
|
char dispLength;
|
|
|
char imm[8];
|
|
char imm[8];
|
|
|
char immLength;
|
|
char immLength;
|
|
|
- bool operandSizeOverride;
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride;
|
|
|
bool errIfRex;
|
|
bool errIfRex;
|
|
|
bool errIfNoRex;
|
|
bool errIfNoRex;
|
|
|
bool exR;
|
|
bool exR;
|
|
@@ -31,7 +54,7 @@ struct MachineCodeInstruction
|
|
|
{
|
|
{
|
|
|
if (operandSizeOverride)
|
|
if (operandSizeOverride)
|
|
|
{
|
|
{
|
|
|
- char prefix = 0x66;
|
|
|
|
|
|
|
+ char prefix = *(char*)&operandSizeOverride;
|
|
|
writer.schreibe(&prefix, 1);
|
|
writer.schreibe(&prefix, 1);
|
|
|
}
|
|
}
|
|
|
if (needsRex && !needsVex)
|
|
if (needsRex && !needsVex)
|
|
@@ -209,13 +232,13 @@ private:
|
|
|
std::vector<Framework::Assembly::GPRegister> impliedWriteGPRegs;
|
|
std::vector<Framework::Assembly::GPRegister> impliedWriteGPRegs;
|
|
|
std::vector<Framework::Assembly::FPRegister> impliedReadFPRegs;
|
|
std::vector<Framework::Assembly::FPRegister> impliedReadFPRegs;
|
|
|
std::vector<Framework::Assembly::FPRegister> impliedWriteFPRegs;
|
|
std::vector<Framework::Assembly::FPRegister> impliedWriteFPRegs;
|
|
|
- bool operandSizeOverride;
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride;
|
|
|
|
|
|
|
|
public:
|
|
public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -245,7 +268,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -279,7 +302,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -306,7 +329,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -345,7 +368,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -379,7 +402,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -425,7 +448,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -466,7 +489,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -519,7 +542,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -567,7 +590,7 @@ public:
|
|
|
MachineCodeTableEntry(bool rexW,
|
|
MachineCodeTableEntry(bool rexW,
|
|
|
int opcode,
|
|
int opcode,
|
|
|
char opcodeLength,
|
|
char opcodeLength,
|
|
|
- bool operandSizeOverride,
|
|
|
|
|
|
|
+ OperandSizeOverwrite operandSizeOverride,
|
|
|
bool vex,
|
|
bool vex,
|
|
|
bool vexL,
|
|
bool vexL,
|
|
|
char vexPP,
|
|
char vexPP,
|
|
@@ -714,96 +737,99 @@ public:
|
|
|
entries(entries)
|
|
entries(entries)
|
|
|
{}
|
|
{}
|
|
|
|
|
|
|
|
- MachineCodeInstruction getInstruction(
|
|
|
|
|
|
|
+ virtual MachineCodeInstruction getInstruction(
|
|
|
const std::vector<Framework::Assembly::OperationArgument*>& args,
|
|
const std::vector<Framework::Assembly::OperationArgument*>& args,
|
|
|
const Framework::Assembly::AssemblyBlock* codeBlock,
|
|
const Framework::Assembly::AssemblyBlock* codeBlock,
|
|
|
- const Framework::Assembly::Instruction* current)
|
|
|
|
|
|
|
+ const Framework::Assembly::Instruction* current,
|
|
|
|
|
+ Framework::Text& err)
|
|
|
{
|
|
{
|
|
|
MachineCodeInstruction result;
|
|
MachineCodeInstruction result;
|
|
|
memset(&result, 0, sizeof(MachineCodeInstruction));
|
|
memset(&result, 0, sizeof(MachineCodeInstruction));
|
|
|
- const MachineCodeTableEntry& entry = getEntry(args, codeBlock, current);
|
|
|
|
|
- result.needsVex = entry.vex;
|
|
|
|
|
- result.vexL = entry.vexL;
|
|
|
|
|
- result.vexPP = entry.vexPP;
|
|
|
|
|
- result.needsRex = entry.rexW;
|
|
|
|
|
- result.exWE = entry.rexW;
|
|
|
|
|
- result.modRM = entry.rmReg << 3;
|
|
|
|
|
- if (entry.rmReg)
|
|
|
|
|
|
|
+ const MachineCodeTableEntry* entry
|
|
|
|
|
+ = getEntry(args, codeBlock, current, err);
|
|
|
|
|
+ if (!entry)
|
|
|
|
|
+ {
|
|
|
|
|
+ return result;
|
|
|
|
|
+ }
|
|
|
|
|
+ result.needsVex = entry->vex;
|
|
|
|
|
+ result.vexL = entry->vexL;
|
|
|
|
|
+ result.vexPP = entry->vexPP;
|
|
|
|
|
+ result.needsRex = entry->rexW;
|
|
|
|
|
+ result.exWE = entry->rexW;
|
|
|
|
|
+ result.modRM = entry->rmReg << 3;
|
|
|
|
|
+ if (entry->rmReg)
|
|
|
{
|
|
{
|
|
|
result.needsModRM = true;
|
|
result.needsModRM = true;
|
|
|
}
|
|
}
|
|
|
- memcpy(result.opcode, entry.opcode, 3);
|
|
|
|
|
- result.opcodeLength = entry.opcodeLength;
|
|
|
|
|
- result.operandSizeOverride = entry.operandSizeOverride;
|
|
|
|
|
|
|
+ memcpy(result.opcode, entry->opcode, 3);
|
|
|
|
|
+ result.opcodeLength = entry->opcodeLength;
|
|
|
|
|
+ result.operandSizeOverride = entry->operandSizeOverride;
|
|
|
for (int i = 0; i < args.size(); i++)
|
|
for (int i = 0; i < args.size(); i++)
|
|
|
{
|
|
{
|
|
|
OperandEncoding encoding = UNDEFINED;
|
|
OperandEncoding encoding = UNDEFINED;
|
|
|
switch (i)
|
|
switch (i)
|
|
|
{
|
|
{
|
|
|
case 0:
|
|
case 0:
|
|
|
- encoding = entry.op1Encoding;
|
|
|
|
|
|
|
+ encoding = entry->op1Encoding;
|
|
|
break;
|
|
break;
|
|
|
case 1:
|
|
case 1:
|
|
|
- encoding = entry.op2Encoding;
|
|
|
|
|
|
|
+ encoding = entry->op2Encoding;
|
|
|
break;
|
|
break;
|
|
|
case 2:
|
|
case 2:
|
|
|
- encoding = entry.op3Encoding;
|
|
|
|
|
|
|
+ encoding = entry->op3Encoding;
|
|
|
break;
|
|
break;
|
|
|
case 3:
|
|
case 3:
|
|
|
- encoding = entry.op4Encoding;
|
|
|
|
|
|
|
+ encoding = entry->op4Encoding;
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
switch (encoding)
|
|
switch (encoding)
|
|
|
{
|
|
{
|
|
|
case MODRM_REG:
|
|
case MODRM_REG:
|
|
|
- encodeModRM_REG(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeModRM_REG(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
case MODRM_RM:
|
|
case MODRM_RM:
|
|
|
- encodeModRM_RM(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeModRM_RM(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
case VEX_VVVV:
|
|
case VEX_VVVV:
|
|
|
- encodeVex_VVVV(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeVex_VVVV(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
case OPCODE_RD:
|
|
case OPCODE_RD:
|
|
|
- encodeOpcode_RD(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeOpcode_RD(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
case IMM8:
|
|
case IMM8:
|
|
|
- encodeIMM8(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeIMM8(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
case IMM16:
|
|
case IMM16:
|
|
|
- encodeIMM16(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeIMM16(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
case IMM32:
|
|
case IMM32:
|
|
|
- encodeIMM32(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeIMM32(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
case IMM64:
|
|
case IMM64:
|
|
|
- encodeIMM64(result, args[i], i + 1);
|
|
|
|
|
|
|
+ encodeIMM64(result, args[i], i + 1, err);
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (result.errIfNoRex && !result.needsRex)
|
|
if (result.errIfNoRex && !result.needsRex)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Instruction " << op
|
|
|
|
|
- << " has no REX prefix and can not address "
|
|
|
|
|
- "LOWER8 of registers RSP, RBP, RSI or RDI";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Instruction " << op
|
|
|
|
|
+ << " has no REX prefix and can not address "
|
|
|
|
|
+ "LOWER8 of registers RSP, RBP, RSI or RDI\n";
|
|
|
}
|
|
}
|
|
|
if (result.errIfRex && result.needsRex)
|
|
if (result.errIfRex && result.needsRex)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Instruction " << op
|
|
|
|
|
- << " has a REX prefix and can not address "
|
|
|
|
|
- "HIGHER8 of registers RAX, RBX, RCX or RDX";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Instruction " << op
|
|
|
|
|
+ << " has a REX prefix and can not address "
|
|
|
|
|
+ "HIGHER8 of registers RAX, RBX, RCX or RDX\n";
|
|
|
}
|
|
}
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- virtual MachineCodeTableEntry& getEntry(
|
|
|
|
|
|
|
+ MachineCodeTableEntry* getEntry(
|
|
|
const std::vector<Framework::Assembly::OperationArgument*>& args,
|
|
const std::vector<Framework::Assembly::OperationArgument*>& args,
|
|
|
const Framework::Assembly::AssemblyBlock* codeBlock,
|
|
const Framework::Assembly::AssemblyBlock* codeBlock,
|
|
|
- const Framework::Assembly::Instruction* current)
|
|
|
|
|
|
|
+ const Framework::Assembly::Instruction* current,
|
|
|
|
|
+ Framework::Text& err)
|
|
|
{
|
|
{
|
|
|
MachineCodeInstruction result;
|
|
MachineCodeInstruction result;
|
|
|
memset(&result, 0, sizeof(MachineCodeInstruction));
|
|
memset(&result, 0, sizeof(MachineCodeInstruction));
|
|
@@ -811,17 +837,16 @@ public:
|
|
|
{
|
|
{
|
|
|
if (entry.matches((int)args.size(), args))
|
|
if (entry.matches((int)args.size(), args))
|
|
|
{
|
|
{
|
|
|
- return entry;
|
|
|
|
|
|
|
+ return &entry;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- Framework::Text err;
|
|
|
|
|
err.append() << "operation " << (int)op
|
|
err.append() << "operation " << (int)op
|
|
|
<< " not found in translation table. args: \n";
|
|
<< " not found in translation table. args: \n";
|
|
|
for (auto arg : args)
|
|
for (auto arg : args)
|
|
|
{
|
|
{
|
|
|
err.append() << " " << typeid(*arg).name() << "\n";
|
|
err.append() << " " << typeid(*arg).name() << "\n";
|
|
|
}
|
|
}
|
|
|
- throw err.getText();
|
|
|
|
|
|
|
+ return 0;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
Framework::Assembly::Operation getOperation() const
|
|
Framework::Assembly::Operation getOperation() const
|
|
@@ -831,7 +856,8 @@ public:
|
|
|
|
|
|
|
|
void encodeModRM_REG(MachineCodeInstruction& result,
|
|
void encodeModRM_REG(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
result.needsModRM = true;
|
|
result.needsModRM = true;
|
|
|
const Framework::Assembly::GPRegisterArgument* gpRegArg
|
|
const Framework::Assembly::GPRegisterArgument* gpRegArg
|
|
@@ -840,27 +866,26 @@ public:
|
|
|
= arg->asFPRegisterArgument();
|
|
= arg->asFPRegisterArgument();
|
|
|
if (gpRegArg)
|
|
if (gpRegArg)
|
|
|
{
|
|
{
|
|
|
- encodeModRM_REG_GP(result, gpRegArg, index);
|
|
|
|
|
|
|
+ encodeModRM_REG_GP(result, gpRegArg, index, err);
|
|
|
}
|
|
}
|
|
|
else if (fpRegArg)
|
|
else if (fpRegArg)
|
|
|
{
|
|
{
|
|
|
- encodeModRM_REG_FP(result, fpRegArg, index);
|
|
|
|
|
|
|
+ encodeModRM_REG_FP(result, fpRegArg, index, err);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append()
|
|
|
|
|
|
|
+ err.append()
|
|
|
<< "Invalid argument type for operand " << index
|
|
<< "Invalid argument type for operand " << index
|
|
|
<< " for operation " << op << " encoded as MODRM_REG: found "
|
|
<< " for operation " << op << " encoded as MODRM_REG: found "
|
|
|
<< typeid(*arg).name()
|
|
<< typeid(*arg).name()
|
|
|
- << " but expected GPRegisterArgument or FPRegisterArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ << " but expected GPRegisterArgument or FPRegisterArgument\n";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void encodeModRM_REG_GP(MachineCodeInstruction& result,
|
|
void encodeModRM_REG_GP(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::GPRegisterArgument* arg,
|
|
const Framework::Assembly::GPRegisterArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
Framework::Assembly::GPRegister reg = arg->getRegister();
|
|
Framework::Assembly::GPRegister reg = arg->getRegister();
|
|
|
if (reg >= Framework::Assembly::R8)
|
|
if (reg >= Framework::Assembly::R8)
|
|
@@ -892,11 +917,10 @@ public:
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " HIGHER8 can only be used for registers RAX, "
|
|
|
|
|
- "RBX, RCX or RDX";
|
|
|
|
|
|
|
+ err.append() << "Invalid argument for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " HIGHER8 can only be used for registers RAX, "
|
|
|
|
|
+ "RBX, RCX or RDX\n";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
@@ -915,7 +939,8 @@ public:
|
|
|
|
|
|
|
|
void encodeModRM_REG_FP(MachineCodeInstruction& result,
|
|
void encodeModRM_REG_FP(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::FPRegisterArgument* arg,
|
|
const Framework::Assembly::FPRegisterArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
Framework::Assembly::FPRegister reg = arg->getRegister();
|
|
Framework::Assembly::FPRegister reg = arg->getRegister();
|
|
|
if (reg >= Framework::Assembly::MM8)
|
|
if (reg >= Framework::Assembly::MM8)
|
|
@@ -928,7 +953,8 @@ public:
|
|
|
|
|
|
|
|
void encodeModRM_RM(MachineCodeInstruction& result,
|
|
void encodeModRM_RM(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
result.needsModRM = true;
|
|
result.needsModRM = true;
|
|
|
const Framework::Assembly::GPRegisterArgument* gpRegArg
|
|
const Framework::Assembly::GPRegisterArgument* gpRegArg
|
|
@@ -939,32 +965,31 @@ public:
|
|
|
= arg->asMemoryAccessArgument();
|
|
= arg->asMemoryAccessArgument();
|
|
|
if (gpRegArg)
|
|
if (gpRegArg)
|
|
|
{
|
|
{
|
|
|
- encodeModRM_RM_GP(result, gpRegArg, index);
|
|
|
|
|
|
|
+ encodeModRM_RM_GP(result, gpRegArg, index, err);
|
|
|
}
|
|
}
|
|
|
else if (fpRegArg)
|
|
else if (fpRegArg)
|
|
|
{
|
|
{
|
|
|
- encodeModRM_RM_FP(result, fpRegArg, index);
|
|
|
|
|
|
|
+ encodeModRM_RM_FP(result, fpRegArg, index, err);
|
|
|
}
|
|
}
|
|
|
else if (memArg)
|
|
else if (memArg)
|
|
|
{
|
|
{
|
|
|
- encodeModRM_RM_Mem(result, memArg, index);
|
|
|
|
|
|
|
+ encodeModRM_RM_Mem(result, memArg, index, err);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append()
|
|
|
|
|
|
|
+ err.append()
|
|
|
<< "Invalid argument type for operand " << index
|
|
<< "Invalid argument type for operand " << index
|
|
|
<< " for operation " << op << " encoded as MODRM_RM: found "
|
|
<< " for operation " << op << " encoded as MODRM_RM: found "
|
|
|
<< typeid(*arg).name()
|
|
<< typeid(*arg).name()
|
|
|
<< " but expected GPRegisterArgument, FPRegisterArgument "
|
|
<< " but expected GPRegisterArgument, FPRegisterArgument "
|
|
|
- "or MemoryAccessArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ "or MemoryAccessArgument\n";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void encodeModRM_RM_GP(MachineCodeInstruction& result,
|
|
void encodeModRM_RM_GP(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::GPRegisterArgument* arg,
|
|
const Framework::Assembly::GPRegisterArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
Framework::Assembly::GPRegister reg = arg->getRegister();
|
|
Framework::Assembly::GPRegister reg = arg->getRegister();
|
|
|
if (reg >= Framework::Assembly::R8)
|
|
if (reg >= Framework::Assembly::R8)
|
|
@@ -997,11 +1022,10 @@ public:
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " HIGHER8 can only be used for registers RAX, "
|
|
|
|
|
- "RBX, RCX or RDX";
|
|
|
|
|
|
|
+ err.append() << "Invalid argument for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " HIGHER8 can only be used for registers RAX, "
|
|
|
|
|
+ "RBX, RCX or RDX\n";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
@@ -1020,7 +1044,8 @@ public:
|
|
|
|
|
|
|
|
void encodeModRM_RM_FP(MachineCodeInstruction& result,
|
|
void encodeModRM_RM_FP(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::FPRegisterArgument* arg,
|
|
const Framework::Assembly::FPRegisterArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
Framework::Assembly::FPRegister reg = arg->getRegister();
|
|
Framework::Assembly::FPRegister reg = arg->getRegister();
|
|
|
if (reg >= Framework::Assembly::MM8)
|
|
if (reg >= Framework::Assembly::MM8)
|
|
@@ -1034,7 +1059,8 @@ public:
|
|
|
|
|
|
|
|
void encodeModRM_RM_Mem(MachineCodeInstruction& result,
|
|
void encodeModRM_RM_Mem(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::MemoryAccessArgument* arg,
|
|
const Framework::Assembly::MemoryAccessArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
if (arg->isUsingAddressRegister() || arg->isUsingOffsetRegister())
|
|
if (arg->isUsingAddressRegister() || arg->isUsingOffsetRegister())
|
|
|
{
|
|
{
|
|
@@ -1045,7 +1071,7 @@ public:
|
|
|
{
|
|
{
|
|
|
// SIB needed
|
|
// SIB needed
|
|
|
result.sibNeeded = true;
|
|
result.sibNeeded = true;
|
|
|
- result.modRM |= 0b100 << 3; // indicate SIB
|
|
|
|
|
|
|
+ result.modRM |= 0b100; // indicate SIB
|
|
|
if (reg >= Framework::Assembly::R8)
|
|
if (reg >= Framework::Assembly::R8)
|
|
|
{
|
|
{
|
|
|
result.needsRex = true;
|
|
result.needsRex = true;
|
|
@@ -1056,11 +1082,9 @@ public:
|
|
|
= arg->getOffsetRegister();
|
|
= arg->getOffsetRegister();
|
|
|
if (offsetReg == Framework::Assembly::RSP)
|
|
if (offsetReg == Framework::Assembly::RSP)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " RSP can not be used as index register";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " RSP can not be used as index register\n";
|
|
|
}
|
|
}
|
|
|
if (offsetReg >= Framework::Assembly::R8)
|
|
if (offsetReg >= Framework::Assembly::R8)
|
|
|
{
|
|
{
|
|
@@ -1069,6 +1093,14 @@ public:
|
|
|
}
|
|
}
|
|
|
result.sib |= (offsetReg & 0b111) << 3; // index register
|
|
result.sib |= (offsetReg & 0b111) << 3; // index register
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (reg == 0b100)
|
|
|
|
|
+ {
|
|
|
|
|
+ // SIB needed
|
|
|
|
|
+ result.sibNeeded = true;
|
|
|
|
|
+ result.modRM |= 0b100; // indicate SIB
|
|
|
|
|
+ result.sib |= reg & 0b111;
|
|
|
|
|
+ result.sib |= 0b100 << 3; // no index register
|
|
|
|
|
+ }
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
if (reg >= Framework::Assembly::R8)
|
|
if (reg >= Framework::Assembly::R8)
|
|
@@ -1079,7 +1111,7 @@ public:
|
|
|
result.modRM |= reg & 0b111;
|
|
result.modRM |= reg & 0b111;
|
|
|
}
|
|
}
|
|
|
int offset = arg->getOffset();
|
|
int offset = arg->getOffset();
|
|
|
- if (offset > 0)
|
|
|
|
|
|
|
+ if (offset)
|
|
|
{
|
|
{
|
|
|
if (offset <= 127 && offset >= -128)
|
|
if (offset <= 127 && offset >= -128)
|
|
|
{
|
|
{
|
|
@@ -1119,29 +1151,29 @@ public:
|
|
|
|
|
|
|
|
void encodeVex_VVVV(MachineCodeInstruction& result,
|
|
void encodeVex_VVVV(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
const Framework::Assembly::FPRegisterArgument* fpRegArg
|
|
const Framework::Assembly::FPRegisterArgument* fpRegArg
|
|
|
= arg->asFPRegisterArgument();
|
|
= arg->asFPRegisterArgument();
|
|
|
if (fpRegArg)
|
|
if (fpRegArg)
|
|
|
{
|
|
{
|
|
|
- encodeVex_VVVV_FP(result, fpRegArg, index);
|
|
|
|
|
|
|
+ encodeVex_VVVV_FP(result, fpRegArg, index, err);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as VEX_VVVV: found "
|
|
|
|
|
- << typeid(*arg).name()
|
|
|
|
|
- << " but expected FPRegisterArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as VEX_VVVV: found "
|
|
|
|
|
+ << typeid(*arg).name()
|
|
|
|
|
+ << " but expected FPRegisterArgument\n";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void encodeVex_VVVV_FP(MachineCodeInstruction& result,
|
|
void encodeVex_VVVV_FP(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::FPRegisterArgument* arg,
|
|
const Framework::Assembly::FPRegisterArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
Framework::Assembly::FPRegister reg = arg->getRegister();
|
|
Framework::Assembly::FPRegister reg = arg->getRegister();
|
|
|
result.vexVVVV = reg & 0b1111;
|
|
result.vexVVVV = reg & 0b1111;
|
|
@@ -1150,29 +1182,29 @@ public:
|
|
|
|
|
|
|
|
void encodeOpcode_RD(MachineCodeInstruction& result,
|
|
void encodeOpcode_RD(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
const Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
const Framework::Assembly::GPRegisterArgument* gpRegArg
|
|
const Framework::Assembly::GPRegisterArgument* gpRegArg
|
|
|
= arg->asGPRegisterArgument();
|
|
= arg->asGPRegisterArgument();
|
|
|
if (gpRegArg)
|
|
if (gpRegArg)
|
|
|
{
|
|
{
|
|
|
- encodeOpcode_RD_GP(result, gpRegArg, index);
|
|
|
|
|
|
|
+ encodeOpcode_RD_GP(result, gpRegArg, index, err);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as OPCODE_RD: found "
|
|
|
|
|
- << typeid(*arg).name()
|
|
|
|
|
- << " but expected GPRegisterArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as OPCODE_RD: found "
|
|
|
|
|
+ << typeid(*arg).name()
|
|
|
|
|
+ << " but expected GPRegisterArgument\n";
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void encodeOpcode_RD_GP(MachineCodeInstruction& result,
|
|
void encodeOpcode_RD_GP(MachineCodeInstruction& result,
|
|
|
const Framework::Assembly::GPRegisterArgument* arg,
|
|
const Framework::Assembly::GPRegisterArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
Framework::Assembly::GPRegister reg = arg->getRegister();
|
|
Framework::Assembly::GPRegister reg = arg->getRegister();
|
|
|
if (reg >= Framework::Assembly::R8)
|
|
if (reg >= Framework::Assembly::R8)
|
|
@@ -1185,37 +1217,35 @@ public:
|
|
|
|
|
|
|
|
void encodeIMM8(MachineCodeInstruction& result,
|
|
void encodeIMM8(MachineCodeInstruction& result,
|
|
|
Framework::Assembly::OperationArgument* arg,
|
|
Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
if (result.immLength >= 8)
|
|
if (result.immLength >= 8)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: imm bytes are already in use";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM8: imm bytes are already in use\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
|
= arg->asConstantArgument();
|
|
= arg->asConstantArgument();
|
|
|
if (constArg == 0)
|
|
if (constArg == 0)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found " << typeid(*arg).name()
|
|
|
|
|
- << " but expected ConstantArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM8: found " << typeid(*arg).name()
|
|
|
|
|
+ << " but expected ConstantArgument\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
int value = (int)constArg->getValue();
|
|
int value = (int)constArg->getValue();
|
|
|
int len = (int)constArg->getSize();
|
|
int len = (int)constArg->getSize();
|
|
|
if (len > 1)
|
|
if (len > 1)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Constant size too large for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found size " << len
|
|
|
|
|
- << " but expected size BYTE";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Constant size too large for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM8: found size " << len
|
|
|
|
|
+ << " but expected size BYTE\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
result.imm[(int)result.immLength] = (char)(value);
|
|
result.imm[(int)result.immLength] = (char)(value);
|
|
|
result.immLength += 1;
|
|
result.immLength += 1;
|
|
@@ -1223,37 +1253,35 @@ public:
|
|
|
|
|
|
|
|
void encodeIMM16(MachineCodeInstruction& result,
|
|
void encodeIMM16(MachineCodeInstruction& result,
|
|
|
Framework::Assembly::OperationArgument* arg,
|
|
Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
if (result.immLength >= 7)
|
|
if (result.immLength >= 7)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: imm bytes are already in use";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM16: imm bytes are already in use\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
|
= arg->asConstantArgument();
|
|
= arg->asConstantArgument();
|
|
|
if (constArg == 0)
|
|
if (constArg == 0)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found " << typeid(*arg).name()
|
|
|
|
|
- << " but expected ConstantArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM16: found " << typeid(*arg).name()
|
|
|
|
|
+ << " but expected ConstantArgument\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
int value = (int)constArg->getValue();
|
|
int value = (int)constArg->getValue();
|
|
|
int len = (int)constArg->getSize();
|
|
int len = (int)constArg->getSize();
|
|
|
if (len > 2)
|
|
if (len > 2)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Constant size too large for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found size " << len
|
|
|
|
|
- << " but expected size range [BYTE, WORD]";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Constant size too large for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM16: found size " << len
|
|
|
|
|
+ << " but expected size range [BYTE, WORD]\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
short val = (short)(value);
|
|
short val = (short)(value);
|
|
|
memcpy(result.imm + result.immLength, &val, 2);
|
|
memcpy(result.imm + result.immLength, &val, 2);
|
|
@@ -1262,37 +1290,35 @@ public:
|
|
|
|
|
|
|
|
void encodeIMM32(MachineCodeInstruction& result,
|
|
void encodeIMM32(MachineCodeInstruction& result,
|
|
|
Framework::Assembly::OperationArgument* arg,
|
|
Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
if (result.immLength >= 5)
|
|
if (result.immLength >= 5)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: imm bytes are already in use";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM32: imm bytes are already in use\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
|
= arg->asConstantArgument();
|
|
= arg->asConstantArgument();
|
|
|
if (constArg == 0)
|
|
if (constArg == 0)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found " << typeid(*arg).name()
|
|
|
|
|
- << " but expected ConstantArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM32: found " << typeid(*arg).name()
|
|
|
|
|
+ << " but expected ConstantArgument\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
int value = (int)constArg->getValue();
|
|
int value = (int)constArg->getValue();
|
|
|
int len = (int)constArg->getSize();
|
|
int len = (int)constArg->getSize();
|
|
|
if (len > 4)
|
|
if (len > 4)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Constant size too large for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found size " << len
|
|
|
|
|
- << " but expected size range [BYTE, DWORD]";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Constant size too large for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM32: found size " << len
|
|
|
|
|
+ << " but expected size range [BYTE, DWORD]\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
memcpy(result.imm + result.immLength, &value, 4);
|
|
memcpy(result.imm + result.immLength, &value, 4);
|
|
|
result.immLength += 4;
|
|
result.immLength += 4;
|
|
@@ -1300,37 +1326,35 @@ public:
|
|
|
|
|
|
|
|
void encodeIMM64(MachineCodeInstruction& result,
|
|
void encodeIMM64(MachineCodeInstruction& result,
|
|
|
Framework::Assembly::OperationArgument* arg,
|
|
Framework::Assembly::OperationArgument* arg,
|
|
|
- int index) const
|
|
|
|
|
|
|
+ int index,
|
|
|
|
|
+ Framework::Text& err) const
|
|
|
{
|
|
{
|
|
|
if (result.immLength >= 1)
|
|
if (result.immLength >= 1)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: imm bytes are already in use";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM64: imm bytes are already in use\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
const Framework::Assembly::ConstantArgument* constArg
|
|
|
= arg->asConstantArgument();
|
|
= arg->asConstantArgument();
|
|
|
if (constArg == 0)
|
|
if (constArg == 0)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Invalid argument type for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found " << typeid(*arg).name()
|
|
|
|
|
- << " but expected ConstantArgument";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Invalid argument type for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM64: found " << typeid(*arg).name()
|
|
|
|
|
+ << " but expected ConstantArgument\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
__int64 value = constArg->getValue();
|
|
__int64 value = constArg->getValue();
|
|
|
int len = (int)constArg->getSize();
|
|
int len = (int)constArg->getSize();
|
|
|
if (len > 8)
|
|
if (len > 8)
|
|
|
{
|
|
{
|
|
|
- Framework::Text* err = new Framework::Text();
|
|
|
|
|
- err->append() << "Constant size too large for operand " << index
|
|
|
|
|
- << " for operation " << op
|
|
|
|
|
- << " encoded as IMM8: found size " << len
|
|
|
|
|
- << " but expected size range [BYTE, QWORD]";
|
|
|
|
|
- throw err->getText();
|
|
|
|
|
|
|
+ err.append() << "Constant size too large for operand " << index
|
|
|
|
|
+ << " for operation " << op
|
|
|
|
|
+ << " encoded as IMM64: found size " << len
|
|
|
|
|
+ << " but expected size range [BYTE, QWORD]\n";
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
memcpy(result.imm + result.immLength, &value, 8);
|
|
memcpy(result.imm + result.immLength, &value, 8);
|
|
|
result.immLength += 8;
|
|
result.immLength += 8;
|
|
@@ -1348,13 +1372,15 @@ public:
|
|
|
char opCodeLength,
|
|
char opCodeLength,
|
|
|
std::initializer_list<MachineCodeTableEntry> entries)
|
|
std::initializer_list<MachineCodeTableEntry> entries)
|
|
|
: OperationCodeTable(op, entries),
|
|
: OperationCodeTable(op, entries),
|
|
|
- opCodeLength(opCodeLength)
|
|
|
|
|
|
|
+ opCodeLength(opCodeLength),
|
|
|
|
|
+ inGetEntry(0)
|
|
|
{}
|
|
{}
|
|
|
|
|
|
|
|
- virtual MachineCodeTableEntry& getEntry(
|
|
|
|
|
|
|
+ virtual MachineCodeInstruction getInstruction(
|
|
|
const std::vector<Framework::Assembly::OperationArgument*>& args,
|
|
const std::vector<Framework::Assembly::OperationArgument*>& args,
|
|
|
const Framework::Assembly::AssemblyBlock* codeBlock,
|
|
const Framework::Assembly::AssemblyBlock* codeBlock,
|
|
|
- const Framework::Assembly::Instruction* current) override
|
|
|
|
|
|
|
+ const Framework::Assembly::Instruction* current,
|
|
|
|
|
+ Framework::Text& err) override
|
|
|
{
|
|
{
|
|
|
if (inGetEntry)
|
|
if (inGetEntry)
|
|
|
{
|
|
{
|
|
@@ -1377,8 +1403,8 @@ public:
|
|
|
transformedArgs.push_back(arg);
|
|
transformedArgs.push_back(arg);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- MachineCodeTableEntry& result = OperationCodeTable::getEntry(
|
|
|
|
|
- transformedArgs, codeBlock, current);
|
|
|
|
|
|
|
+ MachineCodeInstruction result = OperationCodeTable::getInstruction(
|
|
|
|
|
+ transformedArgs, codeBlock, current, err);
|
|
|
for (Framework::Assembly::OperationArgument* arg : newArgs)
|
|
for (Framework::Assembly::OperationArgument* arg : newArgs)
|
|
|
{
|
|
{
|
|
|
delete arg;
|
|
delete arg;
|
|
@@ -1408,10 +1434,6 @@ public:
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
- else
|
|
|
|
|
- {
|
|
|
|
|
- backwords = true;
|
|
|
|
|
- }
|
|
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
if (instr->definesLabel(label))
|
|
if (instr->definesLabel(label))
|
|
@@ -1421,6 +1443,10 @@ public:
|
|
|
{
|
|
{
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ backwords = true;
|
|
|
|
|
+ }
|
|
|
continue;
|
|
continue;
|
|
|
}
|
|
}
|
|
|
if (labelFound || currentFound)
|
|
if (labelFound || currentFound)
|
|
@@ -1442,12 +1468,13 @@ public:
|
|
|
transformedArgs.push_back(arg);
|
|
transformedArgs.push_back(arg);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- MachineCodeTableEntry& result
|
|
|
|
|
- = OperationCodeTable::getEntry(transformedArgs, codeBlock, current);
|
|
|
|
|
|
|
+ MachineCodeInstruction result = OperationCodeTable::getInstruction(
|
|
|
|
|
+ transformedArgs, codeBlock, current, err);
|
|
|
for (Framework::Assembly::OperationArgument* arg : newArgs)
|
|
for (Framework::Assembly::OperationArgument* arg : newArgs)
|
|
|
{
|
|
{
|
|
|
delete arg;
|
|
delete arg;
|
|
|
}
|
|
}
|
|
|
|
|
+ inGetEntry = 0;
|
|
|
return result;
|
|
return result;
|
|
|
}
|
|
}
|
|
|
};
|
|
};
|
|
@@ -1564,7 +1591,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x04,
|
|
0x04,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1580,7 +1607,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x05,
|
|
0x05,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1597,7 +1624,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
false,
|
|
false,
|
|
|
0x05,
|
|
0x05,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1615,7 +1642,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x05,
|
|
0x05,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1631,7 +1658,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x80,
|
|
0x80,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1647,7 +1674,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1663,7 +1690,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1679,7 +1706,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1696,7 +1723,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
false,
|
|
false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1718,7 +1745,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
false,
|
|
false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1740,7 +1767,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
true,
|
|
true,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1761,7 +1788,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x00,
|
|
0x00,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1778,7 +1805,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x01,
|
|
0x01,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1795,7 +1822,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x01,
|
|
0x01,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1812,7 +1839,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x01,
|
|
0x01,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1829,7 +1856,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x02,
|
|
0x02,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1846,7 +1873,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x03,
|
|
0x03,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1863,7 +1890,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x03,
|
|
0x03,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1880,7 +1907,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x03,
|
|
0x03,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1899,7 +1926,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1916,7 +1943,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -1937,7 +1964,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -1960,7 +1987,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1977,7 +2004,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -1998,7 +2025,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0,
|
|
0,
|
|
@@ -2019,9 +2046,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
new OperationCodeTable(Framework::Assembly::ADDSD,
|
|
new OperationCodeTable(Framework::Assembly::ADDSD,
|
|
|
{// ADDSD xmm1, xmm2/m64
|
|
{// ADDSD xmm1, xmm2/m64
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x580FF2,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x580F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2039,7 +2066,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b11,
|
|
0b11,
|
|
@@ -2061,9 +2088,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
new OperationCodeTable(Framework::Assembly::ADDSS,
|
|
new OperationCodeTable(Framework::Assembly::ADDSS,
|
|
|
{// ADDPS xmm1, xmm2/m32
|
|
{// ADDPS xmm1, xmm2/m32
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x580FF3,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x580F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2082,7 +2109,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x580F,
|
|
0x580F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b10,
|
|
0b10,
|
|
@@ -2107,7 +2134,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x2C,
|
|
0x2C,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2123,7 +2150,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x2D,
|
|
0x2D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2139,7 +2166,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x2D,
|
|
0x2D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2155,7 +2182,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x2D,
|
|
0x2D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2171,7 +2198,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x80,
|
|
0x80,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2187,7 +2214,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2203,7 +2230,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2219,7 +2246,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2235,7 +2262,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2251,7 +2278,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2267,7 +2294,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2283,7 +2310,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x28,
|
|
0x28,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2300,7 +2327,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x29,
|
|
0x29,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2317,7 +2344,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x29,
|
|
0x29,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2334,7 +2361,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x29,
|
|
0x29,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2351,7 +2378,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x2A,
|
|
0x2A,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2368,7 +2395,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x2B,
|
|
0x2B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2385,7 +2412,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x2B,
|
|
0x2B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2402,7 +2429,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x2B,
|
|
0x2B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2423,7 +2450,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5D0F,
|
|
0x5D0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2440,7 +2467,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5C0F,
|
|
0x5C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -2461,7 +2488,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5C0F,
|
|
0x5C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -2486,7 +2513,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5D0F,
|
|
0x5D0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2503,7 +2530,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5C0F,
|
|
0x5C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b00,
|
|
0b00,
|
|
@@ -2524,7 +2551,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5C0F,
|
|
0x5C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b00,
|
|
0b00,
|
|
@@ -2547,9 +2574,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// SUBSD xmm1, xmm2/m64
|
|
// SUBSD xmm1, xmm2/m64
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x5C0FF2,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x5C0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2567,7 +2594,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5C0F,
|
|
0x5C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b11,
|
|
0b11,
|
|
@@ -2591,9 +2618,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// SUBSS xmm1, xmm2/m32
|
|
// SUBSS xmm1, xmm2/m32
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x5C0FF3,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x5C0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2611,7 +2638,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5C0F,
|
|
0x5C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b10,
|
|
0b10,
|
|
@@ -2637,7 +2664,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF6,
|
|
0xF6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2654,7 +2681,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2671,7 +2698,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2688,7 +2715,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2709,7 +2736,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF6,
|
|
0xF6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2726,7 +2753,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2743,7 +2770,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2760,7 +2787,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2777,7 +2804,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xAF0F,
|
|
0xAF0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2794,7 +2821,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xAF0F,
|
|
0xAF0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2811,7 +2838,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xAF0F,
|
|
0xAF0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2828,7 +2855,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x6B,
|
|
0x6B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2848,7 +2875,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x6B,
|
|
0x6B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2868,7 +2895,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x6B,
|
|
0x6B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2888,7 +2915,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x69,
|
|
0x69,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2908,7 +2935,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x69,
|
|
0x69,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2928,7 +2955,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x69,
|
|
0x69,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2952,7 +2979,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -2969,7 +2996,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -2990,7 +3017,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -3015,7 +3042,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3032,7 +3059,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3053,7 +3080,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0,
|
|
0,
|
|
@@ -3076,9 +3103,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// MULSD xmm1,xmm2/m64
|
|
// MULSD xmm1,xmm2/m64
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x590FF2,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x590F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3095,7 +3122,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b11,
|
|
0b11,
|
|
@@ -3118,9 +3145,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// MULSS xmm1,xmm2/m64
|
|
// MULSS xmm1,xmm2/m64
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x590FF3,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x590F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3137,7 +3164,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x590F,
|
|
0x590F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b10,
|
|
0b10,
|
|
@@ -3162,7 +3189,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF6,
|
|
0xF6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3179,7 +3206,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3196,7 +3223,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3213,7 +3240,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3234,7 +3261,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF6,
|
|
0xF6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3251,7 +3278,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3268,7 +3295,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3285,7 +3312,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3306,7 +3333,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3323,7 +3350,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -3344,7 +3371,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -3369,7 +3396,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3386,7 +3413,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3407,7 +3434,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0,
|
|
0,
|
|
@@ -3430,9 +3457,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// DIVSD xmm1, xmm2/m128
|
|
// DIVSD xmm1, xmm2/m128
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x5E0FF2,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x5E0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3449,7 +3476,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b11,
|
|
0b11,
|
|
@@ -3472,9 +3499,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// DIVSS xmm1, xmm2/m128
|
|
// DIVSS xmm1, xmm2/m128
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x5E0FF3,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x5E0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3491,7 +3518,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x5E0F,
|
|
0x5E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b10,
|
|
0b10,
|
|
@@ -3516,7 +3543,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF6,
|
|
0xF6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3529,7 +3556,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3542,7 +3569,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3555,7 +3582,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3572,7 +3599,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xFE,
|
|
0xFE,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3585,7 +3612,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3598,7 +3625,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3611,7 +3638,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3628,7 +3655,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x24,
|
|
0x24,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3644,7 +3671,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x25,
|
|
0x25,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3660,7 +3687,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x25,
|
|
0x25,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3676,7 +3703,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x25,
|
|
0x25,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3692,7 +3719,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x80,
|
|
0x80,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3708,7 +3735,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3724,7 +3751,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3740,7 +3767,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3756,7 +3783,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3772,7 +3799,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3788,7 +3815,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3804,7 +3831,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x20,
|
|
0x20,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3821,7 +3848,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x21,
|
|
0x21,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3838,7 +3865,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x21,
|
|
0x21,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3855,7 +3882,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x21,
|
|
0x21,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3872,7 +3899,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x22,
|
|
0x22,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3889,7 +3916,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x23,
|
|
0x23,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3906,7 +3933,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x23,
|
|
0x23,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3923,7 +3950,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x23,
|
|
0x23,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3944,7 +3971,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x0C,
|
|
0x0C,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3960,7 +3987,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x0D,
|
|
0x0D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3976,7 +4003,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x0D,
|
|
0x0D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -3992,7 +4019,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x0D,
|
|
0x0D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4008,7 +4035,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x80,
|
|
0x80,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4024,7 +4051,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4040,7 +4067,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4056,7 +4083,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4072,7 +4099,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4088,7 +4115,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4104,7 +4131,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4120,7 +4147,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x08,
|
|
0x08,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4137,7 +4164,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x09,
|
|
0x09,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4154,7 +4181,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x09,
|
|
0x09,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4171,7 +4198,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x09,
|
|
0x09,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4188,7 +4215,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x0A,
|
|
0x0A,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4205,7 +4232,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x0B,
|
|
0x0B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4222,7 +4249,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x0B,
|
|
0x0B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4239,7 +4266,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x0B,
|
|
0x0B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4260,7 +4287,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x34,
|
|
0x34,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4276,7 +4303,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x35,
|
|
0x35,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4292,7 +4319,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x35,
|
|
0x35,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4308,7 +4335,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x35,
|
|
0x35,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4324,7 +4351,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x80,
|
|
0x80,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4340,7 +4367,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4356,7 +4383,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4372,7 +4399,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4388,7 +4415,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4404,7 +4431,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4420,7 +4447,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4436,7 +4463,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x30,
|
|
0x30,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4453,7 +4480,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x31,
|
|
0x31,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4470,7 +4497,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x31,
|
|
0x31,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4487,7 +4514,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x31,
|
|
0x31,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4504,7 +4531,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x32,
|
|
0x32,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4521,7 +4548,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x33,
|
|
0x33,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4538,7 +4565,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x33,
|
|
0x33,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4555,7 +4582,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x33,
|
|
0x33,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4576,7 +4603,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF6,
|
|
0xF6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4589,7 +4616,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4602,7 +4629,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4615,7 +4642,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4632,7 +4659,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xA8,
|
|
0xA8,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4648,7 +4675,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xA9,
|
|
0xA9,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4664,7 +4691,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xA9,
|
|
0xA9,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4680,7 +4707,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xA9,
|
|
0xA9,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4696,7 +4723,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF6,
|
|
0xF6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4712,7 +4739,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4728,7 +4755,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4744,7 +4771,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xF7,
|
|
0xF7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4760,7 +4787,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x84,
|
|
0x84,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4777,7 +4804,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x85,
|
|
0x85,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4794,7 +4821,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x85,
|
|
0x85,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4811,7 +4838,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x85,
|
|
0x85,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4832,7 +4859,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x3C,
|
|
0x3C,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4848,7 +4875,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x3D,
|
|
0x3D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4864,7 +4891,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x3D,
|
|
0x3D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4880,7 +4907,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x3D,
|
|
0x3D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4896,7 +4923,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x80,
|
|
0x80,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4912,7 +4939,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4928,7 +4955,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4944,7 +4971,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x83,
|
|
0x83,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4960,7 +4987,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4976,7 +5003,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -4992,7 +5019,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x81,
|
|
0x81,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5008,7 +5035,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x38,
|
|
0x38,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5025,7 +5052,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x39,
|
|
0x39,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5042,7 +5069,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x39,
|
|
0x39,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5059,7 +5086,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x39,
|
|
0x39,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5076,7 +5103,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x3A,
|
|
0x3A,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5093,7 +5120,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x3B,
|
|
0x3B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5110,7 +5137,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x3B,
|
|
0x3B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5127,7 +5154,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x3B,
|
|
0x3B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5148,7 +5175,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5168,7 +5195,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -5192,7 +5219,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -5220,7 +5247,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5240,7 +5267,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b00,
|
|
0b00,
|
|
@@ -5264,7 +5291,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b00,
|
|
0b00,
|
|
@@ -5290,9 +5317,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// CMPSD xmm1, xmm2/m128, imm8
|
|
// CMPSD xmm1, xmm2/m128, imm8
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0xC20FF2,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0xC20F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5312,7 +5339,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b11,
|
|
0b11,
|
|
@@ -5338,9 +5365,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// CMPSS xmm1, xmm2/m128, imm8
|
|
// CMPSS xmm1, xmm2/m128, imm8
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0xC20FF3,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0xC20F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5360,7 +5387,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC20F,
|
|
0xC20F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b10,
|
|
0b10,
|
|
@@ -5381,13 +5408,53 @@ void __intializeMachineCodeTranslationTable()
|
|
|
IMM8,
|
|
IMM8,
|
|
|
READ),
|
|
READ),
|
|
|
}));
|
|
}));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::COMISD,
|
|
|
|
|
+ {// COMISD xmm1, xmm2/m64
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x2F0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ X66,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isFPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ READ,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ)}));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::COMISS,
|
|
|
|
|
+ {// COMISS xmm1, xmm2/m32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x2F0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isFPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ READ,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ)}));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
new OperationCodeTable(Framework::Assembly::MOV,
|
|
new OperationCodeTable(Framework::Assembly::MOV,
|
|
|
{// MOV r/m8, r8
|
|
{// MOV r/m8, r8
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x88,
|
|
0x88,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5404,7 +5471,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x89,
|
|
0x89,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5421,7 +5488,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x89,
|
|
0x89,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5438,7 +5505,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x89,
|
|
0x89,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5455,7 +5522,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8A,
|
|
0x8A,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5472,7 +5539,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8B,
|
|
0x8B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5489,7 +5556,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8B,
|
|
0x8B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5506,7 +5573,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0x8B,
|
|
0x8B,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5523,7 +5590,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xB0,
|
|
0xB0,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5539,7 +5606,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xB8,
|
|
0xB8,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5555,7 +5622,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xB8,
|
|
0xB8,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5571,7 +5638,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xB8,
|
|
0xB8,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5587,7 +5654,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC6,
|
|
0xC6,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5603,7 +5670,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC7,
|
|
0xC7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5619,7 +5686,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xC7,
|
|
0xC7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5635,7 +5702,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(true,
|
|
MachineCodeTableEntry(true,
|
|
|
0xC7,
|
|
0xC7,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5648,13 +5715,13 @@ void __intializeMachineCodeTranslationTable()
|
|
|
IMM32,
|
|
IMM32,
|
|
|
READ)}));
|
|
READ)}));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
- new OperationCodeTable(Framework::Assembly::MOVAPD,
|
|
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::MOVUPD,
|
|
|
{
|
|
{
|
|
|
- // MOVAPD xmm1, xmm2/m128
|
|
|
|
|
|
|
+ // MOVUPD xmm1, xmm2/m128
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x280F,
|
|
|
|
|
|
|
+ 0x100F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5667,48 +5734,14 @@ void __intializeMachineCodeTranslationTable()
|
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
|
MODRM_RM,
|
|
MODRM_RM,
|
|
|
READ),
|
|
READ),
|
|
|
- // MOVAPD xmm2/m128, xmm1
|
|
|
|
|
|
|
+ // MOVUPD xmm2/m128, xmm1
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x290F,
|
|
|
|
|
- (char)2,
|
|
|
|
|
- true,
|
|
|
|
|
- false,
|
|
|
|
|
- false,
|
|
|
|
|
- 0,
|
|
|
|
|
- 0,
|
|
|
|
|
- isFPRegisterOrMEmoryAccess(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_RM,
|
|
|
|
|
- WRITE,
|
|
|
|
|
- isFPRegister(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_REG,
|
|
|
|
|
- READ),
|
|
|
|
|
- // MOVAPD xmm1, xmm2/m128
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0x280F,
|
|
|
|
|
|
|
+ 0x110F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
- true,
|
|
|
|
|
false,
|
|
false,
|
|
|
- 0b01,
|
|
|
|
|
0,
|
|
0,
|
|
|
- isFPRegister(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_REG,
|
|
|
|
|
- WRITE,
|
|
|
|
|
- isFPRegisterOrMEmoryAccess(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_RM,
|
|
|
|
|
- READ),
|
|
|
|
|
- // VMOVAPD xmm2/m128, xmm1
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0x290F,
|
|
|
|
|
- (char)2,
|
|
|
|
|
- false,
|
|
|
|
|
- true,
|
|
|
|
|
- false,
|
|
|
|
|
- 0b01,
|
|
|
|
|
0,
|
|
0,
|
|
|
isFPRegisterOrMEmoryAccess(
|
|
isFPRegisterOrMEmoryAccess(
|
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
@@ -5718,11 +5751,11 @@ void __intializeMachineCodeTranslationTable()
|
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
|
MODRM_REG,
|
|
MODRM_REG,
|
|
|
READ),
|
|
READ),
|
|
|
- // MOVAPD ymm1, ymm2/m256
|
|
|
|
|
|
|
+ // VMOVUPD ymm1, ymm2/m256
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x280F,
|
|
|
|
|
|
|
+ 0x100F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -5735,11 +5768,11 @@ void __intializeMachineCodeTranslationTable()
|
|
|
Framework::Assembly::MemoryBlockSize::M256),
|
|
Framework::Assembly::MemoryBlockSize::M256),
|
|
|
MODRM_RM,
|
|
MODRM_RM,
|
|
|
READ),
|
|
READ),
|
|
|
- // VMOVAPD ymm2/m256, ymm1
|
|
|
|
|
|
|
+ // VMOVUPD ymm2/m256, ymm1
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x290F,
|
|
|
|
|
|
|
+ 0x110F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b01,
|
|
0b01,
|
|
@@ -5754,13 +5787,13 @@ void __intializeMachineCodeTranslationTable()
|
|
|
READ),
|
|
READ),
|
|
|
}));
|
|
}));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
- new OperationCodeTable(Framework::Assembly::MOVAPS,
|
|
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::MOVUPS,
|
|
|
{
|
|
{
|
|
|
- // MOVAPS xmm1, xmm2/m128
|
|
|
|
|
|
|
+ // MOVUPS xmm1, xmm2/m128
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x280F,
|
|
|
|
|
|
|
+ 0x100F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5773,48 +5806,14 @@ void __intializeMachineCodeTranslationTable()
|
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
|
MODRM_RM,
|
|
MODRM_RM,
|
|
|
READ),
|
|
READ),
|
|
|
- // MOVAPS xmm2/m128, xmm1
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0x290F,
|
|
|
|
|
- (char)2,
|
|
|
|
|
- false,
|
|
|
|
|
- false,
|
|
|
|
|
- false,
|
|
|
|
|
- 0,
|
|
|
|
|
- 0,
|
|
|
|
|
- isFPRegisterOrMEmoryAccess(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_RM,
|
|
|
|
|
- WRITE,
|
|
|
|
|
- isFPRegister(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_REG,
|
|
|
|
|
- READ),
|
|
|
|
|
- // VMOVAPS xmm1, xmm2/m128
|
|
|
|
|
|
|
+ // MOVUPS xmm2/m128, xmm1
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x280F,
|
|
|
|
|
|
|
+ 0x110F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
- true,
|
|
|
|
|
false,
|
|
false,
|
|
|
- 0b00,
|
|
|
|
|
0,
|
|
0,
|
|
|
- isFPRegister(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_REG,
|
|
|
|
|
- WRITE,
|
|
|
|
|
- isFPRegisterOrMEmoryAccess(
|
|
|
|
|
- Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
- MODRM_RM,
|
|
|
|
|
- READ),
|
|
|
|
|
- // VMOVAPS xmm2/m128, xmm1
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0x290F,
|
|
|
|
|
- (char)2,
|
|
|
|
|
- false,
|
|
|
|
|
- true,
|
|
|
|
|
- false,
|
|
|
|
|
- 0b00,
|
|
|
|
|
0,
|
|
0,
|
|
|
isFPRegisterOrMEmoryAccess(
|
|
isFPRegisterOrMEmoryAccess(
|
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
@@ -5824,11 +5823,11 @@ void __intializeMachineCodeTranslationTable()
|
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
Framework::Assembly::MemoryBlockSize::M128),
|
|
|
MODRM_REG,
|
|
MODRM_REG,
|
|
|
READ),
|
|
READ),
|
|
|
- // VMOVAPS ymm1, ymm2/m256
|
|
|
|
|
|
|
+ // VMOVUPS ymm1, ymm2/m256
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x280F,
|
|
|
|
|
|
|
+ 0x100F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b00,
|
|
0b00,
|
|
@@ -5841,11 +5840,11 @@ void __intializeMachineCodeTranslationTable()
|
|
|
Framework::Assembly::MemoryBlockSize::M256),
|
|
Framework::Assembly::MemoryBlockSize::M256),
|
|
|
MODRM_RM,
|
|
MODRM_RM,
|
|
|
READ),
|
|
READ),
|
|
|
- // VMOVAPS ymm2/m256, ymm1
|
|
|
|
|
|
|
+ // VMOVUPS ymm2/m256, ymm1
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x290F,
|
|
|
|
|
|
|
+ 0x110F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
true,
|
|
true,
|
|
|
0b00,
|
|
0b00,
|
|
@@ -5864,9 +5863,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// MOVSD xmm1, xmm2/m64
|
|
// MOVSD xmm1, xmm2/m64
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x100FF2,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x100F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5882,9 +5881,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
READ),
|
|
READ),
|
|
|
// MOVSD xmm2/m128, xmm1
|
|
// MOVSD xmm2/m128, xmm1
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x110FF2,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x110F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5902,7 +5901,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x100F,
|
|
0x100F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b11,
|
|
0b11,
|
|
@@ -5925,9 +5924,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
{
|
|
{
|
|
|
// MOVSS xmm1, xmm2/m32
|
|
// MOVSS xmm1, xmm2/m32
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x100FF3,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x100F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5943,9 +5942,9 @@ void __intializeMachineCodeTranslationTable()
|
|
|
READ),
|
|
READ),
|
|
|
// MOVSS xmm2/m128, xmm1
|
|
// MOVSS xmm2/m128, xmm1
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x110FF3,
|
|
|
|
|
- (char)3,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x110F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -5963,7 +5962,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x100F,
|
|
0x100F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
true,
|
|
true,
|
|
|
false,
|
|
false,
|
|
|
0b10,
|
|
0b10,
|
|
@@ -5989,7 +5988,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
false,
|
|
false,
|
|
|
0x8D,
|
|
0x8D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6008,7 +6007,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
false,
|
|
false,
|
|
|
0x8D,
|
|
0x8D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6027,7 +6026,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
true,
|
|
true,
|
|
|
0x8D,
|
|
0x8D,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6043,95 +6042,331 @@ void __intializeMachineCodeTranslationTable()
|
|
|
READ),
|
|
READ),
|
|
|
}));
|
|
}));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
- new JumpOperationCodeTable(Framework::Assembly::JMP,
|
|
|
|
|
- 1,
|
|
|
|
|
- {// JMP rel32
|
|
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::CVTSI2SD,
|
|
|
|
|
+ {
|
|
|
|
|
+ // CVTSI2SD xmm1, r32/m32
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0xE9,
|
|
|
|
|
- (char)1,
|
|
|
|
|
- false,
|
|
|
|
|
|
|
+ 0x2A0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
- IMM32,
|
|
|
|
|
- READ)}));
|
|
|
|
|
- OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
- new JumpOperationCodeTable(Framework::Assembly::JZ,
|
|
|
|
|
- 2,
|
|
|
|
|
- {// JZ rel32
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0x840F,
|
|
|
|
|
|
|
+ isFPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isGPRegisterOrMemoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ // CVTSI2SD xmm1, r64/m64
|
|
|
|
|
+ MachineCodeTableEntry(true,
|
|
|
|
|
+ 0x2A0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
- IMM32,
|
|
|
|
|
- READ)}));
|
|
|
|
|
|
|
+ isFPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isGPRegisterOrMemoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ }));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
- new JumpOperationCodeTable(Framework::Assembly::JNZ,
|
|
|
|
|
- 2,
|
|
|
|
|
- {// JNZ rel32
|
|
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::CVTTSD2SI,
|
|
|
|
|
+ {
|
|
|
|
|
+ // CVTTSD2SI r32, xmm1/m64
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x850F,
|
|
|
|
|
|
|
+ 0x2C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
- IMM32,
|
|
|
|
|
- READ)}));
|
|
|
|
|
- OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
- new JumpOperationCodeTable(Framework::Assembly::JG,
|
|
|
|
|
- 2,
|
|
|
|
|
- {// JG rel32
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0x8F0F,
|
|
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ // CVTTSD2SI r64, xmm1/m64
|
|
|
|
|
+ MachineCodeTableEntry(true,
|
|
|
|
|
+ 0x2C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ XF2,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
- IMM32,
|
|
|
|
|
- READ)}));
|
|
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ }));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
- new JumpOperationCodeTable(Framework::Assembly::JGE,
|
|
|
|
|
- 2,
|
|
|
|
|
- {// JGE rel32
|
|
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::CVTTSS2SI,
|
|
|
|
|
+ {
|
|
|
|
|
+ // CVTTSS2SI r32, xmm1/m32
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
- 0x8D0F,
|
|
|
|
|
|
|
+ 0x2C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
- IMM32,
|
|
|
|
|
- READ)}));
|
|
|
|
|
- OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
- new JumpOperationCodeTable(Framework::Assembly::JL,
|
|
|
|
|
- 2,
|
|
|
|
|
- {// JL rel32
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0x8C0F,
|
|
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ // CVTTSS2SI r64, xmm1/m32
|
|
|
|
|
+ MachineCodeTableEntry(true,
|
|
|
|
|
+ 0x2C0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ XF3,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
|
0,
|
|
0,
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
- IMM32,
|
|
|
|
|
- READ)}));
|
|
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ }));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::CVTSD2SI,
|
|
|
|
|
+ {
|
|
|
|
|
+ // CVTSD2SI r32, xmm1/m64
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x2D0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ // CVTSD2SI r64, xmm1/m64
|
|
|
|
|
+ MachineCodeTableEntry(true,
|
|
|
|
|
+ 0x2D0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ }));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::CVTSS2SI,
|
|
|
|
|
+ {
|
|
|
|
|
+ // CVTSS2SI r32, xmm1/m32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x2D0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ // CVTSS2SI r64, xmm1/m32
|
|
|
|
|
+ MachineCodeTableEntry(true,
|
|
|
|
|
+ 0x2D0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF3,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isGPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isFPRegisterOrMEmoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128,
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ }));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new OperationCodeTable(Framework::Assembly::CVTSI2SS,
|
|
|
|
|
+ {
|
|
|
|
|
+ // CVTSI2SS xmm1, r32/m32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x2A0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isFPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isGPRegisterOrMemoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ // CVTSI2SS xmm1, r64/m64
|
|
|
|
|
+ MachineCodeTableEntry(true,
|
|
|
|
|
+ 0x2A0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ XF2,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isFPRegister(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::M128),
|
|
|
|
|
+ MODRM_REG,
|
|
|
|
|
+ WRITE,
|
|
|
|
|
+ isGPRegisterOrMemoryAccess(
|
|
|
|
|
+ Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
|
|
+ MODRM_RM,
|
|
|
|
|
+ READ),
|
|
|
|
|
+ }));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new JumpOperationCodeTable(Framework::Assembly::JMP,
|
|
|
|
|
+ 1,
|
|
|
|
|
+ {// JMP rel32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0xE9,
|
|
|
|
|
+ (char)1,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ IMM32,
|
|
|
|
|
+ READ)}));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new JumpOperationCodeTable(Framework::Assembly::JZ,
|
|
|
|
|
+ 2,
|
|
|
|
|
+ {// JZ rel32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x840F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ IMM32,
|
|
|
|
|
+ READ)}));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new JumpOperationCodeTable(Framework::Assembly::JNZ,
|
|
|
|
|
+ 2,
|
|
|
|
|
+ {// JNZ rel32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x850F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ IMM32,
|
|
|
|
|
+ READ)}));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new JumpOperationCodeTable(Framework::Assembly::JG,
|
|
|
|
|
+ 2,
|
|
|
|
|
+ {// JG rel32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x8F0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ IMM32,
|
|
|
|
|
+ READ)}));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new JumpOperationCodeTable(Framework::Assembly::JGE,
|
|
|
|
|
+ 2,
|
|
|
|
|
+ {// JGE rel32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x8D0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ IMM32,
|
|
|
|
|
+ READ)}));
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
+ new JumpOperationCodeTable(Framework::Assembly::JL,
|
|
|
|
|
+ 2,
|
|
|
|
|
+ {// JL rel32
|
|
|
|
|
+ MachineCodeTableEntry(false,
|
|
|
|
|
+ 0x8C0F,
|
|
|
|
|
+ (char)2,
|
|
|
|
|
+ NO_PREFIX,
|
|
|
|
|
+ false,
|
|
|
|
|
+ false,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ 0,
|
|
|
|
|
+ isIMM(Framework::Assembly::MemoryBlockSize::DWORD),
|
|
|
|
|
+ IMM32,
|
|
|
|
|
+ READ)}));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
new JumpOperationCodeTable(Framework::Assembly::JLE,
|
|
new JumpOperationCodeTable(Framework::Assembly::JLE,
|
|
|
2,
|
|
2,
|
|
@@ -6139,7 +6374,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8E0F,
|
|
0x8E0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6154,7 +6389,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x870F,
|
|
0x870F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6169,7 +6404,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x820F,
|
|
0x820F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6184,7 +6419,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x830F,
|
|
0x830F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6199,7 +6434,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x860F,
|
|
0x860F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6214,7 +6449,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x800F,
|
|
0x800F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6229,7 +6464,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x810F,
|
|
0x810F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6244,7 +6479,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8A0F,
|
|
0x8A0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6259,7 +6494,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8B0F,
|
|
0x8B0F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6274,7 +6509,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x880F,
|
|
0x880F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6289,7 +6524,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x890F,
|
|
0x890F,
|
|
|
(char)2,
|
|
(char)2,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6303,7 +6538,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xE8,
|
|
0xE8,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6315,7 +6550,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xFF,
|
|
0xFF,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6324,33 +6559,11 @@ void __intializeMachineCodeTranslationTable()
|
|
|
Framework::Assembly::MemoryBlockSize::QWORD),
|
|
Framework::Assembly::MemoryBlockSize::QWORD),
|
|
|
MODRM_RM,
|
|
MODRM_RM,
|
|
|
READ)}));
|
|
READ)}));
|
|
|
- OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
- new OperationCodeTable(Framework::Assembly::ENTER,
|
|
|
|
|
- {// ENTER
|
|
|
|
|
- MachineCodeTableEntry(false,
|
|
|
|
|
- 0xC8,
|
|
|
|
|
- (char)1,
|
|
|
|
|
- false,
|
|
|
|
|
- false,
|
|
|
|
|
- false,
|
|
|
|
|
- 0,
|
|
|
|
|
- 0,
|
|
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::WORD),
|
|
|
|
|
- IMM16,
|
|
|
|
|
- READ,
|
|
|
|
|
- isIMM(Framework::Assembly::MemoryBlockSize::BYTE),
|
|
|
|
|
- IMM8,
|
|
|
|
|
- READ)}));
|
|
|
|
|
- OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
|
|
- new OperationCodeTable(Framework::Assembly::LEAVE,
|
|
|
|
|
- {// LEAVE
|
|
|
|
|
- MachineCodeTableEntry(
|
|
|
|
|
- false, 0xC9, (char)1, false, false, false, 0, 0)}));
|
|
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
new OperationCodeTable(Framework::Assembly::RET,
|
|
new OperationCodeTable(Framework::Assembly::RET,
|
|
|
{// RET
|
|
{// RET
|
|
|
MachineCodeTableEntry(
|
|
MachineCodeTableEntry(
|
|
|
- false, 0xC3, (char)1, false, false, false, 0, 0)}));
|
|
|
|
|
|
|
+ false, 0xC3, (char)1, NO_PREFIX, false, false, 0, 0)}));
|
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
OperationCodeTable::machineCodeTranslationTable.add(
|
|
|
new OperationCodeTable(Framework::Assembly::PUSH,
|
|
new OperationCodeTable(Framework::Assembly::PUSH,
|
|
|
{
|
|
{
|
|
@@ -6358,7 +6571,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xFF,
|
|
0xFF,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6371,7 +6584,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0xFF,
|
|
0xFF,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6384,7 +6597,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x6A,
|
|
0x6A,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6396,7 +6609,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x68,
|
|
0x68,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6408,7 +6621,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x68,
|
|
0x68,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6424,7 +6637,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8F,
|
|
0x8F,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- true,
|
|
|
|
|
|
|
+ X66,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6437,7 +6650,7 @@ void __intializeMachineCodeTranslationTable()
|
|
|
MachineCodeTableEntry(false,
|
|
MachineCodeTableEntry(false,
|
|
|
0x8F,
|
|
0x8F,
|
|
|
(char)1,
|
|
(char)1,
|
|
|
- false,
|
|
|
|
|
|
|
+ NO_PREFIX,
|
|
|
false,
|
|
false,
|
|
|
false,
|
|
false,
|
|
|
0,
|
|
0,
|
|
@@ -6686,9 +6899,22 @@ const Framework::Text& Framework::Assembly::JumpTargetArgument::getLabel() const
|
|
|
|
|
|
|
|
Framework::Assembly::Instruction::Instruction(
|
|
Framework::Assembly::Instruction::Instruction(
|
|
|
Operation op, std::initializer_list<OperationArgument*> args)
|
|
Operation op, std::initializer_list<OperationArgument*> args)
|
|
|
|
|
+ : Instruction(op, args, {}, {}, {}, {})
|
|
|
|
|
+{}
|
|
|
|
|
+
|
|
|
|
|
+Framework::Assembly::Instruction::Instruction(Operation op,
|
|
|
|
|
+ std::initializer_list<OperationArgument*> params,
|
|
|
|
|
+ std::initializer_list<GPRegister> implicitReadGPs,
|
|
|
|
|
+ std::initializer_list<FPRegister> implicitReadFPs,
|
|
|
|
|
+ std::initializer_list<GPRegister> implicitWriteGPs,
|
|
|
|
|
+ std::initializer_list<FPRegister> implicitWriteFPs)
|
|
|
: ReferenceCounter(),
|
|
: ReferenceCounter(),
|
|
|
op(op),
|
|
op(op),
|
|
|
- args(args)
|
|
|
|
|
|
|
+ args(params),
|
|
|
|
|
+ implicitReadGPs(implicitReadGPs),
|
|
|
|
|
+ implicitReadFPs(implicitReadFPs),
|
|
|
|
|
+ implicitWriteGPs(implicitWriteGPs),
|
|
|
|
|
+ implicitWriteFPs(implicitWriteFPs)
|
|
|
{}
|
|
{}
|
|
|
|
|
|
|
|
Framework::Assembly::Instruction::~Instruction()
|
|
Framework::Assembly::Instruction::~Instruction()
|
|
@@ -6702,34 +6928,46 @@ Framework::Assembly::Instruction::~Instruction()
|
|
|
bool Framework::Assembly::Instruction::writesToRegister(
|
|
bool Framework::Assembly::Instruction::writesToRegister(
|
|
|
GPRegister reg, const AssemblyBlock* block) const
|
|
GPRegister reg, const AssemblyBlock* block) const
|
|
|
{
|
|
{
|
|
|
|
|
+ for (GPRegister r : implicitWriteGPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
__intializeMachineCodeTranslationTable();
|
|
__intializeMachineCodeTranslationTable();
|
|
|
for (OperationCodeTable* tableEntry :
|
|
for (OperationCodeTable* tableEntry :
|
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
|
{
|
|
{
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
- MachineCodeTableEntry& entry
|
|
|
|
|
- = tableEntry->getEntry(args, block, this);
|
|
|
|
|
- for (GPRegister r : entry.getImpliedWriteGPRegs())
|
|
|
|
|
|
|
+ Framework::Text err;
|
|
|
|
|
+ MachineCodeTableEntry* entry
|
|
|
|
|
+ = tableEntry->getEntry(args, block, this, err);
|
|
|
|
|
+ if (entry)
|
|
|
{
|
|
{
|
|
|
- if (r == reg)
|
|
|
|
|
|
|
+ for (GPRegister r : entry->getImpliedWriteGPRegs())
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
|
|
+ if (r == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- int index = 0;
|
|
|
|
|
- for (const OperationArgument* arg : args)
|
|
|
|
|
- {
|
|
|
|
|
- OperandRW rw = entry.getOperandRW(index);
|
|
|
|
|
- if (rw == WRITE || rw == READWRITE)
|
|
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for (const OperationArgument* arg : args)
|
|
|
{
|
|
{
|
|
|
- if (arg->asGPRegisterArgument()
|
|
|
|
|
- && arg->asGPRegisterArgument()->getRegister() == reg)
|
|
|
|
|
|
|
+ OperandRW rw = entry->getOperandRW(index);
|
|
|
|
|
+ if (rw == WRITE || rw == READWRITE)
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
|
|
+ if (arg->asGPRegisterArgument()
|
|
|
|
|
+ && arg->asGPRegisterArgument()->getRegister()
|
|
|
|
|
+ == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ index++;
|
|
|
}
|
|
}
|
|
|
- index++;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -6739,34 +6977,46 @@ bool Framework::Assembly::Instruction::writesToRegister(
|
|
|
bool Framework::Assembly::Instruction::writesToRegister(
|
|
bool Framework::Assembly::Instruction::writesToRegister(
|
|
|
FPRegister reg, const AssemblyBlock* block) const
|
|
FPRegister reg, const AssemblyBlock* block) const
|
|
|
{
|
|
{
|
|
|
|
|
+ for (FPRegister r : implicitWriteFPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
__intializeMachineCodeTranslationTable();
|
|
__intializeMachineCodeTranslationTable();
|
|
|
for (OperationCodeTable* tableEntry :
|
|
for (OperationCodeTable* tableEntry :
|
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
|
{
|
|
{
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
- MachineCodeTableEntry& entry
|
|
|
|
|
- = tableEntry->getEntry(args, block, this);
|
|
|
|
|
- for (FPRegister r : entry.getImpliedWriteFPRegs())
|
|
|
|
|
|
|
+ Framework::Text err;
|
|
|
|
|
+ MachineCodeTableEntry* entry
|
|
|
|
|
+ = tableEntry->getEntry(args, block, this, err);
|
|
|
|
|
+ if (entry)
|
|
|
{
|
|
{
|
|
|
- if (r == reg)
|
|
|
|
|
|
|
+ for (FPRegister r : entry->getImpliedWriteFPRegs())
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
|
|
+ if (r == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- int index = 0;
|
|
|
|
|
- for (const OperationArgument* arg : args)
|
|
|
|
|
- {
|
|
|
|
|
- OperandRW rw = entry.getOperandRW(index);
|
|
|
|
|
- if (rw == WRITE || rw == READWRITE)
|
|
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for (const OperationArgument* arg : args)
|
|
|
{
|
|
{
|
|
|
- if (arg->asFPRegisterArgument()
|
|
|
|
|
- && arg->asFPRegisterArgument()->getRegister() == reg)
|
|
|
|
|
|
|
+ OperandRW rw = entry->getOperandRW(index);
|
|
|
|
|
+ if (rw == WRITE || rw == READWRITE)
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
|
|
+ if (arg->asFPRegisterArgument()
|
|
|
|
|
+ && arg->asFPRegisterArgument()->getRegister()
|
|
|
|
|
+ == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ index++;
|
|
|
}
|
|
}
|
|
|
- index++;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -6776,39 +7026,51 @@ bool Framework::Assembly::Instruction::writesToRegister(
|
|
|
bool Framework::Assembly::Instruction::readsFromRegister(
|
|
bool Framework::Assembly::Instruction::readsFromRegister(
|
|
|
GPRegister reg, const AssemblyBlock* block) const
|
|
GPRegister reg, const AssemblyBlock* block) const
|
|
|
{
|
|
{
|
|
|
- __intializeMachineCodeTranslationTable();
|
|
|
|
|
|
|
+ for (GPRegister r : implicitReadGPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ __intializeMachineCodeTranslationTable();
|
|
|
for (OperationCodeTable* tableEntry :
|
|
for (OperationCodeTable* tableEntry :
|
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
|
{
|
|
{
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
- const MachineCodeTableEntry& entry
|
|
|
|
|
- = tableEntry->getEntry(args, block, this);
|
|
|
|
|
- for (GPRegister r : entry.getImpliedReadGPRegs())
|
|
|
|
|
|
|
+ Framework::Text err;
|
|
|
|
|
+ MachineCodeTableEntry* entry
|
|
|
|
|
+ = tableEntry->getEntry(args, block, this, err);
|
|
|
|
|
+ if (entry)
|
|
|
{
|
|
{
|
|
|
- if (r == reg)
|
|
|
|
|
|
|
+ for (GPRegister r : entry->getImpliedReadGPRegs())
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- int index = 0;
|
|
|
|
|
- for (const OperationArgument* arg : args)
|
|
|
|
|
- {
|
|
|
|
|
- OperandRW rw = entry.getOperandRW(index);
|
|
|
|
|
- if (rw == READ || rw == READWRITE)
|
|
|
|
|
- {
|
|
|
|
|
- if (arg->asGPRegisterArgument()
|
|
|
|
|
- && arg->asGPRegisterArgument()->getRegister() == reg)
|
|
|
|
|
|
|
+ if (r == reg)
|
|
|
{
|
|
{
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- if (arg->asMemoryAccessArgument()
|
|
|
|
|
- && arg->asMemoryAccessArgument()->usesRegister(reg))
|
|
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for (const OperationArgument* arg : args)
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
|
|
+ OperandRW rw = entry->getOperandRW(index);
|
|
|
|
|
+ if (rw == READ || rw == READWRITE)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (arg->asGPRegisterArgument()
|
|
|
|
|
+ && arg->asGPRegisterArgument()->getRegister()
|
|
|
|
|
+ == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ if (arg->asMemoryAccessArgument()
|
|
|
|
|
+ && arg->asMemoryAccessArgument()->usesRegister(reg))
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
|
|
+ index++;
|
|
|
}
|
|
}
|
|
|
- index++;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -6818,34 +7080,46 @@ bool Framework::Assembly::Instruction::readsFromRegister(
|
|
|
bool Framework::Assembly::Instruction::readsFromRegister(
|
|
bool Framework::Assembly::Instruction::readsFromRegister(
|
|
|
FPRegister reg, const AssemblyBlock* block) const
|
|
FPRegister reg, const AssemblyBlock* block) const
|
|
|
{
|
|
{
|
|
|
|
|
+ for (FPRegister r : implicitReadFPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
__intializeMachineCodeTranslationTable();
|
|
__intializeMachineCodeTranslationTable();
|
|
|
for (OperationCodeTable* tableEntry :
|
|
for (OperationCodeTable* tableEntry :
|
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
|
{
|
|
{
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
- MachineCodeTableEntry& entry
|
|
|
|
|
- = tableEntry->getEntry(args, block, this);
|
|
|
|
|
- for (FPRegister r : entry.getImpliedReadFPRegs())
|
|
|
|
|
|
|
+ Framework::Text err;
|
|
|
|
|
+ MachineCodeTableEntry* entry
|
|
|
|
|
+ = tableEntry->getEntry(args, block, this, err);
|
|
|
|
|
+ if (entry)
|
|
|
{
|
|
{
|
|
|
- if (r == reg)
|
|
|
|
|
|
|
+ for (FPRegister r : entry->getImpliedReadFPRegs())
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
|
|
+ if (r == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- int index = 0;
|
|
|
|
|
- for (const OperationArgument* arg : args)
|
|
|
|
|
- {
|
|
|
|
|
- OperandRW rw = entry.getOperandRW(index);
|
|
|
|
|
- if (rw == READ || rw == READWRITE)
|
|
|
|
|
|
|
+ int index = 0;
|
|
|
|
|
+ for (const OperationArgument* arg : args)
|
|
|
{
|
|
{
|
|
|
- if (arg->asFPRegisterArgument()
|
|
|
|
|
- && arg->asFPRegisterArgument()->getRegister() == reg)
|
|
|
|
|
|
|
+ OperandRW rw = entry->getOperandRW(index);
|
|
|
|
|
+ if (rw == READ || rw == READWRITE)
|
|
|
{
|
|
{
|
|
|
- return 1;
|
|
|
|
|
|
|
+ if (arg->asFPRegisterArgument()
|
|
|
|
|
+ && arg->asFPRegisterArgument()->getRegister()
|
|
|
|
|
+ == reg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 1;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+ index++;
|
|
|
}
|
|
}
|
|
|
- index++;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -6855,30 +7129,53 @@ bool Framework::Assembly::Instruction::readsFromRegister(
|
|
|
bool Framework::Assembly::Instruction::isReplacementPossible(
|
|
bool Framework::Assembly::Instruction::isReplacementPossible(
|
|
|
GPRegister oldReg, GPRegister newReg, const AssemblyBlock* block) const
|
|
GPRegister oldReg, GPRegister newReg, const AssemblyBlock* block) const
|
|
|
{
|
|
{
|
|
|
|
|
+ for (GPRegister r : implicitReadGPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ for (GPRegister r : implicitWriteGPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
__intializeMachineCodeTranslationTable();
|
|
__intializeMachineCodeTranslationTable();
|
|
|
for (OperationCodeTable* tableEntry :
|
|
for (OperationCodeTable* tableEntry :
|
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
|
{
|
|
{
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
- MachineCodeTableEntry& entry
|
|
|
|
|
- = tableEntry->getEntry(args, block, this);
|
|
|
|
|
- for (GPRegister r : entry.getImpliedReadGPRegs())
|
|
|
|
|
|
|
+ Framework::Text err;
|
|
|
|
|
+ MachineCodeTableEntry* entry
|
|
|
|
|
+ = tableEntry->getEntry(args, block, this, err);
|
|
|
|
|
+ if (entry)
|
|
|
{
|
|
{
|
|
|
- if (r == oldReg)
|
|
|
|
|
|
|
+ for (GPRegister r : entry->getImpliedReadGPRegs())
|
|
|
{
|
|
{
|
|
|
- return 0;
|
|
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- for (GPRegister r : entry.getImpliedWriteGPRegs())
|
|
|
|
|
- {
|
|
|
|
|
- if (r == oldReg)
|
|
|
|
|
|
|
+ for (GPRegister r : entry->getImpliedWriteGPRegs())
|
|
|
{
|
|
{
|
|
|
- return 0;
|
|
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this->readsFromRegister(newReg, block)
|
|
|
|
|
+ || this->writesToRegister(newReg, block))
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
if (newReg == RBP || newReg == RSI || newReg == RDI)
|
|
if (newReg == RBP || newReg == RSI || newReg == RDI)
|
|
|
{
|
|
{
|
|
|
if (oldReg == RBP || oldReg == RSI || oldReg == RDI)
|
|
if (oldReg == RBP || oldReg == RSI || oldReg == RDI)
|
|
@@ -6900,30 +7197,53 @@ bool Framework::Assembly::Instruction::isReplacementPossible(
|
|
|
bool Framework::Assembly::Instruction::isReplacementPossible(
|
|
bool Framework::Assembly::Instruction::isReplacementPossible(
|
|
|
FPRegister oldReg, FPRegister newReg, const AssemblyBlock* block) const
|
|
FPRegister oldReg, FPRegister newReg, const AssemblyBlock* block) const
|
|
|
{
|
|
{
|
|
|
|
|
+ for (FPRegister r : implicitReadFPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ for (FPRegister r : implicitWriteFPs)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
__intializeMachineCodeTranslationTable();
|
|
__intializeMachineCodeTranslationTable();
|
|
|
for (OperationCodeTable* tableEntry :
|
|
for (OperationCodeTable* tableEntry :
|
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
|
{
|
|
{
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
- MachineCodeTableEntry& entry
|
|
|
|
|
- = tableEntry->getEntry(args, block, this);
|
|
|
|
|
- for (FPRegister r : entry.getImpliedReadFPRegs())
|
|
|
|
|
|
|
+ Framework::Text err;
|
|
|
|
|
+ MachineCodeTableEntry* entry
|
|
|
|
|
+ = tableEntry->getEntry(args, block, this, err);
|
|
|
|
|
+ if (entry)
|
|
|
{
|
|
{
|
|
|
- if (r == oldReg)
|
|
|
|
|
|
|
+ for (FPRegister r : entry->getImpliedReadFPRegs())
|
|
|
{
|
|
{
|
|
|
- return 0;
|
|
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- for (FPRegister r : entry.getImpliedWriteFPRegs())
|
|
|
|
|
- {
|
|
|
|
|
- if (r == oldReg)
|
|
|
|
|
|
|
+ for (FPRegister r : entry->getImpliedWriteFPRegs())
|
|
|
{
|
|
{
|
|
|
- return 0;
|
|
|
|
|
|
|
+ if (r == oldReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ if (this->readsFromRegister(newReg, block)
|
|
|
|
|
+ || this->writesToRegister(newReg, block))
|
|
|
|
|
+ {
|
|
|
|
|
+ return 0;
|
|
|
|
|
+ }
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -6956,6 +7276,11 @@ void Framework::Assembly::Instruction::addJumpLabelPrefix(Text labelPrefix)
|
|
|
void Framework::Assembly::Instruction::compile(
|
|
void Framework::Assembly::Instruction::compile(
|
|
|
StreamWriter* byteCodeWriter, const AssemblyBlock* block) const
|
|
StreamWriter* byteCodeWriter, const AssemblyBlock* block) const
|
|
|
{
|
|
{
|
|
|
|
|
+ if (op == NOP)
|
|
|
|
|
+ {
|
|
|
|
|
+ return;
|
|
|
|
|
+ }
|
|
|
|
|
+ Framework::Text err;
|
|
|
__intializeMachineCodeTranslationTable();
|
|
__intializeMachineCodeTranslationTable();
|
|
|
for (OperationCodeTable* tableEntry :
|
|
for (OperationCodeTable* tableEntry :
|
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
OperationCodeTable::machineCodeTranslationTable)
|
|
@@ -6963,19 +7288,38 @@ void Framework::Assembly::Instruction::compile(
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
MachineCodeInstruction instr
|
|
MachineCodeInstruction instr
|
|
|
- = tableEntry->getInstruction(args, block, this);
|
|
|
|
|
|
|
+ = tableEntry->getInstruction(args, block, this, err);
|
|
|
|
|
+ if (err.getLength())
|
|
|
|
|
+ {
|
|
|
|
|
+ throw err;
|
|
|
|
|
+ }
|
|
|
instr.write(*byteCodeWriter);
|
|
instr.write(*byteCodeWriter);
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- Text err;
|
|
|
|
|
err.append() << "Failed to compile instruction: operation code " << (int)op
|
|
err.append() << "Failed to compile instruction: operation code " << (int)op
|
|
|
<< " not found in translation table. args: \n";
|
|
<< " not found in translation table. args: \n";
|
|
|
for (auto arg : args)
|
|
for (auto arg : args)
|
|
|
{
|
|
{
|
|
|
err.append() << " " << typeid(*arg).name() << "\n";
|
|
err.append() << " " << typeid(*arg).name() << "\n";
|
|
|
}
|
|
}
|
|
|
- throw err.getText();
|
|
|
|
|
|
|
+ throw err;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+bool Framework::Assembly::Instruction::isValid(const AssemblyBlock* block) const
|
|
|
|
|
+{
|
|
|
|
|
+ __intializeMachineCodeTranslationTable();
|
|
|
|
|
+ for (OperationCodeTable* tableEntry :
|
|
|
|
|
+ OperationCodeTable::machineCodeTranslationTable)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (tableEntry->getOperation() == op)
|
|
|
|
|
+ {
|
|
|
|
|
+ Framework::Text err;
|
|
|
|
|
+ tableEntry->getInstruction(args, block, this, err);
|
|
|
|
|
+ return err.getLength() == 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
int Framework::Assembly::Instruction::compiledSize(
|
|
int Framework::Assembly::Instruction::compiledSize(
|
|
@@ -6987,8 +7331,13 @@ int Framework::Assembly::Instruction::compiledSize(
|
|
|
{
|
|
{
|
|
|
if (tableEntry->getOperation() == op)
|
|
if (tableEntry->getOperation() == op)
|
|
|
{
|
|
{
|
|
|
|
|
+ Framework::Text err;
|
|
|
MachineCodeInstruction instr
|
|
MachineCodeInstruction instr
|
|
|
- = tableEntry->getInstruction(args, block, this);
|
|
|
|
|
|
|
+ = tableEntry->getInstruction(args, block, this, err);
|
|
|
|
|
+ if (err.getLength())
|
|
|
|
|
+ {
|
|
|
|
|
+ throw err;
|
|
|
|
|
+ }
|
|
|
return instr.calculateSize();
|
|
return instr.calculateSize();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -7007,6 +7356,12 @@ bool Framework::Assembly::Instruction::definesLabel(Text label) const
|
|
|
&& args.at(0)->asJumpTargetArgument()->getLabel().istGleich(label);
|
|
&& args.at(0)->asJumpTargetArgument()->getLabel().istGleich(label);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+const std::vector<Framework::Assembly::OperationArgument*>&
|
|
|
|
|
+Framework::Assembly::Instruction::getArguments() const
|
|
|
|
|
+{
|
|
|
|
|
+ return args;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
Framework::Assembly::AssemblyBlock::AssemblyBlock()
|
|
Framework::Assembly::AssemblyBlock::AssemblyBlock()
|
|
|
: inlineIndex(0),
|
|
: inlineIndex(0),
|
|
|
compiledCode(0)
|
|
compiledCode(0)
|
|
@@ -7038,6 +7393,203 @@ void Framework::Assembly::AssemblyBlock::addJump(
|
|
|
new Instruction(jumpOp, {new JumpTargetArgument(targetName)}));
|
|
new Instruction(jumpOp, {new JumpTargetArgument(targetName)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addAddition(
|
|
|
|
|
+ GPRegister target, GPRegister source, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(ADD,
|
|
|
|
|
+ {new GPRegisterArgument(target, part),
|
|
|
|
|
+ new GPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addAddition(
|
|
|
|
|
+ FPRegister target, FPRegister source, FPDataType type, FPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ Operation op = NOP;
|
|
|
|
|
+ switch (type)
|
|
|
|
|
+ {
|
|
|
|
|
+ case SINGLE_FLOAT:
|
|
|
|
|
+ op = ADDSS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case SINGLE_DOUBLE:
|
|
|
|
|
+ op = ADDSD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_FLOAT:
|
|
|
|
|
+ op = ADDPS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_DOUBLE:
|
|
|
|
|
+ op = ADDPD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(new Instruction(op,
|
|
|
|
|
+ {new FPRegisterArgument(target, part),
|
|
|
|
|
+ new FPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addSubtraction(
|
|
|
|
|
+ GPRegister target, GPRegister source, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(SUB,
|
|
|
|
|
+ {new GPRegisterArgument(target, part),
|
|
|
|
|
+ new GPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addSubtraction(
|
|
|
|
|
+ FPRegister target, FPRegister source, FPDataType type, FPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ Operation op = NOP;
|
|
|
|
|
+ switch (type)
|
|
|
|
|
+ {
|
|
|
|
|
+ case SINGLE_FLOAT:
|
|
|
|
|
+ op = SUBSS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case SINGLE_DOUBLE:
|
|
|
|
|
+ op = SUBSD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_FLOAT:
|
|
|
|
|
+ op = SUBPS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_DOUBLE:
|
|
|
|
|
+ op = SUBPD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(new Instruction(op,
|
|
|
|
|
+ {new FPRegisterArgument(target, part),
|
|
|
|
|
+ new FPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addMultiplication(
|
|
|
|
|
+ GPRegister target, GPRegister source, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(IMUL,
|
|
|
|
|
+ {new GPRegisterArgument(target, part),
|
|
|
|
|
+ new GPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addMultiplication(
|
|
|
|
|
+ FPRegister target, FPRegister source, FPDataType type, FPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ Operation op = NOP;
|
|
|
|
|
+ switch (type)
|
|
|
|
|
+ {
|
|
|
|
|
+ case SINGLE_FLOAT:
|
|
|
|
|
+ op = MULSS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case SINGLE_DOUBLE:
|
|
|
|
|
+ op = MULSD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_FLOAT:
|
|
|
|
|
+ op = MULPS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_DOUBLE:
|
|
|
|
|
+ op = MULPD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(new Instruction(op,
|
|
|
|
|
+ {new FPRegisterArgument(target, part),
|
|
|
|
|
+ new FPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addDivision(
|
|
|
|
|
+ GPRegister target, GPRegister source, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(DIV,
|
|
|
|
|
+ {new GPRegisterArgument(target, part),
|
|
|
|
|
+ new GPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addDivision(
|
|
|
|
|
+ FPRegister target, FPRegister source, FPDataType type, FPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ Operation op = NOP;
|
|
|
|
|
+ switch (type)
|
|
|
|
|
+ {
|
|
|
|
|
+ case SINGLE_FLOAT:
|
|
|
|
|
+ op = DIVSS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case SINGLE_DOUBLE:
|
|
|
|
|
+ op = DIVSD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_FLOAT:
|
|
|
|
|
+ op = DIVPS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_DOUBLE:
|
|
|
|
|
+ op = DIVPD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(new Instruction(op,
|
|
|
|
|
+ {new FPRegisterArgument(target, part),
|
|
|
|
|
+ new FPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addTest(
|
|
|
|
|
+ GPRegister r1, GPRegister r2, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(TEST,
|
|
|
|
|
+ {new GPRegisterArgument(r1, part), new GPRegisterArgument(r2, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addCompare(
|
|
|
|
|
+ GPRegister r1, GPRegister r2, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(CMP,
|
|
|
|
|
+ {new GPRegisterArgument(r1, part), new GPRegisterArgument(r2, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addCompare(GPRegister r1, char value)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(CMP,
|
|
|
|
|
+ {new GPRegisterArgument(r1, LOWER8), new ConstantArgument(value)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addCompare(GPRegister r1, short value)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(CMP,
|
|
|
|
|
+ {new GPRegisterArgument(r1, LOWER16), new ConstantArgument(value)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addCompare(GPRegister r1, int value)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(CMP,
|
|
|
|
|
+ {new GPRegisterArgument(r1, LOWER32), new ConstantArgument(value)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addCompare(
|
|
|
|
|
+ FPRegister r1, FPRegister r2, FPDataType type)
|
|
|
|
|
+{
|
|
|
|
|
+ Operation op = NOP;
|
|
|
|
|
+ switch (type)
|
|
|
|
|
+ {
|
|
|
|
|
+ case SINGLE_FLOAT:
|
|
|
|
|
+ op = COMISS;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case SINGLE_DOUBLE:
|
|
|
|
|
+ op = COMISD;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (op != NOP)
|
|
|
|
|
+ {
|
|
|
|
|
+ instructions.add(new Instruction(op,
|
|
|
|
|
+ {new FPRegisterArgument(r1, FPRegisterPart::X),
|
|
|
|
|
+ new FPRegisterArgument(r2, FPRegisterPart::X)}));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addAnd(
|
|
|
|
|
+ GPRegister target, GPRegister source, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(AND,
|
|
|
|
|
+ {new GPRegisterArgument(target, part),
|
|
|
|
|
+ new GPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addOr(
|
|
|
|
|
+ GPRegister target, GPRegister source, GPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(OR,
|
|
|
|
|
+ {new GPRegisterArgument(target, part),
|
|
|
|
|
+ new GPRegisterArgument(source, part)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void Framework::Assembly::AssemblyBlock::addLoadValue(
|
|
void Framework::Assembly::AssemblyBlock::addLoadValue(
|
|
|
char* valueAddress, GPRegister target)
|
|
char* valueAddress, GPRegister target)
|
|
|
{
|
|
{
|
|
@@ -7082,6 +7634,27 @@ void Framework::Assembly::AssemblyBlock::addLoadValue(
|
|
|
new MemoryAccessArgument(MemoryBlockSize::QWORD, target)}));
|
|
new MemoryAccessArgument(MemoryBlockSize::QWORD, target)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addLoadValue(
|
|
|
|
|
+ GPRegister addressRegister,
|
|
|
|
|
+ GPRegister target,
|
|
|
|
|
+ GPRegisterPart targetPart,
|
|
|
|
|
+ int offset)
|
|
|
|
|
+{
|
|
|
|
|
+ instructions.add(new Instruction(MOV,
|
|
|
|
|
+ {new GPRegisterArgument(target, targetPart),
|
|
|
|
|
+ new MemoryAccessArgument(
|
|
|
|
|
+ (targetPart == LOWER8 || targetPart == HIGHER8)
|
|
|
|
|
+ ? MemoryBlockSize::BYTE
|
|
|
|
|
+ : (targetPart == LOWER16
|
|
|
|
|
+ ? MemoryBlockSize::WORD
|
|
|
|
|
+ : (targetPart == LOWER32
|
|
|
|
|
+ ? MemoryBlockSize::DWORD
|
|
|
|
|
+ : MemoryBlockSize::QWORD)),
|
|
|
|
|
+ addressRegister,
|
|
|
|
|
+ true,
|
|
|
|
|
+ offset)}));
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void Framework::Assembly::AssemblyBlock::addLoadValue(
|
|
void Framework::Assembly::AssemblyBlock::addLoadValue(
|
|
|
float* valueAddress, FPRegister target, GPRegister temp)
|
|
float* valueAddress, FPRegister target, GPRegister temp)
|
|
|
{
|
|
{
|
|
@@ -7139,12 +7712,11 @@ void Framework::Assembly::AssemblyBlock::addMoveValue(
|
|
|
{
|
|
{
|
|
|
int data = *reinterpret_cast<int*>(&value);
|
|
int data = *reinterpret_cast<int*>(&value);
|
|
|
addMoveValue(temp, data);
|
|
addMoveValue(temp, data);
|
|
|
- addPush(temp, LOWER32);
|
|
|
|
|
|
|
+ addPush(temp);
|
|
|
instructions.add(new Instruction(MOVSS,
|
|
instructions.add(new Instruction(MOVSS,
|
|
|
{new FPRegisterArgument(target, X),
|
|
{new FPRegisterArgument(target, X),
|
|
|
- new MemoryAccessArgument(
|
|
|
|
|
- MemoryBlockSize::DWORD, RSP, true, -4, true)}));
|
|
|
|
|
- addPop(temp, LOWER32);
|
|
|
|
|
|
|
+ new MemoryAccessArgument(MemoryBlockSize::DWORD, RSP)}));
|
|
|
|
|
+ addPop(temp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::Assembly::AssemblyBlock::addMoveValue(
|
|
void Framework::Assembly::AssemblyBlock::addMoveValue(
|
|
@@ -7155,8 +7727,7 @@ void Framework::Assembly::AssemblyBlock::addMoveValue(
|
|
|
addPush(temp);
|
|
addPush(temp);
|
|
|
instructions.add(new Instruction(MOVSD,
|
|
instructions.add(new Instruction(MOVSD,
|
|
|
{new FPRegisterArgument(target, X),
|
|
{new FPRegisterArgument(target, X),
|
|
|
- new MemoryAccessArgument(
|
|
|
|
|
- MemoryBlockSize::QWORD, RSP, true, -8, true)}));
|
|
|
|
|
|
|
+ new MemoryAccessArgument(MemoryBlockSize::QWORD, RSP)}));
|
|
|
addPop(temp);
|
|
addPop(temp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -7181,10 +7752,10 @@ void Framework::Assembly::AssemblyBlock::addMoveValue(
|
|
|
op = MOVSD;
|
|
op = MOVSD;
|
|
|
break;
|
|
break;
|
|
|
case PACKED_FLOAT:
|
|
case PACKED_FLOAT:
|
|
|
- op = MOVAPS;
|
|
|
|
|
|
|
+ op = MOVUPS;
|
|
|
break;
|
|
break;
|
|
|
case PACKED_DOUBLE:
|
|
case PACKED_DOUBLE:
|
|
|
- op = MOVAPD;
|
|
|
|
|
|
|
+ op = MOVUPD;
|
|
|
break;
|
|
break;
|
|
|
}
|
|
}
|
|
|
instructions.add(new Instruction(op,
|
|
instructions.add(new Instruction(op,
|
|
@@ -7192,27 +7763,97 @@ void Framework::Assembly::AssemblyBlock::addMoveValue(
|
|
|
new FPRegisterArgument(source, part)}));
|
|
new FPRegisterArgument(source, part)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Framework::Assembly::AssemblyBlock::addCall(
|
|
|
|
|
- void* functionAddress, GPRegister temp)
|
|
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addConversion(GPRegister target,
|
|
|
|
|
+ FPRegister source,
|
|
|
|
|
+ FPDataType type,
|
|
|
|
|
+ GPRegisterPart targetPart,
|
|
|
|
|
+ bool round)
|
|
|
{
|
|
{
|
|
|
- instructions.add(new Instruction(MOV,
|
|
|
|
|
- {new GPRegisterArgument(temp),
|
|
|
|
|
- new ConstantArgument(reinterpret_cast<__int64>(functionAddress))}));
|
|
|
|
|
- instructions.add(new Instruction(CALL, {new GPRegisterArgument(temp)}));
|
|
|
|
|
|
|
+ Operation op = NOP;
|
|
|
|
|
+ if (type == SINGLE_DOUBLE)
|
|
|
|
|
+ {
|
|
|
|
|
+ op = round ? CVTSD2SI : CVTTSD2SI;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (type == SINGLE_FLOAT)
|
|
|
|
|
+ {
|
|
|
|
|
+ op = round ? CVTSS2SI : CVTTSS2SI;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(new Instruction(op,
|
|
|
|
|
+ {new GPRegisterArgument(target, targetPart),
|
|
|
|
|
+ new FPRegisterArgument(source, X)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Framework::Assembly::AssemblyBlock::addEnter(
|
|
|
|
|
- short stackSize, char nestingLevel)
|
|
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addConversion(FPRegister target,
|
|
|
|
|
+ GPRegister source,
|
|
|
|
|
+ FPDataType targetType,
|
|
|
|
|
+ GPRegisterPart sourcePart)
|
|
|
{
|
|
{
|
|
|
- instructions.add(
|
|
|
|
|
- new Framework::Assembly::Instruction(Framework::Assembly::ENTER,
|
|
|
|
|
- {new Framework::Assembly::ConstantArgument(stackSize),
|
|
|
|
|
- new Framework::Assembly::ConstantArgument(nestingLevel)}));
|
|
|
|
|
|
|
+ Operation op = NOP;
|
|
|
|
|
+ if (targetType == SINGLE_DOUBLE)
|
|
|
|
|
+ {
|
|
|
|
|
+ op = CVTSI2SD;
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (targetType == SINGLE_FLOAT)
|
|
|
|
|
+ {
|
|
|
|
|
+ op = CVTSI2SS;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(new Instruction(op,
|
|
|
|
|
+ {new FPRegisterArgument(target, X),
|
|
|
|
|
+ new GPRegisterArgument(source, sourcePart)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Framework::Assembly::AssemblyBlock::addLeave()
|
|
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addCall(void* functionAddress,
|
|
|
|
|
+ FuncReturnType returnType,
|
|
|
|
|
+ std::initializer_list<GPRegister> gpParams,
|
|
|
|
|
+ std::initializer_list<FPRegister> fpParams,
|
|
|
|
|
+ GPRegister temp,
|
|
|
|
|
+ GPRegister bpTemp)
|
|
|
{
|
|
{
|
|
|
- instructions.add(new Instruction(LEAVE, {}));
|
|
|
|
|
|
|
+ if (isVolatile(bpTemp) || bpTemp == RSP)
|
|
|
|
|
+ {
|
|
|
|
|
+ throw "Temporary register for base pointer must be a non-volatile "
|
|
|
|
|
+ "register (not RAX, RCX, RDX, R8, R9, R10, R11) and not RSP";
|
|
|
|
|
+ }
|
|
|
|
|
+ // enshure calling conventions
|
|
|
|
|
+ // save stack pointer value to bpTemp
|
|
|
|
|
+ addMoveValue(bpTemp, RSP);
|
|
|
|
|
+ // align stack pointer to 16 bytes
|
|
|
|
|
+ instructions.add(new Instruction(
|
|
|
|
|
+ AND, {new GPRegisterArgument(RSP), new ConstantArgument(-16)}));
|
|
|
|
|
+ // allocate shadow space
|
|
|
|
|
+ instructions.add(new Instruction(
|
|
|
|
|
+ SUB, {new GPRegisterArgument(RSP), new ConstantArgument(32)}));
|
|
|
|
|
+
|
|
|
|
|
+ // load function address into temp register
|
|
|
|
|
+ instructions.add(new Instruction(MOV,
|
|
|
|
|
+ {new GPRegisterArgument(temp),
|
|
|
|
|
+ new ConstantArgument(reinterpret_cast<__int64>(functionAddress))}));
|
|
|
|
|
+ // call the function
|
|
|
|
|
+ if (returnType == INT_VALUE)
|
|
|
|
|
+ {
|
|
|
|
|
+ instructions.add(new Instruction(CALL,
|
|
|
|
|
+ {new GPRegisterArgument(temp)},
|
|
|
|
|
+ gpParams,
|
|
|
|
|
+ fpParams,
|
|
|
|
|
+ {RAX},
|
|
|
|
|
+ {}));
|
|
|
|
|
+ }
|
|
|
|
|
+ else if (returnType == FLOAT_VALUE)
|
|
|
|
|
+ {
|
|
|
|
|
+ instructions.add(new Instruction(CALL,
|
|
|
|
|
+ {new GPRegisterArgument(temp)},
|
|
|
|
|
+ gpParams,
|
|
|
|
|
+ fpParams,
|
|
|
|
|
+ {},
|
|
|
|
|
+ {MM0}));
|
|
|
|
|
+ }
|
|
|
|
|
+ else
|
|
|
|
|
+ {
|
|
|
|
|
+ instructions.add(new Instruction(
|
|
|
|
|
+ CALL, {new GPRegisterArgument(temp)}, gpParams, fpParams, {}, {}));
|
|
|
|
|
+ }
|
|
|
|
|
+ // restore stack pointer
|
|
|
|
|
+ addMoveValue(RSP, bpTemp);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::Assembly::AssemblyBlock::addReturn()
|
|
void Framework::Assembly::AssemblyBlock::addReturn()
|
|
@@ -7223,47 +7864,134 @@ void Framework::Assembly::AssemblyBlock::addReturn()
|
|
|
void Framework::Assembly::AssemblyBlock::addPush(
|
|
void Framework::Assembly::AssemblyBlock::addPush(
|
|
|
GPRegister reg, GPRegisterPart part)
|
|
GPRegister reg, GPRegisterPart part)
|
|
|
{
|
|
{
|
|
|
|
|
+ GPRegisterPart pushPart = part;
|
|
|
|
|
+ if (part == LOWER8 || part == HIGHER8)
|
|
|
|
|
+ {
|
|
|
|
|
+ pushPart = LOWER16;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (part == LOWER32)
|
|
|
|
|
+ {
|
|
|
|
|
+ pushPart = FULL64;
|
|
|
|
|
+ }
|
|
|
instructions.add(
|
|
instructions.add(
|
|
|
- new Instruction(PUSH, {new GPRegisterArgument(reg, part)}));
|
|
|
|
|
|
|
+ new Instruction(PUSH, {new GPRegisterArgument(reg, pushPart)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::Assembly::AssemblyBlock::addPop(
|
|
void Framework::Assembly::AssemblyBlock::addPop(
|
|
|
GPRegister reg, GPRegisterPart part)
|
|
GPRegister reg, GPRegisterPart part)
|
|
|
{
|
|
{
|
|
|
- instructions.add(new Instruction(POP, {new GPRegisterArgument(reg, part)}));
|
|
|
|
|
|
|
+ GPRegisterPart popPart = part;
|
|
|
|
|
+ if (part == LOWER8 || part == HIGHER8)
|
|
|
|
|
+ {
|
|
|
|
|
+ popPart = LOWER16;
|
|
|
|
|
+ }
|
|
|
|
|
+ if (part == LOWER32)
|
|
|
|
|
+ {
|
|
|
|
|
+ popPart = FULL64;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(
|
|
|
|
|
+ new Instruction(POP, {new GPRegisterArgument(reg, popPart)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::Assembly::AssemblyBlock::addPush(
|
|
void Framework::Assembly::AssemblyBlock::addPush(
|
|
|
- FPRegister reg, FPRegisterPart part)
|
|
|
|
|
|
|
+ FPRegister reg, FPDataType type, FPRegisterPart part)
|
|
|
{
|
|
{
|
|
|
- instructions.add(new Instruction(SUB,
|
|
|
|
|
- {new GPRegisterArgument(RSP),
|
|
|
|
|
- new ConstantArgument(part == X ? 16 : 32)}));
|
|
|
|
|
- instructions.add(new Instruction(MOVAPD,
|
|
|
|
|
- {new MemoryAccessArgument(
|
|
|
|
|
- part == X ? MemoryBlockSize::M128 : MemoryBlockSize::M256, RSP),
|
|
|
|
|
|
|
+ MemoryBlockSize size;
|
|
|
|
|
+ int bytes;
|
|
|
|
|
+ Operation moveOp;
|
|
|
|
|
+ switch (type)
|
|
|
|
|
+ {
|
|
|
|
|
+ case SINGLE_DOUBLE:
|
|
|
|
|
+ moveOp = MOVSD;
|
|
|
|
|
+ bytes = 8;
|
|
|
|
|
+ size = MemoryBlockSize::QWORD;
|
|
|
|
|
+ part = X;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case SINGLE_FLOAT:
|
|
|
|
|
+ moveOp = MOVSS;
|
|
|
|
|
+ bytes = 4;
|
|
|
|
|
+ size = MemoryBlockSize::DWORD;
|
|
|
|
|
+ part = X;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_DOUBLE:
|
|
|
|
|
+ moveOp = MOVUPD;
|
|
|
|
|
+ bytes = part == X ? 16 : 32;
|
|
|
|
|
+ size = part == X ? MemoryBlockSize::M128 : MemoryBlockSize::M256;
|
|
|
|
|
+ case PACKED_FLOAT:
|
|
|
|
|
+ moveOp = MOVUPS;
|
|
|
|
|
+ bytes = part == X ? 16 : 32;
|
|
|
|
|
+ size = part == X ? MemoryBlockSize::M128 : MemoryBlockSize::M256;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.add(new Instruction(
|
|
|
|
|
+ SUB, {new GPRegisterArgument(RSP), new ConstantArgument(bytes)}));
|
|
|
|
|
+ instructions.add(new Instruction(moveOp,
|
|
|
|
|
+ {new MemoryAccessArgument(size, RSP),
|
|
|
new FPRegisterArgument(reg, part)}));
|
|
new FPRegisterArgument(reg, part)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::Assembly::AssemblyBlock::addPop(
|
|
void Framework::Assembly::AssemblyBlock::addPop(
|
|
|
- FPRegister reg, FPRegisterPart part)
|
|
|
|
|
|
|
+ FPRegister reg, FPDataType type, FPRegisterPart part)
|
|
|
{
|
|
{
|
|
|
- instructions.add(new Instruction(MOVAPD,
|
|
|
|
|
|
|
+ addPop(instructions, reg, type, part);
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::addPop(
|
|
|
|
|
+ RCArray<Instruction>& instructionList,
|
|
|
|
|
+ FPRegister reg,
|
|
|
|
|
+ FPDataType type,
|
|
|
|
|
+ FPRegisterPart part)
|
|
|
|
|
+{
|
|
|
|
|
+ MemoryBlockSize size;
|
|
|
|
|
+ int bytes;
|
|
|
|
|
+ Operation moveOp;
|
|
|
|
|
+ switch (type)
|
|
|
|
|
+ {
|
|
|
|
|
+ case SINGLE_DOUBLE:
|
|
|
|
|
+ moveOp = MOVSD;
|
|
|
|
|
+ bytes = 8;
|
|
|
|
|
+ size = MemoryBlockSize::QWORD;
|
|
|
|
|
+ part = X;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case SINGLE_FLOAT:
|
|
|
|
|
+ moveOp = MOVSS;
|
|
|
|
|
+ bytes = 4;
|
|
|
|
|
+ size = MemoryBlockSize::DWORD;
|
|
|
|
|
+ part = X;
|
|
|
|
|
+ break;
|
|
|
|
|
+ case PACKED_DOUBLE:
|
|
|
|
|
+ moveOp = MOVUPD;
|
|
|
|
|
+ bytes = part == X ? 16 : 32;
|
|
|
|
|
+ size = part == X ? MemoryBlockSize::M128 : MemoryBlockSize::M256;
|
|
|
|
|
+ case PACKED_FLOAT:
|
|
|
|
|
+ moveOp = MOVUPS;
|
|
|
|
|
+ bytes = part == X ? 16 : 32;
|
|
|
|
|
+ size = part == X ? MemoryBlockSize::M128 : MemoryBlockSize::M256;
|
|
|
|
|
+ }
|
|
|
|
|
+ instructionList.add(new Instruction(moveOp,
|
|
|
{new FPRegisterArgument(reg, part),
|
|
{new FPRegisterArgument(reg, part),
|
|
|
- new MemoryAccessArgument(
|
|
|
|
|
- part == X ? MemoryBlockSize::M128 : MemoryBlockSize::M256,
|
|
|
|
|
- RSP)}));
|
|
|
|
|
- instructions.add(new Instruction(ADD,
|
|
|
|
|
- {new GPRegisterArgument(RSP),
|
|
|
|
|
- new ConstantArgument(part == X ? 16 : 32)}));
|
|
|
|
|
|
|
+ new MemoryAccessArgument(size, RSP)}));
|
|
|
|
|
+ instructionList.add(new Instruction(
|
|
|
|
|
+ ADD, {new GPRegisterArgument(RSP), new ConstantArgument(bytes)}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Framework::Assembly::AssemblyBlock::addBlock(AssemblyBlock* block,
|
|
void Framework::Assembly::AssemblyBlock::addBlock(AssemblyBlock* block,
|
|
|
std::initializer_list<GPRegister> preservedGPRegisters,
|
|
std::initializer_list<GPRegister> preservedGPRegisters,
|
|
|
std::initializer_list<FPRegister> preservedFPRegisters,
|
|
std::initializer_list<FPRegister> preservedFPRegisters,
|
|
|
|
|
+ std::initializer_list<FPDataType> preservedFPDataTypes,
|
|
|
GPRegister* blockResultGpReg,
|
|
GPRegister* blockResultGpReg,
|
|
|
FPRegister* blockResultFpReg)
|
|
FPRegister* blockResultFpReg)
|
|
|
{
|
|
{
|
|
|
|
|
+ std::vector<FPDataType> fpTypes(preservedFPDataTypes);
|
|
|
|
|
+ bool containsCall = false;
|
|
|
|
|
+ for (const auto& instr : block->instructions)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (instr->getOperation() == CALL)
|
|
|
|
|
+ {
|
|
|
|
|
+ containsCall = true; // volatile registers that should be preserved
|
|
|
|
|
+ // needs to be pushed to the stack
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
RCArray<Instruction> tempInstructions;
|
|
RCArray<Instruction> tempInstructions;
|
|
|
for (GPRegister preservedReg : preservedGPRegisters)
|
|
for (GPRegister preservedReg : preservedGPRegisters)
|
|
|
{
|
|
{
|
|
@@ -7272,35 +8000,43 @@ void Framework::Assembly::AssemblyBlock::addBlock(AssemblyBlock* block,
|
|
|
bool replaced = false;
|
|
bool replaced = false;
|
|
|
for (int i = 0; i < 16; i++)
|
|
for (int i = 0; i < 16; i++)
|
|
|
{
|
|
{
|
|
|
- if (i == 4)
|
|
|
|
|
|
|
+ if (i == 4 || i == 5 || preservedReg == RSP
|
|
|
|
|
+ || preservedReg == RBP)
|
|
|
{
|
|
{
|
|
|
- continue; // Skip RSP (stack counter register)
|
|
|
|
|
|
|
+ continue; // Skip RSP and RBP (stack counter register)
|
|
|
}
|
|
}
|
|
|
- bool found = false;
|
|
|
|
|
- for (GPRegister r : preservedGPRegisters)
|
|
|
|
|
- {
|
|
|
|
|
- if (r == (GPRegister)i)
|
|
|
|
|
|
|
+ if (!containsCall
|
|
|
|
|
+ || (isVolatile(preservedReg)
|
|
|
|
|
+ == isVolatile((Framework::Assembly::GPRegister)i)))
|
|
|
|
|
+ { // call inside the block -> only replace volatile with
|
|
|
|
|
+ // volatile and non volatile with non volatile registers
|
|
|
|
|
+ bool found = false;
|
|
|
|
|
+ for (GPRegister r : preservedGPRegisters)
|
|
|
{
|
|
{
|
|
|
- found = true;
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ if (r == (GPRegister)i)
|
|
|
|
|
+ {
|
|
|
|
|
+ found = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if (found)
|
|
|
|
|
- {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- GPRegister newReg = (GPRegister)i;
|
|
|
|
|
- if (!block->writesToRegister(newReg)
|
|
|
|
|
- && !block->readsFromRegister(newReg)
|
|
|
|
|
- && block->isReplacementPossible(preservedReg, newReg))
|
|
|
|
|
- {
|
|
|
|
|
- if (preservedReg == RAX)
|
|
|
|
|
|
|
+ if (found)
|
|
|
|
|
+ {
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ GPRegister newReg = (GPRegister)i;
|
|
|
|
|
+ if (block->isReplacementPossible(preservedReg, newReg))
|
|
|
{
|
|
{
|
|
|
- *blockResultGpReg = newReg;
|
|
|
|
|
|
|
+ if (blockResultGpReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (preservedReg == *blockResultGpReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ *blockResultGpReg = newReg;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ replaced = true;
|
|
|
|
|
+ block->replaceRegister(preservedReg, newReg);
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
- replaced = true;
|
|
|
|
|
- block->replaceRegister(preservedReg, newReg);
|
|
|
|
|
- break;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (!replaced)
|
|
if (!replaced)
|
|
@@ -7313,6 +8049,7 @@ void Framework::Assembly::AssemblyBlock::addBlock(AssemblyBlock* block,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ int index = 0;
|
|
|
for (FPRegister preservedReg : preservedFPRegisters)
|
|
for (FPRegister preservedReg : preservedFPRegisters)
|
|
|
{
|
|
{
|
|
|
if (block->writesToRegister(preservedReg))
|
|
if (block->writesToRegister(preservedReg))
|
|
@@ -7320,47 +8057,52 @@ void Framework::Assembly::AssemblyBlock::addBlock(AssemblyBlock* block,
|
|
|
bool replaced = false;
|
|
bool replaced = false;
|
|
|
for (int i = 0; i < __FP_REGISTER_COUNT; i++)
|
|
for (int i = 0; i < __FP_REGISTER_COUNT; i++)
|
|
|
{
|
|
{
|
|
|
- bool found = false;
|
|
|
|
|
- for (FPRegister r : preservedFPRegisters)
|
|
|
|
|
- {
|
|
|
|
|
- if (r == (FPRegister)i)
|
|
|
|
|
|
|
+ if (!containsCall
|
|
|
|
|
+ || (isVolatile(preservedReg) == isVolatile((FPRegister)i)))
|
|
|
|
|
+ { // call inside the block -> only replace volatile with
|
|
|
|
|
+ // volatile and non volatile with non volatile registers
|
|
|
|
|
+ bool found = false;
|
|
|
|
|
+ for (FPRegister r : preservedFPRegisters)
|
|
|
{
|
|
{
|
|
|
- found = true;
|
|
|
|
|
- break;
|
|
|
|
|
|
|
+ if (r == (FPRegister)i)
|
|
|
|
|
+ {
|
|
|
|
|
+ found = true;
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- if (found)
|
|
|
|
|
- {
|
|
|
|
|
- continue;
|
|
|
|
|
- }
|
|
|
|
|
- FPRegister newReg = (FPRegister)i;
|
|
|
|
|
- if (!block->writesToRegister(newReg)
|
|
|
|
|
- && !block->readsFromRegister(newReg)
|
|
|
|
|
- && block->isReplacementPossible(preservedReg, newReg))
|
|
|
|
|
- {
|
|
|
|
|
- if (preservedReg == MM0)
|
|
|
|
|
|
|
+ if (found)
|
|
|
{
|
|
{
|
|
|
- *blockResultFpReg = newReg;
|
|
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ FPRegister newReg = (FPRegister)i;
|
|
|
|
|
+ if (block->isReplacementPossible(preservedReg, newReg))
|
|
|
|
|
+ {
|
|
|
|
|
+ if (blockResultFpReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ if (preservedReg == *blockResultFpReg)
|
|
|
|
|
+ {
|
|
|
|
|
+ *blockResultFpReg = newReg;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ replaced = true;
|
|
|
|
|
+ block->replaceRegister(preservedReg, newReg);
|
|
|
|
|
+ break;
|
|
|
}
|
|
}
|
|
|
- replaced = true;
|
|
|
|
|
- block->replaceRegister(preservedReg, newReg);
|
|
|
|
|
- break;
|
|
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
if (!replaced)
|
|
if (!replaced)
|
|
|
{
|
|
{
|
|
|
- addPush(preservedReg);
|
|
|
|
|
- tempInstructions.add(new Instruction(MOVAPD,
|
|
|
|
|
- {new FPRegisterArgument(preservedReg, Y),
|
|
|
|
|
- new MemoryAccessArgument(MemoryBlockSize::M256, RSP)}));
|
|
|
|
|
- tempInstructions.add(new Instruction(ADD,
|
|
|
|
|
- {new GPRegisterArgument(RSP), new ConstantArgument(32)}));
|
|
|
|
|
|
|
+ // TODO: search for last instruction that wrote to preservedReg
|
|
|
|
|
+ // to find its data type
|
|
|
|
|
+ addPush(preservedReg, fpTypes[index], Y);
|
|
|
|
|
+ addPop(tempInstructions, preservedReg, fpTypes[index], Y);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ index++;
|
|
|
}
|
|
}
|
|
|
- int index = 0;
|
|
|
|
|
|
|
+ index = 0;
|
|
|
Text prefix = "inlined_";
|
|
Text prefix = "inlined_";
|
|
|
- prefix.append() << inlineIndex << "_";
|
|
|
|
|
|
|
+ prefix.append() << inlineIndex++ << "_";
|
|
|
block->addJumpLabelPrefix(prefix);
|
|
block->addJumpLabelPrefix(prefix);
|
|
|
bool returnFound = false;
|
|
bool returnFound = false;
|
|
|
for (const auto& instr : block->instructions)
|
|
for (const auto& instr : block->instructions)
|
|
@@ -7496,6 +8238,55 @@ Framework::Assembly::AssemblyBlock::getInstructions() const
|
|
|
return instructions;
|
|
return instructions;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void Framework::Assembly::AssemblyBlock::optimize()
|
|
|
|
|
+{
|
|
|
|
|
+ RCArray<Instruction> optimizedInstructions;
|
|
|
|
|
+ for (int index = 0; index < instructions.getEintragAnzahl(); index++)
|
|
|
|
|
+ {
|
|
|
|
|
+ Instruction* curr = instructions.z(index);
|
|
|
|
|
+ if (index < instructions.getEintragAnzahl() - 1
|
|
|
|
|
+ && curr->getOperation() == MOV && curr->getArguments().size() == 2
|
|
|
|
|
+ && curr->getArguments().at(0)->asGPRegisterArgument()
|
|
|
|
|
+ && curr->getArguments().at(1)->asMemoryAccessArgument())
|
|
|
|
|
+ {
|
|
|
|
|
+ GPRegister target = curr->getArguments()
|
|
|
|
|
+ .at(0)
|
|
|
|
|
+ ->asGPRegisterArgument()
|
|
|
|
|
+ ->getRegister();
|
|
|
|
|
+ GPRegisterPart part
|
|
|
|
|
+ = curr->getArguments().at(0)->asGPRegisterArgument()->getPart();
|
|
|
|
|
+ Instruction* next = instructions.z(index + 1);
|
|
|
|
|
+ if (!next->writesToRegister(target, this)
|
|
|
|
|
+ && next->getArguments().size() == 2
|
|
|
|
|
+ && next->getArguments().at(1)->asGPRegisterArgument()
|
|
|
|
|
+ && next->getArguments()
|
|
|
|
|
+ .at(1)
|
|
|
|
|
+ ->asGPRegisterArgument()
|
|
|
|
|
+ ->getRegister()
|
|
|
|
|
+ == target
|
|
|
|
|
+ && next->getArguments().at(1)->asGPRegisterArgument()->getPart()
|
|
|
|
|
+ == part)
|
|
|
|
|
+ {
|
|
|
|
|
+ Instruction* replacement = new Instruction(next->getOperation(),
|
|
|
|
|
+ {next->getArguments().at(0), curr->getArguments().at(1)});
|
|
|
|
|
+ if (replacement->isValid(this))
|
|
|
|
|
+ {
|
|
|
|
|
+ optimizedInstructions.add(replacement);
|
|
|
|
|
+ index++;
|
|
|
|
|
+ continue;
|
|
|
|
|
+ }
|
|
|
|
|
+ replacement->release();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ optimizedInstructions.add(dynamic_cast<Instruction*>(curr->getThis()));
|
|
|
|
|
+ }
|
|
|
|
|
+ instructions.leeren();
|
|
|
|
|
+ for (Instruction* instr : optimizedInstructions)
|
|
|
|
|
+ {
|
|
|
|
|
+ instructions.add(dynamic_cast<Instruction*>(instr->getThis()));
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
void* Framework::Assembly::AssemblyBlock::compile()
|
|
void* Framework::Assembly::AssemblyBlock::compile()
|
|
|
{
|
|
{
|
|
|
if (compiledCode != 0)
|
|
if (compiledCode != 0)
|
|
@@ -7526,11 +8317,11 @@ void* Framework::Assembly::AssemblyBlock::compile()
|
|
|
Instruction subInst(
|
|
Instruction subInst(
|
|
|
SUB, {new GPRegisterArgument(RSP), new ConstantArgument(32)});
|
|
SUB, {new GPRegisterArgument(RSP), new ConstantArgument(32)});
|
|
|
subInst.compile(&buffer, this);
|
|
subInst.compile(&buffer, this);
|
|
|
- Instruction pushInstr(MOVAPD,
|
|
|
|
|
|
|
+ Instruction pushInstr(MOVUPD,
|
|
|
{new MemoryAccessArgument(MemoryBlockSize::M256, RSP),
|
|
{new MemoryAccessArgument(MemoryBlockSize::M256, RSP),
|
|
|
new FPRegisterArgument(nvReg, Y)});
|
|
new FPRegisterArgument(nvReg, Y)});
|
|
|
pushInstr.compile(&buffer, this);
|
|
pushInstr.compile(&buffer, this);
|
|
|
- restoreInstructions.add(new Instruction(MOVAPD,
|
|
|
|
|
|
|
+ restoreInstructions.add(new Instruction(MOVUPD,
|
|
|
{new FPRegisterArgument(nvReg, Y),
|
|
{new FPRegisterArgument(nvReg, Y),
|
|
|
new MemoryAccessArgument(MemoryBlockSize::M256, RSP)}));
|
|
new MemoryAccessArgument(MemoryBlockSize::M256, RSP)}));
|
|
|
restoreInstructions.add(new Instruction(
|
|
restoreInstructions.add(new Instruction(
|
|
@@ -7578,11 +8369,8 @@ void* Framework::Assembly::AssemblyBlock::compile()
|
|
|
instr->compile(&buffer, this);
|
|
instr->compile(&buffer, this);
|
|
|
}
|
|
}
|
|
|
// add final RET instruction
|
|
// add final RET instruction
|
|
|
- if (instructions.z(instructions.getLastIndex())->getOperation() != RET)
|
|
|
|
|
- {
|
|
|
|
|
- Instruction retInstr(RET, {});
|
|
|
|
|
- retInstr.compile(&buffer, this);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ Instruction retInstr(RET, {});
|
|
|
|
|
+ retInstr.compile(&buffer, this);
|
|
|
int totalSize = (int)buffer.getSize();
|
|
int totalSize = (int)buffer.getSize();
|
|
|
// Allocate executable memory
|
|
// Allocate executable memory
|
|
|
compiledCode = VirtualAlloc(nullptr, totalSize, MEM_COMMIT, PAGE_READWRITE);
|
|
compiledCode = VirtualAlloc(nullptr, totalSize, MEM_COMMIT, PAGE_READWRITE);
|