summaryrefslogtreecommitdiffstats
path: root/llvm/lib/ExecutionEngine/RuntimeDyld
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2018-02-28 00:58:21 +0000
committerLang Hames <lhames@gmail.com>2018-02-28 00:58:21 +0000
commit6588f14a6c9149e0c7d1957b0806f06931843e27 (patch)
treee109cfd5f765c1476a589687ee3741245eed1b05 /llvm/lib/ExecutionEngine/RuntimeDyld
parent4764b5748aef50c51f6885ebdf0210105758ece4 (diff)
downloadbcm5719-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.h6
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
OpenPOWER on IntegriCloud