aboutsummaryrefslogtreecommitdiff
path: root/llvm
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2013-05-04 16:54:11 +0000
committerTim Northover <Tim.Northover@arm.com>2013-05-04 16:54:11 +0000
commit85dcbde2392d85a859f26afacc0ccf463ce6acfe (patch)
tree1567651417d1d77d3aac4f7207399621df62dda0 /llvm
parent885698a25c19d51e088e9abad2ccb6614e3b5931 (diff)
downloadllvm-85dcbde2392d85a859f26afacc0ccf463ce6acfe.zip
llvm-85dcbde2392d85a859f26afacc0ccf463ce6acfe.tar.gz
llvm-85dcbde2392d85a859f26afacc0ccf463ce6acfe.tar.bz2
AArch64: assert code model is small for TLS accesses
Supporting TLS in the large memory model is rather difficult at the moment, so make sure no-one gets into difficulties by mistake. llvm-svn: 181121
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index dfc5ad0..56f6751 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -2025,6 +2025,8 @@ AArch64TargetLowering::LowerGlobalTLSAddress(SDValue Op,
SelectionDAG &DAG) const {
assert(Subtarget->isTargetELF() &&
"TLS not implemented for non-ELF targets");
+ assert(getTargetMachine().getCodeModel() == CodeModel::Small
+ && "TLS only supported in small memory model");
const GlobalAddressSDNode *GA = cast<GlobalAddressSDNode>(Op);
TLSModel::Model Model = getTargetMachine().getTLSModel(GA->getGlobal());