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 | 75d650872fcbada30660cfa0d5044df342277b4a (patch) | |
tree | 9bf55edc9a4c6353b5efa7c2e30cfdde65ef96bb /lib/Target/AArch64/AArch64Subtarget.cpp | |
parent | 80bfe66e42a521b5f14ad4226a2018c07211f7a2 (diff) |
[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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299462 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/AArch64Subtarget.cpp')
-rw-r--r-- | lib/Target/AArch64/AArch64Subtarget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Target/AArch64/AArch64Subtarget.cpp b/lib/Target/AArch64/AArch64Subtarget.cpp index a9222c43476..b3aba4781db 100644 --- a/lib/Target/AArch64/AArch64Subtarget.cpp +++ b/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; |