mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
MIPS TLS: use the model selected by TargetMachine::getTLSModel().
This was mostly done already in r156162, but I missed one place. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157929 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fcb2c3cf5e
commit
70a07c7fc4
@ -1648,9 +1648,10 @@ LowerGlobalTLSAddress(SDValue Op, SelectionDAG &DAG) const
|
||||
TLSModel::Model model = getTargetMachine().getTLSModel(GV);
|
||||
|
||||
if (model == TLSModel::GeneralDynamic || model == TLSModel::LocalDynamic) {
|
||||
// General Dynamic TLS Model
|
||||
bool LocalDynamic = GV->hasInternalLinkage();
|
||||
unsigned Flag = LocalDynamic ? MipsII::MO_TLSLDM :MipsII::MO_TLSGD;
|
||||
// General Dynamic and Local Dynamic TLS Model.
|
||||
unsigned Flag = (model == TLSModel::LocalDynamic) ? MipsII::MO_TLSLDM
|
||||
: MipsII::MO_TLSGD;
|
||||
|
||||
SDValue TGA = DAG.getTargetGlobalAddress(GV, dl, PtrVT, 0, Flag);
|
||||
SDValue Argument = DAG.getNode(MipsISD::Wrapper, dl, PtrVT,
|
||||
GetGlobalReg(DAG, PtrVT), TGA);
|
||||
|
Loading…
Reference in New Issue
Block a user