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