summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-11-04 23:00:39 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-11-04 23:00:39 +0000
commit49b8548903708ee5c684e623d42ea2bb4f3bb44d (patch)
tree26db13c1eb425d5c1d4c0ce864da68471593704b /llvm/test
parent49dbbdb3b375cf7ad6a46e4797ad67c4fa23e90f (diff)
downloadbcm5719-llvm-49b8548903708ee5c684e623d42ea2bb4f3bb44d.tar.gz
bcm5719-llvm-49b8548903708ee5c684e623d42ea2bb4f3bb44d.zip
Slightly saner handling of thumb branches.
The generic infrastructure already did a lot of work to decide if the fixup value is know or not. It doesn't make sense to reimplement a very basic case: same fragment. llvm-svn: 252090
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/MC/ARM/thumb-branches-err.s7
-rw-r--r--llvm/test/MC/ARM/thumb-branches.s20
2 files changed, 27 insertions, 0 deletions
diff --git a/llvm/test/MC/ARM/thumb-branches-err.s b/llvm/test/MC/ARM/thumb-branches-err.s
new file mode 100644
index 00000000000..624ebeeb037
--- /dev/null
+++ b/llvm/test/MC/ARM/thumb-branches-err.s
@@ -0,0 +1,7 @@
+@ RUN: not llvm-mc < %s -triple thumbv5-linux-gnueabi -filetype=obj -o %t 2>&1 | FileCheck %s
+
+ bl end
+ .space 0x400000
+end:
+
+@ CHECK: out of range for branch
diff --git a/llvm/test/MC/ARM/thumb-branches.s b/llvm/test/MC/ARM/thumb-branches.s
new file mode 100644
index 00000000000..4870e821623
--- /dev/null
+++ b/llvm/test/MC/ARM/thumb-branches.s
@@ -0,0 +1,20 @@
+@ RUN: llvm-mc < %s -triple thumbv5-linux-gnueabi -filetype=obj -o - \
+@ RUN: | llvm-readobj -r | FileCheck %s
+
+
+ bl end
+ .space 0x3fffff
+end:
+
+ bl end2
+ .space 0x3fffff
+ .global end2
+end2:
+
+ bl end3
+ .space 0x400000
+ .global end3
+end3:
+
+@ CHECK: 0x400003 R_ARM_THM_CALL end2 0x0
+@ CHECK: 0x800006 R_ARM_THM_CALL end3 0x0
OpenPOWER on IntegriCloud