diff options
author | Chris Lattner <sabre@nondot.org> | 2007-03-08 22:29:47 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-03-08 22:29:47 +0000 |
commit | 6dfc6806bf4091cc736312a3ceca6225f81ef63e (patch) | |
tree | d3b60f8919e9e7b082252167b2c218de62fba076 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 71b91ac76fad922ca0e78033cfeef64784dd1dda (diff) | |
download | external_llvm-6dfc6806bf4091cc736312a3ceca6225f81ef63e.zip external_llvm-6dfc6806bf4091cc736312a3ceca6225f81ef63e.tar.gz external_llvm-6dfc6806bf4091cc736312a3ceca6225f81ef63e.tar.bz2 |
implement support for floating point constants used as inline asm memory operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 581b402..62ee06e 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2882,9 +2882,14 @@ void SelectionDAGLowering::visitInlineAsm(CallInst &I) { } else if (CTy == TargetLowering::C_Memory) { // Memory input. - // Check that the operand isn't a float. + // If the operand is a float, spill to a constant pool entry to get its + // address. + if (ConstantFP *Val = dyn_cast<ConstantFP>(I.getOperand(OpNum-1))) + InOperandVal = DAG.getConstantPool(Val, TLI.getPointerTy()); + if (!MVT::isInteger(InOperandVal.getValueType())) { - cerr << "Match failed, can't handle floats yet!\n"; + cerr << "Match failed, cannot handle this yet!\n"; + InOperandVal.Val->dump(); exit(1); } |