mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00: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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23042 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
4025a9c2cc
commit
34e17052a7
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user