summaryrefslogtreecommitdiff
path: root/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp
diff options
context:
space:
mode:
authorAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-15 21:43:59 +0200
committerAbdoulaye Walsimou Gaye <awg@embtoolkit.org>2013-05-15 21:43:59 +0200
commitb2e3c7da703d4c3dda41d4f1e18cd976e6c4381a (patch)
tree7462cd2988228ae24c40b37a9382d35874bbf099 /lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp
parent23d8d191eff180ba312a4d1b4fec8597e5a988d5 (diff)
parent4ef61f2ad4ff509ee05c7051d359009511f81226 (diff)
downloadllvm-b2e3c7da703d4c3dda41d4f1e18cd976e6c4381a.tar.gz
llvm-b2e3c7da703d4c3dda41d4f1e18cd976e6c4381a.tar.bz2
llvm-b2e3c7da703d4c3dda41d4f1e18cd976e6c4381a.tar.xz
Merge branch 'master' into embtk-support-masterembtk-support-master
Diffstat (limited to 'lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp')
-rw-r--r--lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp20
1 files changed, 18 insertions, 2 deletions
diff --git a/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp b/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp
index d73cf49808..369802b2b8 100644
--- a/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp
+++ b/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.cpp
@@ -114,10 +114,26 @@ void SystemZInstPrinter::printAccessRegOperand(const MCInst *MI, int OpNum,
O << "%a" << (unsigned int)Value;
}
+void SystemZInstPrinter::printPCRelOperand(const MCInst *MI, int OpNum,
+ raw_ostream &O) {
+ const MCOperand &MO = MI->getOperand(OpNum);
+ if (MO.isImm()) {
+ O << "0x";
+ O.write_hex(MO.getImm());
+ } else
+ O << *MO.getExpr();
+}
+
void SystemZInstPrinter::printCallOperand(const MCInst *MI, int OpNum,
raw_ostream &O) {
- printOperand(MI, OpNum, O);
- O << "@PLT";
+ const MCOperand &MO = MI->getOperand(OpNum);
+ if (MO.isImm()) {
+ O << "0x";
+ O.write_hex(MO.getImm());
+ } else {
+ O << *MO.getExpr();
+ O << "@PLT";
+ }
}
void SystemZInstPrinter::printOperand(const MCInst *MI, int OpNum,