aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorBill Wendling <isanbard@gmail.com>2011-01-25 21:27:46 +0000
committerBill Wendling <isanbard@gmail.com>2011-01-25 21:27:46 +0000
commit261b9c1a35e1c2ef7e4cc387443dd8544d8b48de (patch)
tree436ad1056fae648da99b226eee607846660a4813 /lib/Target/ARM
parent69c4ef321c9f6e12c66a3f2809e12faec21d4249 (diff)
downloadexternal_llvm-261b9c1a35e1c2ef7e4cc387443dd8544d8b48de.zip
external_llvm-261b9c1a35e1c2ef7e4cc387443dd8544d8b48de.tar.gz
external_llvm-261b9c1a35e1c2ef7e4cc387443dd8544d8b48de.tar.bz2
The floating point value is encoded in its binary form as an Imm. Convert it
appropriately so that it prints out the decimal representation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124230 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
index 820c2e6..46616f8 100644
--- a/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
+++ b/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
@@ -673,12 +673,14 @@ void ARMInstPrinter::printT2AddrModeSoRegOperand(const MCInst *MI,
void ARMInstPrinter::printVFPf32ImmOperand(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
- O << '#' << (float)MI->getOperand(OpNum).getFPImm();
+ const MCOperand &MO = MI->getOperand(OpNum);
+ O << '#' << APInt(64, MO.getImm(), true).bitsToDouble();
}
void ARMInstPrinter::printVFPf64ImmOperand(const MCInst *MI, unsigned OpNum,
raw_ostream &O) {
- O << '#' << MI->getOperand(OpNum).getFPImm();
+ const MCOperand &MO = MI->getOperand(OpNum);
+ O << '#' << APInt(64, MO.getImm(), true).bitsToDouble();
}
void ARMInstPrinter::printNEONModImmOperand(const MCInst *MI, unsigned OpNum,