summaryrefslogtreecommitdiffstats
path: root/llvm/test/ExecutionEngine
diff options
context:
space:
mode:
authorEugene Leviant <eleviant@accesssoftek.com>2017-01-09 09:56:31 +0000
committerEugene Leviant <eleviant@accesssoftek.com>2017-01-09 09:56:31 +0000
commitbe2d68f774a4f032cd316601d0f9f2a363466401 (patch)
treee5fc0d2f1b42707fbbca684a88ec5be8c8650d64 /llvm/test/ExecutionEngine
parent3d574572989190573e65ed40cd2277d53a33550f (diff)
downloadbcm5719-llvm-be2d68f774a4f032cd316601d0f9f2a363466401.tar.gz
bcm5719-llvm-be2d68f774a4f032cd316601d0f9f2a363466401.zip
RuntimeDyldELF: don't create thunk if not needed
This patch doesn't create thunk for branch operation when following conditions are met: - Architecture is AArch64 - Relocation target is in the same object file - Relocation target is close enough to be encoded in immediate offset In such case we branch directly to the target instead of branching to thunk Differential revision: https://reviews.llvm.org/D28108 llvm-svn: 291431
Diffstat (limited to 'llvm/test/ExecutionEngine')
-rw-r--r--llvm/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_local_branch.s14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_local_branch.s b/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_local_branch.s
new file mode 100644
index 00000000000..679930a14e0
--- /dev/null
+++ b/llvm/test/ExecutionEngine/RuntimeDyld/AArch64/ELF_ARM64_local_branch.s
@@ -0,0 +1,14 @@
+# RUN: llvm-mc -triple=arm64-none-linux-gnu -filetype=obj -o %T/branch.o %s
+# RUN: llvm-rtdyld -triple=arm64-none-linux-gnu -verify -check=%s %T/branch.o
+
+.globl _main
+.weak _label1
+
+.section .text.1,"ax"
+_label1:
+ nop
+_main:
+ b _label1
+
+## Branch 1 instruction back from _main
+# rtdyld-check: *{4}(_main) = 0x17ffffff
OpenPOWER on IntegriCloud