diff options
author | Bill Wendling <isanbard@gmail.com> | 2011-01-25 21:27:46 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2011-01-25 21:27:46 +0000 |
commit | 624cef696d4bceab37631f0d0d3f9626bc33449d (patch) | |
tree | e0699bfa02e1e2ddacb93bd0b9059dc1200e6db8 /llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | |
parent | cdbf17b1790913f366263e969a496ef3a75881c0 (diff) | |
download | bcm5719-llvm-624cef696d4bceab37631f0d0d3f9626bc33449d.tar.gz bcm5719-llvm-624cef696d4bceab37631f0d0d3f9626bc33449d.zip |
The floating point value is encoded in its binary form as an Imm. Convert it
appropriately so that it prints out the decimal representation.
llvm-svn: 124230
Diffstat (limited to 'llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp')
-rw-r--r-- | llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp b/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp index 820c2e6ca6f..46616f8ebc9 100644 --- a/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp +++ b/llvm/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, |