X86: Hide the irrelevant portions of the address components for load and store microops.
--HG-- extra : convert_revision : a5ac6fefa09882f0833537e23f1ac0477bc89bb9
This commit is contained in:
parent
239d124e83
commit
5b5e2fd6cd
|
@ -64,16 +64,40 @@ namespace X86ISA
|
||||||
const SymbolTable *symtab) const
|
const SymbolTable *symtab) const
|
||||||
{
|
{
|
||||||
std::stringstream response;
|
std::stringstream response;
|
||||||
|
bool someAddr = false;
|
||||||
|
|
||||||
printMnemonic(response, instMnem, mnemonic);
|
printMnemonic(response, instMnem, mnemonic);
|
||||||
printDestReg(response, 0, dataSize);
|
if(flags[IsLoad])
|
||||||
|
printDestReg(response, 0, dataSize);
|
||||||
|
else
|
||||||
|
printSrcReg(response, 2, dataSize);
|
||||||
response << ", ";
|
response << ", ";
|
||||||
printSegment(response, segment);
|
printSegment(response, segment);
|
||||||
ccprintf(response, ":[%d*", scale);
|
response << ":[";
|
||||||
printSrcReg(response, 0, addressSize);
|
if(scale != 0 && _srcRegIdx[0] != ZeroReg)
|
||||||
response << " + ";
|
{
|
||||||
printSrcReg(response, 1, addressSize);
|
if(scale != 1)
|
||||||
ccprintf(response, " + %#x]", disp);
|
ccprintf(response, "%d*", scale);
|
||||||
|
printSrcReg(response, 0, addressSize);
|
||||||
|
someAddr = true;
|
||||||
|
}
|
||||||
|
if(_srcRegIdx[1] != ZeroReg)
|
||||||
|
{
|
||||||
|
if(someAddr)
|
||||||
|
response << " + ";
|
||||||
|
printSrcReg(response, 1, addressSize);
|
||||||
|
someAddr = true;
|
||||||
|
}
|
||||||
|
if(disp != 0)
|
||||||
|
{
|
||||||
|
if(someAddr)
|
||||||
|
response << " + ";
|
||||||
|
ccprintf(response, "%#x", disp);
|
||||||
|
someAddr = true;
|
||||||
|
}
|
||||||
|
if(!someAddr)
|
||||||
|
response << "0";
|
||||||
|
response << "]";
|
||||||
return response.str();
|
return response.str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue