mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-23 14:03:14 +00:00
Add X86 instruction printer support for printing MCValue operands.
llvm-svn: 78984
This commit is contained in:
parent
259bc4b0e7
commit
b0adbe646d
@ -55,6 +55,8 @@ void X86ATTAsmPrinter::print_pcrel_imm(const MCInst *MI, unsigned OpNo) {
|
||||
|
||||
if (Op.isImm())
|
||||
O << Op.getImm();
|
||||
else if (Op.isMCValue())
|
||||
Op.getMCValue().print(O);
|
||||
else if (Op.isMBBLabel())
|
||||
// FIXME: Keep in sync with printBasicBlockLabel. printBasicBlockLabel
|
||||
// should eventually call into this code, not the other way around.
|
||||
@ -88,6 +90,10 @@ void X86ATTAsmPrinter::printOperand(const MCInst *MI, unsigned OpNo,
|
||||
O << '$';
|
||||
O << Op.getImm();
|
||||
return;
|
||||
} else if (Op.isMCValue()) {
|
||||
O << '$';
|
||||
Op.getMCValue().print(O);
|
||||
return;
|
||||
}
|
||||
|
||||
O << "<<UNKNOWN OPERAND KIND>>";
|
||||
@ -103,6 +109,8 @@ void X86ATTAsmPrinter::printLeaMemReference(const MCInst *MI, unsigned Op) {
|
||||
int64_t DispVal = DispSpec.getImm();
|
||||
if (DispVal || (!IndexReg.getReg() && !BaseReg.getReg()))
|
||||
O << DispVal;
|
||||
} else if (DispSpec.isMCValue()) {
|
||||
DispSpec.getMCValue().print(O);
|
||||
} else {
|
||||
llvm_unreachable("non-immediate displacement for LEA?");
|
||||
//assert(DispSpec.isGlobal() || DispSpec.isCPI() ||
|
||||
|
Loading…
x
Reference in New Issue
Block a user