aboutsummaryrefslogtreecommitdiffstats
path: root/test/MC/MachO
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2012-05-03 22:41:56 +0000
committerKevin Enderby <enderby@apple.com>2012-05-03 22:41:56 +0000
commit2d524b0765145f1c7888166c985a25452f16b2bc (patch)
treeda959deb54ff95efe8a9a261000687b88a0b7d3d /test/MC/MachO
parent9f7af7b74892e5479e26ab535c9a76131e1947c3 (diff)
downloadexternal_llvm-2d524b0765145f1c7888166c985a25452f16b2bc.zip
external_llvm-2d524b0765145f1c7888166c985a25452f16b2bc.tar.gz
external_llvm-2d524b0765145f1c7888166c985a25452f16b2bc.tar.bz2
Fix issues with the ARM bl and blx thumb instructions and the J1 and J2 bits
for the assembler and disassembler. Which were not being set/read correctly for offsets greater than 22 bits in some cases. Changes to lib/Target/ARM/ARMAsmBackend.cpp from Gideon Myles! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156118 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/MC/MachO')
-rw-r--r--test/MC/MachO/ARM/thumb-bl-jbits.s19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/MC/MachO/ARM/thumb-bl-jbits.s b/test/MC/MachO/ARM/thumb-bl-jbits.s
new file mode 100644
index 0000000..9657968
--- /dev/null
+++ b/test/MC/MachO/ARM/thumb-bl-jbits.s
@@ -0,0 +1,19 @@
+@ RUN: llvm-mc -triple=thumbv7-apple-darwin -filetype=obj -o - < %s | macho-dump --dump-section-data | FileCheck %s
+.thumb
+.thumb_func t
+t: nop
+
+.data
+.space 4441096 - 4 - 2
+
+.section __TEXT, __branch, regular, pure_instructions
+.thumb
+.thumb_func b
+b:
+ bl t
+# CHECK: '_section_data', 'c3f7fcf5'
+# We are checking that the branch and link instruction which is:
+# bl #-4441096
+# has it displacement encoded correctly with respect to the J1 and J2 bits when
+# the branch is assembled with a label not a displacement.
+# rdar://10149689