Add support for floating point immediates to MC instruction printing. ARM
[oota-llvm.git] / lib / Target / ARM / ARMMCInstLower.cpp
index 41af0889d78fe4d0198b7d96d9d0cccc08f0785d..b26d327e363d1c9c07a1a884058953480459e88b 100644 (file)
@@ -16,6 +16,7 @@
 #include "ARMMCInstLower.h"
 //#include "llvm/CodeGen/MachineModuleInfoImpls.h"
 #include "llvm/CodeGen/AsmPrinter.h"
+#include "llvm/Constants.h"
 #include "llvm/CodeGen/MachineBasicBlock.h"
 #include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCContext.h"
@@ -155,6 +156,9 @@ void ARMMCInstLower::Lower(const MachineInstr *MI, MCInst &OutMI) const {
       MCOp = LowerSymbolOperand(MO, Printer.GetBlockAddressSymbol(
                                               MO.getBlockAddress()));
       break;
+    case MachineOperand::MO_FPImmediate:
+      MCOp = MCOperand::CreateFPImm(MO.getFPImm()->getValueAPF());
+      break;
     }
 
     OutMI.addOperand(MCOp);