[llvm-commits] [llvm] r124230 - /llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
Bill Wendling
isanbard at gmail.com
Tue Jan 25 13:27:46 PST 2011
Author: void
Date: Tue Jan 25 15:27:46 2011
New Revision: 124230
URL: http://llvm.org/viewvc/llvm-project?rev=124230&view=rev
Log:
The floating point value is encoded in its binary form as an Imm. Convert it
appropriately so that it prints out the decimal representation.
Modified:
llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
Modified: llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp?rev=124230&r1=124229&r2=124230&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp Tue Jan 25 15:27:46 2011
@@ -673,12 +673,14 @@
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,
More information about the llvm-commits
mailing list