xref: /aosp_15_r20/external/llvm/test/MC/ARM/thumb2-ldrb-ldrh.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple thumbv7a-none-eabi -show-encoding < %s 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple thumbv7m-none-eabi -show-encoding < %s 2>&1 | FileCheck %s
3*9880d681SAndroid Build Coastguard Worker
4*9880d681SAndroid Build Coastguard Worker@ Thumb2 LDRS?[BH] are not valid when Rt == PC (these encodings are used for
5*9880d681SAndroid Build Coastguard Worker@ preload hints).
6*9880d681SAndroid Build Coastguard Worker@ We don't check the actual error messages here as they are currently not very
7*9880d681SAndroid Build Coastguard Worker@ helpful, see http://llvm.org/bugs/show_bug.cgi?id=21066.
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
10*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
11*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
12*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
13*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
14*9880d681SAndroid Build Coastguard Worker  ldrb    pc, [r0, #10]
15*9880d681SAndroid Build Coastguard Worker  ldrb.w  pc, [r1, #10]
16*9880d681SAndroid Build Coastguard Worker  ldrb    pc, [r2, #-5]
17*9880d681SAndroid Build Coastguard Worker  ldrb    pc, [pc, #7]
18*9880d681SAndroid Build Coastguard Worker  ldrb.w  pc, [pc, #7]
19*9880d681SAndroid Build Coastguard Worker
20*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
21*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
22*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
23*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
24*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
25*9880d681SAndroid Build Coastguard Worker  ldrsb   pc, [r3, #10]
26*9880d681SAndroid Build Coastguard Worker  ldrsb.w pc, [r4, #10]
27*9880d681SAndroid Build Coastguard Worker  ldrsb   pc, [r5, #-5]
28*9880d681SAndroid Build Coastguard Worker  ldrsb   pc, [pc, #7]
29*9880d681SAndroid Build Coastguard Worker  ldrsb.w pc, [pc, #7]
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
32*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
33*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
34*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
35*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
36*9880d681SAndroid Build Coastguard Worker  ldrh    pc, [r6, #10]
37*9880d681SAndroid Build Coastguard Worker  ldrh.w  pc, [r7, #10]
38*9880d681SAndroid Build Coastguard Worker  ldrh    pc, [r8, #-5]
39*9880d681SAndroid Build Coastguard Worker  ldrh    pc, [pc, #7]
40*9880d681SAndroid Build Coastguard Worker  ldrh.w  pc, [pc, #7]
41*9880d681SAndroid Build Coastguard Worker
42*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
43*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
44*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
45*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
46*9880d681SAndroid Build Coastguard Worker@ CHECK: error:
47*9880d681SAndroid Build Coastguard Worker  ldrsh   pc, [r9, #10]
48*9880d681SAndroid Build Coastguard Worker  ldrsh.w pc, [r10, #10]
49*9880d681SAndroid Build Coastguard Worker  ldrsh   pc, [r11, #-5]
50*9880d681SAndroid Build Coastguard Worker  ldrsh   pc, [pc, #7]
51*9880d681SAndroid Build Coastguard Worker  ldrsh.w pc, [pc, #7]
52