summaryrefslogtreecommitdiff
path: root/lib/Target/AArch64/MCTargetDesc
diff options
context:
space:
mode:
authorTim Northover <Tim.Northover@arm.com>2013-05-04 20:13:59 +0000
committerTim Northover <Tim.Northover@arm.com>2013-05-04 20:13:59 +0000
commit85829bb98a998cff8f364c12d172da948ca225f4 (patch)
tree05042b20268e548dd01288ce473a22479bc6d32d /lib/Target/AArch64/MCTargetDesc
parentbd121f5b3ab3703527b810be1dc38e15a6f8944a (diff)
downloadllvm-85829bb98a998cff8f364c12d172da948ca225f4.tar.gz
llvm-85829bb98a998cff8f364c12d172da948ca225f4.tar.bz2
llvm-85829bb98a998cff8f364c12d172da948ca225f4.tar.xz
AArch64: implement first relocation required for MCJIT
R_AARCH64_PCREL32 is present in even trivial .eh_frame sections and so is required to compile any function without the "nounwind" attribute. This change implements very basic infrastructure in the RuntimeDyldELF file and allows (for example) the test-shift.ll MCJIT test to pass on AArch64. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/AArch64/MCTargetDesc')
-rw-r--r--lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp b/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
index 7960db08c8..819eeadb44 100644
--- a/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
+++ b/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp
@@ -81,6 +81,12 @@ static MCCodeGenInfo *createAArch64MCCodeGenInfo(StringRef TT, Reloc::Model RM,
if (CM == CodeModel::Default)
CM = CodeModel::Small;
+ else if (CM == CodeModel::JITDefault) {
+ // The default MCJIT memory managers make no guarantees about where they can
+ // find an executable page; JITed code needs to be able to refer to globals
+ // no matter how far away they are.
+ CM = CodeModel::Large;
+ }
X->InitMCCodeGenInfo(RM, CM, OL);
return X;