aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 1db2d48fc9..1e3300763d 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -139,7 +139,13 @@ operator<<(ostream &os, const MachineOperand &mop)
case MachineOperand::MO_UnextendedImmed:
return os << mop.immedVal;
case MachineOperand::MO_PCRelativeDisp:
- return os << "%disp(label " << mop.getVRegValue() << ")";
+ {
+ const Value* opVal = mop.getVRegValue();
+ bool isLabel = opVal->isMethod() || opVal->isBasicBlock();
+ return os << "%disp("
+ << (isLabel? "label " : "addr-of-val ")
+ << opVal << ")";
+ }
default:
assert(0 && "Unrecognized operand type");
break;