xref: /llvm-project/llvm/test/MC/Disassembler/ARM/thumb-vmrs_vmsr.txt (revision d4a25707f007db1536035a91ed39f13ab6ba35c2)
1# RUN: not llvm-mc -disassemble -triple=thumbv7a-arm-none-eabi -mattr=+vfp2 -show-encoding < %s 2>%t \
2# RUN: | FileCheck --check-prefix=CHECK-V7A %s
3# RUN:   FileCheck --check-prefix=ERROR-V7A < %t %s
4# RUN: not llvm-mc -disassemble -triple=thumbv7m-arm-none-eabi -mattr=+vfp2 -show-encoding < %s 2>%t \
5# RUN: | FileCheck --check-prefix=CHECK-V7M %s
6# RUN:   FileCheck --check-prefix=ERROR-V7M < %t %s
7# RUN: llvm-mc -disassemble -triple=thumbv8a-arm-none-eabi -mattr=+fp-armv8 -show-encoding < %s 2>%t \
8# RUN: | FileCheck --check-prefix=CHECK-V8A %s
9# RUN:   FileCheck --check-prefix=ERROR-V8A < %t %s
10# RUN: llvm-mc -disassemble -triple=thumbv8m.main-arm-none-eabi -mattr=+fp-armv8 -show-encoding < %s 2>%t \
11# RUN: | FileCheck --check-prefix=CHECK-V8M %s
12# RUN:   FileCheck --check-prefix=ERROR-V8M < %t %s
13# RUN: not llvm-mc -disassemble -triple=thumbv7m-arm-none-eabi -show-encoding < %s 2>%t
14# RUN:   FileCheck --check-prefix=ERROR-NOVFP < %t %s
15
16       [0xf1,0xee,0x10,0xfa]
17       [0xf1,0xee,0x10,0xfa]
18       [0xf1,0xee,0x10,0xfa]
19       [0xf1,0xee,0x10,0xaa]
20       [0xf0,0xee,0x10,0x2a]
21       [0xf0,0xee,0x10,0x3a]
22       [0xf7,0xee,0x10,0x4a]
23       [0xf6,0xee,0x10,0x5a]
24       [0xf5,0xee,0x10,0x6a]
25       [0xf1,0xee,0x10,0xda]
26
27# CHECK-V7A: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
28# CHECK-V7A: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
29# CHECK-V7A: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
30# CHECK-V7A: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
31# CHECK-V7A: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
32# CHECK-V7A: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
33# CHECK-V7A: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
34# CHECK-V7A: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
35# ERROR-V7A: invalid instruction encoding
36# ERROR-V7A: potentially undefined instruction encoding
37
38# CHECK-V7M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
39# CHECK-V7M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
40# CHECK-V7M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
41# CHECK-V7M: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
42# CHECK-V7M: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
43# CHECK-V7M: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
44# CHECK-V7M: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
45# CHECK-V7M: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
46# ERROR-V7M: invalid instruction encoding
47# ERROR-V7M: potentially undefined instruction encoding
48
49# CHECK-V8A: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
50# CHECK-V8A: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
51# CHECK-V8A: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
52# CHECK-V8A: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
53# CHECK-V8A: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
54# CHECK-V8A: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
55# CHECK-V8A: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
56# CHECK-V8A: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
57# CHECK-V8A: vmrs r6, mvfr2              @ encoding: [0xf5,0xee,0x10,0x6a]
58# CHECK-V8A: vmrs sp, fpscr              @ encoding: [0xf1,0xee,0x10,0xda]
59
60# CHECK-V8M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
61# CHECK-V8M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
62# CHECK-V8M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
63# CHECK-V8M: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
64# CHECK-V8M: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
65# CHECK-V8M: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
66# CHECK-V8M: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
67# CHECK-V8M: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
68# CHECK-V8M: vmrs r6, mvfr2              @ encoding: [0xf5,0xee,0x10,0x6a]
69# ERROR-V8M: potentially undefined instruction encoding
70
71# ERROR-NOVFP: invalid instruction encoding
72# ERROR-NOVFP: invalid instruction encoding
73# ERROR-NOVFP: invalid instruction encoding
74# ERROR-NOVFP: invalid instruction encoding
75# ERROR-NOVFP: invalid instruction encoding
76# ERROR-NOVFP: invalid instruction encoding
77# ERROR-NOVFP: invalid instruction encoding
78# ERROR-NOVFP: invalid instruction encoding
79# ERROR-NOVFP: invalid instruction encoding
80# ERROR-NOVFP: invalid instruction encoding
81
82[0xe1,0xee,0x10,0xfa]
83[0xe1,0xee,0x10,0x0a]
84[0xe8,0xee,0x10,0x1a]
85[0xe0,0xee,0x10,0x2a]
86[0xe1,0xee,0x10,0xaa]
87[0xe1,0xee,0x10,0xda]
88
89# ERROR-V7A: potentially undefined instruction encoding
90# CHECK-V7A: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
91# CHECK-V7A: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
92# CHECK-V7A: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
93# CHECK-V7A: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
94# ERROR-V7A: potentially undefined instruction encoding
95
96# ERROR-V7M: potentially undefined instruction encoding
97# CHECK-V7M: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
98# CHECK-V7M: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
99# CHECK-V7M: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
100# CHECK-V7M: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
101# ERROR-V7M: potentially undefined instruction encoding
102
103# ERROR-V8A: potentially undefined instruction encoding
104# CHECK-V8A: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
105# CHECK-V8A: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
106# CHECK-V8A: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
107# CHECK-V8A: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
108# CHECK-V8A: vmsr  fpscr, sp             @ encoding: [0xe1,0xee,0x10,0xda]
109
110# ERROR-V8M: potentially undefined instruction encoding
111# CHECK-V8M: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
112# CHECK-V8M: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
113# CHECK-V8M: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
114# CHECK-V8M: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
115# ERROR-V8M: potentially undefined instruction encoding
116
117# ERROR-NOVFP: invalid instruction encoding
118# ERROR-NOVFP: invalid instruction encoding
119# ERROR-NOVFP: invalid instruction encoding
120# ERROR-NOVFP: invalid instruction encoding
121# ERROR-NOVFP: invalid instruction encoding
122# ERROR-NOVFP: invalid instruction encoding
123
124        [0x0b,0xbf]
125        [0xf7,0xee,0x10,0x4a]
126        [0xf6,0xee,0x10,0x5a]
127        [0xe1,0xee,0x10,0x0a]
128        [0xe0,0xee,0x10,0x2a]
129
130# CHECK-V7A: itete eq                      @ encoding: [0x0b,0xbf]
131# CHECK-V7A: vmrseq  r4, mvfr0             @ encoding: [0xf7,0xee,0x10,0x4a]
132# CHECK-V7A: vmrsne  r5, mvfr1             @ encoding: [0xf6,0xee,0x10,0x5a]
133# CHECK-V7A: vmsreq  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
134# CHECK-V7A: vmsrne  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
135
136# CHECK-V7M: itete eq                      @ encoding: [0x0b,0xbf]
137# CHECK-V7M: vmrseq  r4, mvfr0             @ encoding: [0xf7,0xee,0x10,0x4a]
138# CHECK-V7M: vmrsne  r5, mvfr1             @ encoding: [0xf6,0xee,0x10,0x5a]
139# CHECK-V7M: vmsreq  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
140# CHECK-V7M: vmsrne  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
141
142# CHECK-V8A: itete eq                      @ encoding: [0x0b,0xbf]
143# CHECK-V8A: vmrseq  r4, mvfr0             @ encoding: [0xf7,0xee,0x10,0x4a]
144# CHECK-V8A: vmrsne  r5, mvfr1             @ encoding: [0xf6,0xee,0x10,0x5a]
145# CHECK-V8A: vmsreq  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
146# CHECK-V8A: vmsrne  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
147
148# CHECK-V8M: itete eq                      @ encoding: [0x0b,0xbf]
149# CHECK-V8M: vmrseq  r4, mvfr0             @ encoding: [0xf7,0xee,0x10,0x4a]
150# CHECK-V8M: vmrsne  r5, mvfr1             @ encoding: [0xf6,0xee,0x10,0x5a]
151# CHECK-V8M: vmsreq  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
152# CHECK-V8M: vmsrne  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
153
154# ERROR-NOVFP: invalid instruction encoding
155# ERROR-NOVFP: invalid instruction encoding
156# ERROR-NOVFP: invalid instruction encoding
157# ERROR-NOVFP: invalid instruction encoding
158