aboutsummaryrefslogtreecommitdiff
path: root/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2010-09-15 18:47:08 +0000
committerJim Grosbach <grosbach@apple.com>2010-09-15 18:47:08 +0000
commit26edbcb8d5da5fb65816a97f740c9868fa798df4 (patch)
tree7f20db4d589e18fa0bc2e062e75458d82ea173e3 /lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
parent27ede1ba6daa893557db477fe3252084fd9f6147 (diff)
Add support for floating point immediates to MC instruction printing. ARM
VFP instructions use it for loading some constants, so implement that handling. Not thrilled with adding a member to MCOperand, but not sure there's much of a better option that's not pretty fragile (like putting a double in the union instead and just assuming that's good enough). Suggestions welcome... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@113996 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp')
-rw-r--r--lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
index 000108a7cc..344273f72b 100644
--- a/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
+++ b/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp
@@ -729,12 +729,12 @@ void ARMInstPrinter::printT2AddrModeSoRegOperand(const MCInst *MI,
void ARMInstPrinter::printVFPf32ImmOperand(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
- O << '#' << MI->getOperand(OpNum).getImm();
+ O << '#' << MI->getOperand(OpNum).getFPImm().convertToFloat();
}
void ARMInstPrinter::printVFPf64ImmOperand(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
- O << '#' << MI->getOperand(OpNum).getImm();
+ O << '#' << MI->getOperand(OpNum).getFPImm().convertToDouble();
}
void ARMInstPrinter::printNEONModImmOperand(const MCInst *MI, unsigned OpNum,