1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-22 04:22:57 +02:00

Implement support for taking the address of constant pool indices, which

is used by the int -> FP code among other things.  This gets
2005-05-12-Int64ToFP past that failure, to dying on lack of support for add_parts

llvm-svn: 23042
This commit is contained in:
Chris Lattner 2005-08-25 05:04:11 +00:00
parent 0168c8df11
commit 77350a373e

View File

@ -557,6 +557,16 @@ SDOperand PPC32DAGToDAGISel::Select(SDOperand Op) {
getI32Imm(0));
break;
}
case ISD::ConstantPool: {
unsigned CPIIdx = cast<ConstantPoolSDNode>(N)->getIndex();
SDOperand Tmp, CPI = CurDAG->getTargetConstantPool(CPIIdx, MVT::i32);
if (PICEnabled)
Tmp = CurDAG->getTargetNode(PPC::ADDIS, MVT::i32, getGlobalBaseReg(),CPI);
else
Tmp = CurDAG->getTargetNode(PPC::LIS, MVT::i32, CPI);
CurDAG->SelectNodeTo(N, MVT::i32, PPC::LA, Tmp, CPI);
break;
}
case ISD::GlobalAddress: {
GlobalValue *GV = cast<GlobalAddressSDNode>(N)->getGlobal();
SDOperand Tmp;