summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64/AArch64ISelLowering.cpp
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
commiteffc16bb4946e6de988933e810026aed12560855 (patch)
treead6b9c7ca04f434fe080a5cd0abfc929f2d01cff /lib/Target/AArch64/AArch64ISelLowering.cpp
parent79c1c092dfd14703cdd47e96bc5a14d97322ee16 (diff)
downloadllvm-effc16bb4946e6de988933e810026aed12560855.tar.gz
llvm-effc16bb4946e6de988933e810026aed12560855.tar.bz2
llvm-effc16bb4946e6de988933e810026aed12560855.tar.xz
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64ISelLowering.cpp')
-rw-r--r--lib/Target/AArch64/AArch64ISelLowering.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Target/AArch64/AArch64ISelLowering.cpp b/lib/Target/AArch64/AArch64ISelLowering.cpp
index dfc5ad01dd..56f675183c 100644
--- a/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/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());