mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-16 12:24:03 +00:00
Assert when TLS is not implemented.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@39737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -122,6 +122,7 @@ AlphaTargetLowering::AlphaTargetLowering(TargetMachine &TM) : TargetLowering(TM)
|
|||||||
setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
|
setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
|
||||||
setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
|
setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
|
||||||
setOperationAction(ISD::ExternalSymbol, MVT::i64, Custom);
|
setOperationAction(ISD::ExternalSymbol, MVT::i64, Custom);
|
||||||
|
setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom);
|
||||||
|
|
||||||
setOperationAction(ISD::VASTART, MVT::Other, Custom);
|
setOperationAction(ISD::VASTART, MVT::Other, Custom);
|
||||||
setOperationAction(ISD::VAEND, MVT::Other, Expand);
|
setOperationAction(ISD::VAEND, MVT::Other, Expand);
|
||||||
@ -424,6 +425,8 @@ SDOperand AlphaTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
|||||||
SDOperand Lo = DAG.getNode(AlphaISD::GPRelLo, MVT::i64, CPI, Hi);
|
SDOperand Lo = DAG.getNode(AlphaISD::GPRelLo, MVT::i64, CPI, Hi);
|
||||||
return Lo;
|
return Lo;
|
||||||
}
|
}
|
||||||
|
case ISD::GlobalTLSAddress:
|
||||||
|
assert(0 && "TLS not implemented for Alpha.");
|
||||||
case ISD::GlobalAddress: {
|
case ISD::GlobalAddress: {
|
||||||
GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
|
GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
|
||||||
GlobalValue *GV = GSDN->getGlobal();
|
GlobalValue *GV = GSDN->getGlobal();
|
||||||
|
@ -108,6 +108,9 @@ IA64TargetLowering::IA64TargetLowering(TargetMachine &TM)
|
|||||||
setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
|
setOperationAction(ISD::STACKRESTORE, MVT::Other, Expand);
|
||||||
setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64, Expand);
|
setOperationAction(ISD::DYNAMIC_STACKALLOC, MVT::i64, Expand);
|
||||||
|
|
||||||
|
// Thread Local Storage
|
||||||
|
setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom);
|
||||||
|
|
||||||
setStackPointerRegisterToSaveRestore(IA64::r12);
|
setStackPointerRegisterToSaveRestore(IA64::r12);
|
||||||
|
|
||||||
setJumpBufSize(704); // on ia64-linux, jmp_bufs are 704 bytes..
|
setJumpBufSize(704); // on ia64-linux, jmp_bufs are 704 bytes..
|
||||||
@ -538,6 +541,8 @@ SDOperand IA64TargetLowering::
|
|||||||
LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||||
switch (Op.getOpcode()) {
|
switch (Op.getOpcode()) {
|
||||||
default: assert(0 && "Should not custom lower this!");
|
default: assert(0 && "Should not custom lower this!");
|
||||||
|
case ISD::GlobalTLSAddress:
|
||||||
|
assert(0 && "TLS not implemented for IA64.");
|
||||||
case ISD::RET: {
|
case ISD::RET: {
|
||||||
SDOperand AR_PFSVal, Copy;
|
SDOperand AR_PFSVal, Copy;
|
||||||
|
|
||||||
|
@ -59,6 +59,7 @@ MipsTargetLowering(MipsTargetMachine &TM): TargetLowering(TM)
|
|||||||
|
|
||||||
// Custom
|
// Custom
|
||||||
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
|
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
|
||||||
|
setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom);
|
||||||
setOperationAction(ISD::RET, MVT::Other, Custom);
|
setOperationAction(ISD::RET, MVT::Other, Custom);
|
||||||
|
|
||||||
// Load extented operations for i1 types must be promoted
|
// Load extented operations for i1 types must be promoted
|
||||||
@ -115,6 +116,7 @@ LowerOperation(SDOperand Op, SelectionDAG &DAG)
|
|||||||
case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG);
|
case ISD::FORMAL_ARGUMENTS: return LowerFORMAL_ARGUMENTS(Op, DAG);
|
||||||
case ISD::RET: return LowerRET(Op, DAG);
|
case ISD::RET: return LowerRET(Op, DAG);
|
||||||
case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG);
|
case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG);
|
||||||
|
case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG);
|
||||||
case ISD::RETURNADDR: return LowerRETURNADDR(Op, DAG);
|
case ISD::RETURNADDR: return LowerRETURNADDR(Op, DAG);
|
||||||
}
|
}
|
||||||
return SDOperand();
|
return SDOperand();
|
||||||
@ -162,6 +164,12 @@ LowerGlobalAddress(SDOperand Op, SelectionDAG &DAG)
|
|||||||
return DAG.getNode(ISD::ADD, MVT::i32, Lo, Hi);
|
return DAG.getNode(ISD::ADD, MVT::i32, Lo, Hi);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SDOperand MipsTargetLowering::
|
||||||
|
LowerGlobalTLSAddress(SDOperand Op, SelectionDAG &DAG)
|
||||||
|
{
|
||||||
|
assert(0 && "TLS not implemented for MIPS.");
|
||||||
|
}
|
||||||
|
|
||||||
SDOperand MipsTargetLowering::
|
SDOperand MipsTargetLowering::
|
||||||
LowerRETURNADDR(SDOperand Op, SelectionDAG &DAG) {
|
LowerRETURNADDR(SDOperand Op, SelectionDAG &DAG) {
|
||||||
// Depths > 0 not supported yet!
|
// Depths > 0 not supported yet!
|
||||||
|
@ -75,6 +75,7 @@ namespace llvm {
|
|||||||
SDOperand LowerCALL(SDOperand Op, SelectionDAG &DAG);
|
SDOperand LowerCALL(SDOperand Op, SelectionDAG &DAG);
|
||||||
SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG);
|
SDOperand LowerFORMAL_ARGUMENTS(SDOperand Op, SelectionDAG &DAG);
|
||||||
SDOperand LowerGlobalAddress(SDOperand Op, SelectionDAG &DAG);
|
SDOperand LowerGlobalAddress(SDOperand Op, SelectionDAG &DAG);
|
||||||
|
SDOperand LowerGlobalTLSAddress(SDOperand Op, SelectionDAG &DAG);
|
||||||
SDOperand LowerRETURNADDR(SDOperand Op, SelectionDAG &DAG);
|
SDOperand LowerRETURNADDR(SDOperand Op, SelectionDAG &DAG);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -159,9 +159,11 @@ PPCTargetLowering::PPCTargetLowering(PPCTargetMachine &TM)
|
|||||||
// We want to legalize GlobalAddress and ConstantPool nodes into the
|
// We want to legalize GlobalAddress and ConstantPool nodes into the
|
||||||
// appropriate instructions to materialize the address.
|
// appropriate instructions to materialize the address.
|
||||||
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
|
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
|
||||||
|
setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom);
|
||||||
setOperationAction(ISD::ConstantPool, MVT::i32, Custom);
|
setOperationAction(ISD::ConstantPool, MVT::i32, Custom);
|
||||||
setOperationAction(ISD::JumpTable, MVT::i32, Custom);
|
setOperationAction(ISD::JumpTable, MVT::i32, Custom);
|
||||||
setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
|
setOperationAction(ISD::GlobalAddress, MVT::i64, Custom);
|
||||||
|
setOperationAction(ISD::GlobalTLSAddress, MVT::i64, Custom);
|
||||||
setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
|
setOperationAction(ISD::ConstantPool, MVT::i64, Custom);
|
||||||
setOperationAction(ISD::JumpTable, MVT::i64, Custom);
|
setOperationAction(ISD::JumpTable, MVT::i64, Custom);
|
||||||
|
|
||||||
@ -1014,6 +1016,10 @@ static SDOperand LowerJumpTable(SDOperand Op, SelectionDAG &DAG) {
|
|||||||
return Lo;
|
return Lo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static SDOperand LowerGlobalTLSAddress(SDOperand Op, SelectionDAG &DAG) {
|
||||||
|
assert(0 && "TLS not implemented for PPC.");
|
||||||
|
}
|
||||||
|
|
||||||
static SDOperand LowerGlobalAddress(SDOperand Op, SelectionDAG &DAG) {
|
static SDOperand LowerGlobalAddress(SDOperand Op, SelectionDAG &DAG) {
|
||||||
MVT::ValueType PtrVT = Op.getValueType();
|
MVT::ValueType PtrVT = Op.getValueType();
|
||||||
GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
|
GlobalAddressSDNode *GSDN = cast<GlobalAddressSDNode>(Op);
|
||||||
@ -2862,6 +2868,7 @@ SDOperand PPCTargetLowering::LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
|||||||
default: assert(0 && "Wasn't expecting to be able to lower this!");
|
default: assert(0 && "Wasn't expecting to be able to lower this!");
|
||||||
case ISD::ConstantPool: return LowerConstantPool(Op, DAG);
|
case ISD::ConstantPool: return LowerConstantPool(Op, DAG);
|
||||||
case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG);
|
case ISD::GlobalAddress: return LowerGlobalAddress(Op, DAG);
|
||||||
|
case ISD::GlobalTLSAddress: return LowerGlobalTLSAddress(Op, DAG);
|
||||||
case ISD::JumpTable: return LowerJumpTable(Op, DAG);
|
case ISD::JumpTable: return LowerJumpTable(Op, DAG);
|
||||||
case ISD::SETCC: return LowerSETCC(Op, DAG);
|
case ISD::SETCC: return LowerSETCC(Op, DAG);
|
||||||
case ISD::VASTART:
|
case ISD::VASTART:
|
||||||
|
@ -141,6 +141,7 @@ SparcTargetLowering::SparcTargetLowering(TargetMachine &TM)
|
|||||||
|
|
||||||
// Custom legalize GlobalAddress nodes into LO/HI parts.
|
// Custom legalize GlobalAddress nodes into LO/HI parts.
|
||||||
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
|
setOperationAction(ISD::GlobalAddress, MVT::i32, Custom);
|
||||||
|
setOperationAction(ISD::GlobalTLSAddress, MVT::i32, Custom);
|
||||||
setOperationAction(ISD::ConstantPool , MVT::i32, Custom);
|
setOperationAction(ISD::ConstantPool , MVT::i32, Custom);
|
||||||
|
|
||||||
// Sparc doesn't have sext_inreg, replace them with shl/sra
|
// Sparc doesn't have sext_inreg, replace them with shl/sra
|
||||||
@ -700,6 +701,8 @@ SDOperand SparcTargetLowering::
|
|||||||
LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
LowerOperation(SDOperand Op, SelectionDAG &DAG) {
|
||||||
switch (Op.getOpcode()) {
|
switch (Op.getOpcode()) {
|
||||||
default: assert(0 && "Should not custom lower this!");
|
default: assert(0 && "Should not custom lower this!");
|
||||||
|
case ISD::GlobalTLSAddress:
|
||||||
|
assert(0 && "TLS not implemented for Sparc.");
|
||||||
case ISD::GlobalAddress: {
|
case ISD::GlobalAddress: {
|
||||||
GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
|
GlobalValue *GV = cast<GlobalAddressSDNode>(Op)->getGlobal();
|
||||||
SDOperand GA = DAG.getTargetGlobalAddress(GV, MVT::i32);
|
SDOperand GA = DAG.getTargetGlobalAddress(GV, MVT::i32);
|
||||||
|
Reference in New Issue
Block a user