diff options
author | Petr Hosek <phosek@chromium.org> | 2017-04-04 19:51:53 +0000 |
---|---|---|
committer | Petr Hosek <phosek@chromium.org> | 2017-04-04 19:51:53 +0000 |
commit | 9eb0a1e09b1eeece9c59e8ee6c5164fcd6bbcacb (patch) | |
tree | e15d0b73dafc479fcb2f5918c89eed926e5e5013 /llvm/lib/Target/AArch64/AArch64Subtarget.cpp | |
parent | c45b03bddcff957a5353007f11dc520fd0072adc (diff) | |
download | bcm5719-llvm-9eb0a1e09b1eeece9c59e8ee6c5164fcd6bbcacb.tar.gz bcm5719-llvm-9eb0a1e09b1eeece9c59e8ee6c5164fcd6bbcacb.zip |
[AArch64][Fuchsia] Allow -mcmodel=kernel for --target=aarch64-fuchsia
This mode is just like -mcmodel=small except that it moves the
thread pointer from TPIDR_EL0 to TPIDR_EL1.
Patch by Roland McGrath.
Differential Revision: https://reviews.llvm.org/D31624
llvm-svn: 299462
Diffstat (limited to 'llvm/lib/Target/AArch64/AArch64Subtarget.cpp')
-rw-r--r-- | llvm/lib/Target/AArch64/AArch64Subtarget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp index a9222c43476..b3aba4781db 100644 --- a/llvm/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/llvm/lib/Target/AArch64/AArch64Subtarget.cpp @@ -147,9 +147,9 @@ AArch64Subtarget::ClassifyGlobalReference(const GlobalValue *GV, if (!TM.shouldAssumeDSOLocal(*GV->getParent(), GV)) return AArch64II::MO_GOT; - // The small code mode's direct accesses use ADRP, which cannot necessarily - // produce the value 0 (if the code is above 4GB). - if (TM.getCodeModel() == CodeModel::Small && GV->hasExternalWeakLinkage()) + // The small code model's direct accesses use ADRP, which cannot + // necessarily produce the value 0 (if the code is above 4GB). + if (useSmallAddressing() && GV->hasExternalWeakLinkage()) return AArch64II::MO_GOT; return AArch64II::MO_NO_FLAG; |