xref: /aosp_15_r20/external/llvm/test/MC/ARM/virtexts-thumb.s (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker# RUN: llvm-mc -triple thumbv7 -mattr=virtualization -show-encoding %s | FileCheck %s --check-prefix=CHECK-THUMB
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker    hvc    #1
4*9880d681SAndroid Build Coastguard Worker    hvc    #7
5*9880d681SAndroid Build Coastguard Worker    hvc    #257
6*9880d681SAndroid Build Coastguard Worker    hvc    #65535
7*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xe0,0xf7,0x01,0x80]
8*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xe0,0xf7,0x07,0x80]
9*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xe0,0xf7,0x01,0x81]
10*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xef,0xf7,0xff,0x8f]
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Worker    hvc.w    #1
13*9880d681SAndroid Build Coastguard Worker    hvc.w    #7
14*9880d681SAndroid Build Coastguard Worker    hvc.w    #257
15*9880d681SAndroid Build Coastguard Worker    hvc.w    #65535
16*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xe0,0xf7,0x01,0x80]
17*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xe0,0xf7,0x07,0x80]
18*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xe0,0xf7,0x01,0x81]
19*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xef,0xf7,0xff,0x8f]
20*9880d681SAndroid Build Coastguard Worker
21*9880d681SAndroid Build Coastguard Worker    eret
22*9880d681SAndroid Build Coastguard Worker    it eq; ereteq
23*9880d681SAndroid Build Coastguard Worker    it ne; eretne
24*9880d681SAndroid Build Coastguard Worker    it hs; ereths
25*9880d681SAndroid Build Coastguard Worker    it lo; eretlo
26*9880d681SAndroid Build Coastguard Worker    it mi; eretmi
27*9880d681SAndroid Build Coastguard Worker    it pl; eretpl
28*9880d681SAndroid Build Coastguard Worker    it vs; eretvs
29*9880d681SAndroid Build Coastguard Worker    it vc; eretvc
30*9880d681SAndroid Build Coastguard Worker    it hi; erethi
31*9880d681SAndroid Build Coastguard Worker    it ls; eretls
32*9880d681SAndroid Build Coastguard Worker    it ge; eretge
33*9880d681SAndroid Build Coastguard Worker    it lt; eretlt
34*9880d681SAndroid Build Coastguard Worker    it gt; eretgt
35*9880d681SAndroid Build Coastguard Worker    it le; eretle
36*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
37*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
38*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
39*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
40*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
41*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
42*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
43*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
44*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
45*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
46*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
47*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
48*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
49*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
50*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
51*9880d681SAndroid Build Coastguard Worker
52*9880d681SAndroid Build Coastguard Worker# SUBS PC, LR, #0 should have the same encoding as ERET.
53*9880d681SAndroid Build Coastguard Worker# The conditional forms can't be tested becuse the ARM assembler parser doesn't
54*9880d681SAndroid Build Coastguard Worker# accept SUBS<cond> PC, LR, #<imm>, only the unconditonal form is allowed. This
55*9880d681SAndroid Build Coastguard Worker# is due to the way that the custom parser handles optional operands; see the
56*9880d681SAndroid Build Coastguard Worker# FIXME in ARM/AsmParser/ARMAsmParser.cpp.
57*9880d681SAndroid Build Coastguard Worker
58*9880d681SAndroid Build Coastguard Worker    subs pc, lr, #0
59*9880d681SAndroid Build Coastguard Worker# CHECK-THUMB: [0xde,0xf3,0x00,0x8f]
60