mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-31 09:25:42 +00:00
Add in the first step of the multiple pointer support. This adds in support to the data layout for specifying a per address space pointer size.
The next step is to update the optimizers to allow them to optimize the different address spaces with this information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165505 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -584,7 +584,7 @@ TargetLowering::TargetLowering(const TargetMachine &tm,
|
||||
setOperationAction(ISD::TRAP, MVT::Other, Expand);
|
||||
|
||||
IsLittleEndian = TD->isLittleEndian();
|
||||
PointerTy = MVT::getIntegerVT(8*TD->getPointerSize());
|
||||
PointerTy = MVT::getIntegerVT(8*TD->getPointerSize(0));
|
||||
memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*));
|
||||
memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray));
|
||||
maxStoresPerMemset = maxStoresPerMemcpy = maxStoresPerMemmove = 8;
|
||||
@@ -625,7 +625,7 @@ TargetLowering::~TargetLowering() {
|
||||
}
|
||||
|
||||
MVT TargetLowering::getShiftAmountTy(EVT LHSTy) const {
|
||||
return MVT::getIntegerVT(8*TD->getPointerSize());
|
||||
return MVT::getIntegerVT(8*TD->getPointerSize(0));
|
||||
}
|
||||
|
||||
/// canOpTrap - Returns true if the operation can trap for the value type.
|
||||
@@ -901,7 +901,7 @@ const char *TargetLowering::getTargetNodeName(unsigned Opcode) const {
|
||||
|
||||
EVT TargetLowering::getSetCCResultType(EVT VT) const {
|
||||
assert(!VT.isVector() && "No default SetCC type for vectors!");
|
||||
return PointerTy.SimpleTy;
|
||||
return getPointerTy(0).SimpleTy;
|
||||
}
|
||||
|
||||
MVT::SimpleValueType TargetLowering::getCmpLibcallReturnType() const {
|
||||
@@ -1061,7 +1061,7 @@ SDValue TargetLowering::getPICJumpTableRelocBase(SDValue Table,
|
||||
|
||||
if ((JTEncoding == MachineJumpTableInfo::EK_GPRel64BlockAddress) ||
|
||||
(JTEncoding == MachineJumpTableInfo::EK_GPRel32BlockAddress))
|
||||
return DAG.getGLOBAL_OFFSET_TABLE(getPointerTy());
|
||||
return DAG.getGLOBAL_OFFSET_TABLE(getPointerTy(0));
|
||||
|
||||
return Table;
|
||||
}
|
||||
@@ -2953,8 +2953,9 @@ TargetLowering::AsmOperandInfoVector TargetLowering::ParseConstraints(
|
||||
EVT::getEVT(IntegerType::get(OpTy->getContext(), BitSize), true);
|
||||
break;
|
||||
}
|
||||
} else if (dyn_cast<PointerType>(OpTy)) {
|
||||
OpInfo.ConstraintVT = MVT::getIntegerVT(8*TD->getPointerSize());
|
||||
} else if (PointerType *PT = dyn_cast<PointerType>(OpTy)) {
|
||||
OpInfo.ConstraintVT = MVT::getIntegerVT(
|
||||
8*TD->getPointerSize(PT->getAddressSpace()));
|
||||
} else {
|
||||
OpInfo.ConstraintVT = EVT::getEVT(OpTy, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user