mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Lower 64-bit constant pool node.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@144849 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9b944a8da2
commit
620db8947a
@ -131,6 +131,7 @@ MipsTargetLowering(MipsTargetMachine &TM)
|
||||
setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom);
|
||||
setOperationAction(ISD::JumpTable, MVT::i32, Custom);
|
||||
setOperationAction(ISD::ConstantPool, MVT::i32, Custom);
|
||||
setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
|
||||
setOperationAction(ISD::SELECT, MVT::f32, Custom);
|
||||
setOperationAction(ISD::SELECT, MVT::f64, Custom);
|
||||
setOperationAction(ISD::SELECT, MVT::i32, Custom);
|
||||
@ -1651,16 +1652,19 @@ LowerConstantPool(SDValue Op, SelectionDAG &DAG) const
|
||||
SDValue Lo = DAG.getNode(MipsISD::Lo, dl, MVT::i32, CPLo);
|
||||
ResNode = DAG.getNode(ISD::ADD, dl, MVT::i32, HiPart, Lo);
|
||||
} else {
|
||||
SDValue CP = DAG.getTargetConstantPool(C, MVT::i32, N->getAlignment(),
|
||||
N->getOffset(), MipsII::MO_GOT);
|
||||
CP = DAG.getNode(MipsISD::WrapperPIC, dl, MVT::i32, CP);
|
||||
SDValue Load = DAG.getLoad(MVT::i32, dl, DAG.getEntryNode(),
|
||||
EVT ValTy = Op.getValueType();
|
||||
unsigned GOTFlag = IsN64 ? MipsII::MO_GOT_PAGE : MipsII::MO_GOT;
|
||||
unsigned OFSTFlag = IsN64 ? MipsII::MO_GOT_OFST : MipsII::MO_ABS_LO;
|
||||
SDValue CP = DAG.getTargetConstantPool(C, ValTy, N->getAlignment(),
|
||||
N->getOffset(), GOTFlag);
|
||||
CP = DAG.getNode(MipsISD::WrapperPIC, dl, ValTy, CP);
|
||||
SDValue Load = DAG.getLoad(ValTy, dl, DAG.getEntryNode(),
|
||||
CP, MachinePointerInfo::getConstantPool(),
|
||||
false, false, false, 0);
|
||||
SDValue CPLo = DAG.getTargetConstantPool(C, MVT::i32, N->getAlignment(),
|
||||
N->getOffset(), MipsII::MO_ABS_LO);
|
||||
SDValue Lo = DAG.getNode(MipsISD::Lo, dl, MVT::i32, CPLo);
|
||||
ResNode = DAG.getNode(ISD::ADD, dl, MVT::i32, Load, Lo);
|
||||
SDValue CPLo = DAG.getTargetConstantPool(C, ValTy, N->getAlignment(),
|
||||
N->getOffset(), OFSTFlag);
|
||||
SDValue Lo = DAG.getNode(MipsISD::Lo, dl, ValTy, CPLo);
|
||||
ResNode = DAG.getNode(ISD::ADD, dl, ValTy, Load, Lo);
|
||||
}
|
||||
|
||||
return ResNode;
|
||||
|
Loading…
Reference in New Issue
Block a user