summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSimon Atanasyan <simon@atanasyan.com>2016-03-17 10:43:36 +0000
committerSimon Atanasyan <simon@atanasyan.com>2016-03-17 10:43:36 +0000
commit58ee875296e1f32d561f5cde1a9bcc8383c032c9 (patch)
tree314a15cfe548de017d435915c4678db5ba052970 /llvm/lib
parentd65377da7808928963bc1685dd5eb510039fa068 (diff)
downloadbcm5719-llvm-58ee875296e1f32d561f5cde1a9bcc8383c032c9.tar.gz
bcm5719-llvm-58ee875296e1f32d561f5cde1a9bcc8383c032c9.zip
[mips] Use `formatImm` call to print immediate value in the `MipsInstPrinter`
That allows, for example, to print hex-formatted immediates using llvm-objdump --print-imm-hex command line option. Differential Revision: http://reviews.llvm.org/D18195 llvm-svn: 263704
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp b/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
index f2ef0b2ad77..768ed20f4db 100644
--- a/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
+++ b/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp
@@ -195,7 +195,7 @@ void MipsInstPrinter::printOperand(const MCInst *MI, unsigned OpNo,
}
if (Op.isImm()) {
- O << Op.getImm();
+ O << formatImm(Op.getImm());
return;
}
@@ -211,7 +211,7 @@ void MipsInstPrinter::printUImm(const MCInst *MI, int opNum, raw_ostream &O) {
Imm -= Offset;
Imm &= (1 << Bits) - 1;
Imm += Offset;
- O << Imm;
+ O << formatImm(Imm);
return;
}
OpenPOWER on IntegriCloud