std::stringstream response;
printMnemonic(response, instMnem, mnemonic);
- printReg(response, data, dataSize);
+ printDestReg(response, 0, dataSize);
response << ", ";
printSegment(response, segment);
ccprintf(response, ":[%d*", scale);
- printReg(response, index, addressSize);
+ printSrcReg(response, 0, addressSize);
response << " + ";
- printReg(response, base, addressSize);
+ printSrcReg(response, 1, addressSize);
ccprintf(response, " + %#x]", disp);
return response.str();
}
const RegIndex data;
const uint8_t dataSize;
const uint8_t addressSize;
+ RegIndex foldOBit, foldABit;
//Constructor
LdStOp(ExtMachInst _machInst,
disp(_disp), segment(_segment),
data(_data),
dataSize(_dataSize), addressSize(_addressSize)
- {}
+ {
+ foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
+ foldABit =
+ (addressSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
+ }
std::string generateDisassembly(Addr pc,
const SymbolTable *symtab) const;
std::stringstream response;
printMnemonic(response, instMnem, mnemonic);
- printReg(response, dest, dataSize);
+ printDestReg(response, 0, dataSize);
response << ", ";
- printReg(response, src1, dataSize);
+ printSrcReg(response, 0, dataSize);
response << ", ";
- printReg(response, src2, dataSize);
+ printSrcReg(response, 1, dataSize);
return response.str();
}
std::stringstream response;
printMnemonic(response, instMnem, mnemonic);
- printReg(response, dest, dataSize);
+ printDestReg(response, 0, dataSize);
response << ", ";
- printReg(response, src1, dataSize);
+ printSrcReg(response, 0, dataSize);
ccprintf(response, ", %#x", imm8);
return response.str();
}
const RegIndex dest;
const uint8_t dataSize;
const uint16_t ext;
+ RegIndex foldOBit;
// Constructor
RegOpBase(ExtMachInst _machInst,
src1(_src1), dest(_dest),
dataSize(_dataSize), ext(_ext)
{
+ foldOBit = (dataSize == 1 && !_machInst.rex.present) ? 1 << 6 : 0;
}
//Figure out what the condition code flags should be.
const RegIndex dest;
const uint64_t imm;
const uint8_t dataSize;
+ RegIndex foldOBit;
void buildMe();
std::string generateDisassembly(Addr pc,
std::stringstream response;
printMnemonic(response, instMnem, mnemonic);
- printReg(response, dest, dataSize);
+ printDestReg(response, 0, dataSize);
response << ", ";
ccprintf(response, "%#x", imm);
return response.str();
inline void %(class_name)s::buildMe()
{
+ foldOBit = (dataSize == 1 && !machInst.rex.present) ? 1 << 6 : 0;
%(constructor)s;
}