diff options
Diffstat (limited to 'llvm/test')
| -rw-r--r-- | llvm/test/MC/ARM/thumb-branches-err.s | 7 | ||||
| -rw-r--r-- | llvm/test/MC/ARM/thumb-branches.s | 20 |
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 |

