diff options
author | Lang Hames <lhames@gmail.com> | 2018-02-28 00:58:21 +0000 |
---|---|---|
committer | Lang Hames <lhames@gmail.com> | 2018-02-28 00:58:21 +0000 |
commit | 6588f14a6c9149e0c7d1957b0806f06931843e27 (patch) | |
tree | e109cfd5f765c1476a589687ee3741245eed1b05 /llvm/lib/ExecutionEngine/RuntimeDyld | |
parent | 4764b5748aef50c51f6885ebdf0210105758ece4 (diff) | |
download | bcm5719-llvm-6588f14a6c9149e0c7d1957b0806f06931843e27.tar.gz bcm5719-llvm-6588f14a6c9149e0c7d1957b0806f06931843e27.zip |
[RuntimeDyld][MachO] Support ARM64_RELOC_BRANCH26 for BL instructions by
relaxing an assertion.
llvm-svn: 326290
Diffstat (limited to 'llvm/lib/ExecutionEngine/RuntimeDyld')
-rw-r--r-- | llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h index 97cbc153b22..86acf513de3 100644 --- a/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h +++ b/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h @@ -66,9 +66,11 @@ public: Addend = *reinterpret_cast<support::ulittle64_t *>(LocalAddress); break; case MachO::ARM64_RELOC_BRANCH26: { - // Verify that the relocation points to the expected branch instruction. + // Verify that the relocation points to a B/BL instruction. auto *p = reinterpret_cast<support::aligned_ulittle32_t *>(LocalAddress); - assert((*p & 0xFC000000) == 0x14000000 && "Expected branch instruction."); + assert(((*p & 0xFC000000) == 0x14000000 || + (*p & 0xFC000000) == 0x94000000) + && "Expected branch instruction."); // Get the 26 bit addend encoded in the branch instruction and sign-extend // to 64 bit. The lower 2 bits are always zeros and are therefore implicit |