diff options
author | Tim Northover <tnorthover@apple.com> | 2013-07-25 12:42:52 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2013-07-25 12:42:52 +0000 |
commit | 107b2f26aa02a089a6b05ab86ebe033836fc06fa (patch) | |
tree | f9ea583ff4dfa068fe1a3be8de1771654d8b2fd8 /lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | |
parent | 563a9cf7ba3055921b7de9f05dd9223e82d20aba (diff) | |
download | llvm-107b2f26aa02a089a6b05ab86ebe033836fc06fa.tar.gz llvm-107b2f26aa02a089a6b05ab86ebe033836fc06fa.tar.bz2 llvm-107b2f26aa02a089a6b05ab86ebe033836fc06fa.tar.xz |
AArch64: don't mask off shift bits when processing JIT relocations.
This should actually make the MCJIT tests pass again on AArch64. I don't know
how I missed their failure before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187120 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp')
-rw-r--r-- | lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp index 05cb5f83be..7c1551033e 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp @@ -331,7 +331,7 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section, // AArch64 code is emitted with .rela relocations. The data already in any // bits affected by the relocation on entry is garbage. - *TargetPtr &= 0xff80001fU; + *TargetPtr &= 0xffe0001fU; // Immediate goes in bits 20:5 of MOVZ/MOVK instruction *TargetPtr |= Result >> (48 - 5); // Shift must be "lsl #48", in bits 22:21 @@ -344,7 +344,7 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section, // AArch64 code is emitted with .rela relocations. The data already in any // bits affected by the relocation on entry is garbage. - *TargetPtr &= 0xff80001fU; + *TargetPtr &= 0xffe0001fU; // Immediate goes in bits 20:5 of MOVZ/MOVK instruction *TargetPtr |= ((Result & 0xffff00000000ULL) >> (32 - 5)); // Shift must be "lsl #32", in bits 22:21 @@ -356,7 +356,7 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section, // AArch64 code is emitted with .rela relocations. The data already in any // bits affected by the relocation on entry is garbage. - *TargetPtr &= 0xff80001fU; + *TargetPtr &= 0xffe0001fU; // Immediate goes in bits 20:5 of MOVZ/MOVK instruction *TargetPtr |= ((Result & 0xffff0000U) >> (16 - 5)); // Shift must be "lsl #16", in bits 22:2 @@ -368,7 +368,7 @@ void RuntimeDyldELF::resolveAArch64Relocation(const SectionEntry &Section, // AArch64 code is emitted with .rela relocations. The data already in any // bits affected by the relocation on entry is garbage. - *TargetPtr &= 0xff80001fU; + *TargetPtr &= 0xffe0001fU; // Immediate goes in bits 20:5 of MOVZ/MOVK instruction *TargetPtr |= ((Result & 0xffffU) << 5); // Shift must be "lsl #0", in bits 22:21. |