xref: /aosp_15_r20/external/llvm/test/MC/ARM/arm11-hint-instr.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple=armv6 -show-encoding < %s > %t1 2> %t2
2*9880d681SAndroid Build Coastguard Worker@ RUN: FileCheck --check-prefix=CHECK-V6 %s < %t1
3*9880d681SAndroid Build Coastguard Worker@ RUN: FileCheck --check-prefix=CHECK-ERROR-V6 %s < %t2
4*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple=armv6k -show-encoding < %s \
5*9880d681SAndroid Build Coastguard Worker@ RUN:     | FileCheck --check-prefix=CHECK-ARM %s
6*9880d681SAndroid Build Coastguard Worker@ RUN: llvm-mc -triple=armv6t2 -show-encoding < %s \
7*9880d681SAndroid Build Coastguard Worker@ RUN:     | FileCheck --check-prefix=CHECK-ARM %s
8*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple=thumb -mcpu=arm1156t2-s -show-encoding < %s > %t3 2> %t4
9*9880d681SAndroid Build Coastguard Worker@ RUN: FileCheck --check-prefix=CHECK-THUMB %s < %t3
10*9880d681SAndroid Build Coastguard Worker@ RUN: FileCheck --check-prefix=CHECK-ERROR-THUMB %s < %t4
11*9880d681SAndroid Build Coastguard Worker@ RUN: not llvm-mc -triple=armv6m -show-encoding < %s > %t5 2> %t6
12*9880d681SAndroid Build Coastguard Worker@ RUN: FileCheck --check-prefix=CHECK-V6M %s < %t5
13*9880d681SAndroid Build Coastguard Worker@ RUN: FileCheck --check-prefix=CHECK-ERROR-V6M %s < %t6
14*9880d681SAndroid Build Coastguard Worker
15*9880d681SAndroid Build Coastguard Worker  .syntax unified
16*9880d681SAndroid Build Coastguard Worker
17*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
18*9880d681SAndroid Build Coastguard Worker@ YIELD/WFE/WFI/SEV/CLREX - are not supported pre v6K
19*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
20*9880d681SAndroid Build Coastguard Worker        nop
21*9880d681SAndroid Build Coastguard Worker        yield
22*9880d681SAndroid Build Coastguard Worker        wfe
23*9880d681SAndroid Build Coastguard Worker        wfi
24*9880d681SAndroid Build Coastguard Worker        sev
25*9880d681SAndroid Build Coastguard Worker        clrex
26*9880d681SAndroid Build Coastguard Worker
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
29*9880d681SAndroid Build Coastguard Worker@ v6 using ARM encoding
30*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
31*9880d681SAndroid Build Coastguard Worker@ CHECK-V6: mov	r0, r0                  @ encoding: [0x00,0x00,0xa0,0xe1]
32*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: error: instruction requires: armv6k
33*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: yield
34*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: ^
35*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: error: instruction requires: armv6k
36*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: wfe
37*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: ^
38*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: error: instruction requires: armv6k
39*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: wfi
40*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: error: instruction requires: armv6k
41*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: sev
42*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: ^
43*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: error: instruction requires: armv6k
44*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: clrex
45*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6: ^
46*9880d681SAndroid Build Coastguard Worker
47*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
48*9880d681SAndroid Build Coastguard Worker@ v6K using ARM encoding
49*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
50*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
51*9880d681SAndroid Build Coastguard Worker@ v6T2 using ARM encoding (arm triple)
52*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
53*9880d681SAndroid Build Coastguard Worker@ CHECK-ARM: nop                             @ encoding: [0x00,0xf0,0x20,0xe3]
54*9880d681SAndroid Build Coastguard Worker@ CHECK-ARM: yield                           @ encoding: [0x01,0xf0,0x20,0xe3]
55*9880d681SAndroid Build Coastguard Worker@ CHECK-ARM: wfe                             @ encoding: [0x02,0xf0,0x20,0xe3]
56*9880d681SAndroid Build Coastguard Worker@ CHECK-ARM: wfi                             @ encoding: [0x03,0xf0,0x20,0xe3]
57*9880d681SAndroid Build Coastguard Worker@ CHECK-ARM: sev                             @ encoding: [0x04,0xf0,0x20,0xe3]
58*9880d681SAndroid Build Coastguard Worker@ CHECK-ARM: clrex                           @ encoding: [0x1f,0xf0,0x7f,0xf5]
59*9880d681SAndroid Build Coastguard Worker
60*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
61*9880d681SAndroid Build Coastguard Worker@ v6T2 using THUMB encoding (thumb triple)
62*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
63*9880d681SAndroid Build Coastguard Worker@ CHECK-THUMB: nop                             @ encoding: [0x00,0xbf]
64*9880d681SAndroid Build Coastguard Worker@ CHECK-THUMB: yield                           @ encoding: [0x10,0xbf]
65*9880d681SAndroid Build Coastguard Worker@ CHECK-THUMB: wfe                             @ encoding: [0x20,0xbf]
66*9880d681SAndroid Build Coastguard Worker@ CHECK-THUMB: wfi                             @ encoding: [0x30,0xbf]
67*9880d681SAndroid Build Coastguard Worker@ CHECK-THUMB: sev                             @ encoding: [0x40,0xbf]
68*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-THUMB: error: instruction requires: v7 clrex
69*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-THUMB: clrex
70*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-THUMB: ^
71*9880d681SAndroid Build Coastguard Worker
72*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
73*9880d681SAndroid Build Coastguard Worker@ v6M using THUMB encoding
74*9880d681SAndroid Build Coastguard Worker@------------------------------------------------------------------------------
75*9880d681SAndroid Build Coastguard Worker@ CHECK-V6M: nop                             @ encoding: [0x00,0xbf]
76*9880d681SAndroid Build Coastguard Worker@ CHECK-V6M: yield                           @ encoding: [0x10,0xbf]
77*9880d681SAndroid Build Coastguard Worker@ CHECK-V6M: wfe                             @ encoding: [0x20,0xbf]
78*9880d681SAndroid Build Coastguard Worker@ CHECK-V6M: wfi                             @ encoding: [0x30,0xbf]
79*9880d681SAndroid Build Coastguard Worker@ CHECK-V6M: sev                             @ encoding: [0x40,0xbf]
80*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6M: error: instruction requires: v7 clrex
81*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6M: clrex
82*9880d681SAndroid Build Coastguard Worker@ CHECK-ERROR-V6M: ^
83