1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

implement support for floating point constants used as inline asm memory operands.

llvm-svn: 35033
This commit is contained in:
Chris Lattner 2007-03-08 22:29:47 +00:00
parent 4fbc327c54
commit dfe5b3bd1d

View File

@ -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);
}