xref: /aosp_15_r20/external/llvm/test/MC/ARM/thumb-branch-errors.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple=thumbv7-apple-darwin < %s 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
4*9880d681SAndroid Build Coastguard Worker@ Branch targets destined for ARM mode must == 0 (mod 4), otherwise (mod 2).
5*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
6*9880d681SAndroid Build Coastguard Worker
7*9880d681SAndroid Build Coastguard Worker        b #1
8*9880d681SAndroid Build Coastguard Worker        bl #1
9*9880d681SAndroid Build Coastguard Worker        cbnz r2, #1
10*9880d681SAndroid Build Coastguard Worker        beq #1
11*9880d681SAndroid Build Coastguard Worker        blx #2
12*9880d681SAndroid Build Coastguard Worker
13*9880d681SAndroid Build Coastguard Worker@ CHECK: error: branch target out of range
14*9880d681SAndroid Build Coastguard Worker@ CHECK:         b #1
15*9880d681SAndroid Build Coastguard Worker@ CHECK: error: invalid operand for instruction
16*9880d681SAndroid Build Coastguard Worker@ CHECK:         bl #1
17*9880d681SAndroid Build Coastguard Worker@ CHECK: error: invalid operand for instruction
18*9880d681SAndroid Build Coastguard Worker@ CHECK:         cbnz r2, #1
19*9880d681SAndroid Build Coastguard Worker@ CHECK: error: branch target out of range
20*9880d681SAndroid Build Coastguard Worker@ CHECK:         beq #1
21*9880d681SAndroid Build Coastguard Worker@ CHECK: error: invalid operand for instruction
22*9880d681SAndroid Build Coastguard Worker@ CHECK:         blx #2
23