• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: not llvm-mc -triple=armv7a-arm-none-eabi -mattr=+vfp2 -show-encoding < %s 2>%t \
2// RUN: | FileCheck --check-prefix=CHECK-V7A-ARM %s
3// RUN:   FileCheck --check-prefix=ERROR-V7A-ARM < %t %s
4// RUN: not llvm-mc -triple=thumbv7a-arm-none-eabi -mattr=+vfp2 -show-encoding < %s 2>%t \
5// RUN: | FileCheck --check-prefix=CHECK-V7A-THUMB %s
6// RUN:   FileCheck --check-prefix=ERROR-V7A-THUMB < %t %s
7// RUN: not llvm-mc -triple=thumbv7m-arm-none-eabi -mattr=+vfp2 -show-encoding < %s 2>%t \
8// RUN: | FileCheck --check-prefix=CHECK-V7M %s
9// RUN:   FileCheck --check-prefix=ERROR-V7M < %t %s
10// RUN: not llvm-mc -triple=armv8a-arm-none-eabi -mattr=+fp-armv8 -show-encoding < %s 2>%t \
11// RUN: | FileCheck --check-prefix=CHECK-V8A-ARM %s
12// RUN:   FileCheck --check-prefix=ERROR-V8A-ARM < %t %s
13// RUN: not llvm-mc -triple=thumbv8a-arm-none-eabi -mattr=+fp-armv8 -show-encoding < %s 2>%t \
14// RUN: | FileCheck --check-prefix=CHECK-V8A-THUMB %s
15// RUN:   FileCheck --check-prefix=ERROR-V8A-THUMB < %t %s
16// RUN: not llvm-mc -triple=thumbv8m.main-arm-none-eabi -mattr=+fp-armv8 -show-encoding < %s 2>%t \
17// RUN: | FileCheck --check-prefix=CHECK-V8M %s
18// RUN:   FileCheck --check-prefix=ERROR-V8M < %t %s
19// RUN: not llvm-mc -triple=thumbv7m-arm-none-eabi -show-encoding < %s 2>%t
20// RUN:   FileCheck --check-prefix=ERROR-NOVFP < %t %s
21
22        vmrs    APSR_nzcv, fpscr
23        vmrs    apsr_nzcv, fpscr
24        fmstat
25        vmrs    r10, fpscr
26        vmrs    r2, fpsid
27        vmrs    r3, FPSID
28        vmrs    r4, mvfr0
29        vmrs    r5, MVFR1
30        vmrs    r6, mvfr2
31        vmrs    sp, fpscr
32        vmrs    pc, fpscr
33
34// CHECK-V7A-ARM: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
35// CHECK-V7A-ARM: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
36// CHECK-V7A-ARM: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
37// CHECK-V7A-ARM: vmrs r10, fpscr             @ encoding: [0x10,0xaa,0xf1,0xee]
38// CHECK-V7A-ARM: vmrs r2, fpsid              @ encoding: [0x10,0x2a,0xf0,0xee]
39// CHECK-V7A-ARM: vmrs r3, fpsid              @ encoding: [0x10,0x3a,0xf0,0xee]
40// CHECK-V7A-ARM: vmrs r4, mvfr0              @ encoding: [0x10,0x4a,0xf7,0xee]
41// CHECK-V7A-ARM: vmrs r5, mvfr1              @ encoding: [0x10,0x5a,0xf6,0xee]
42// ERROR-V7A-ARM: instruction requires: FPARMv8
43// CHECK-V7A-ARM: vmrs sp, fpscr              @ encoding: [0x10,0xda,0xf1,0xee]
44// ERROR-V7A-ARM: invalid operand for instruction
45
46// CHECK-V7A-THUMB: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
47// CHECK-V7A-THUMB: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
48// CHECK-V7A-THUMB: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
49// CHECK-V7A-THUMB: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
50// CHECK-V7A-THUMB: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
51// CHECK-V7A-THUMB: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
52// CHECK-V7A-THUMB: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
53// CHECK-V7A-THUMB: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
54// ERROR-V7A-THUMB: instruction requires: FPARMv8
55// ERROR-V7A-THUMB: invalid operand for instruction
56// ERROR-V7A-THUMB: invalid operand for instruction
57
58// CHECK-V7M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
59// CHECK-V7M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
60// CHECK-V7M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
61// CHECK-V7M: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
62// CHECK-V7M: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
63// CHECK-V7M: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
64// CHECK-V7M: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
65// CHECK-V7M: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
66// ERROR-V7M: instruction requires: FPARMv8
67// ERROR-V7M: invalid operand for instruction
68// ERROR-V7M: invalid operand for instruction
69
70// CHECK-V8A-ARM: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
71// CHECK-V8A-ARM: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
72// CHECK-V8A-ARM: vmrs APSR_nzcv, fpscr       @ encoding: [0x10,0xfa,0xf1,0xee]
73// CHECK-V8A-ARM: vmrs r10, fpscr             @ encoding: [0x10,0xaa,0xf1,0xee]
74// CHECK-V8A-ARM: vmrs r2, fpsid              @ encoding: [0x10,0x2a,0xf0,0xee]
75// CHECK-V8A-ARM: vmrs r3, fpsid              @ encoding: [0x10,0x3a,0xf0,0xee]
76// CHECK-V8A-ARM: vmrs r4, mvfr0              @ encoding: [0x10,0x4a,0xf7,0xee]
77// CHECK-V8A-ARM: vmrs r5, mvfr1              @ encoding: [0x10,0x5a,0xf6,0xee]
78// CHECK-V8A-ARM: vmrs r6, mvfr2              @ encoding: [0x10,0x6a,0xf5,0xee]
79// CHECK-V8A-ARM: vmrs sp, fpscr              @ encoding: [0x10,0xda,0xf1,0xee]
80// ERROR-V8A-ARM: invalid operand for instruction
81
82// CHECK-V8A-THUMB: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
83// CHECK-V8A-THUMB: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
84// CHECK-V8A-THUMB: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
85// CHECK-V8A-THUMB: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
86// CHECK-V8A-THUMB: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
87// CHECK-V8A-THUMB: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
88// CHECK-V8A-THUMB: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
89// CHECK-V8A-THUMB: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
90// CHECK-V8A-THUMB: vmrs r6, mvfr2              @ encoding: [0xf5,0xee,0x10,0x6a]
91// CHECK-V8A-THUMB: vmrs sp, fpscr              @ encoding: [0xf1,0xee,0x10,0xda]
92// ERROR-V8A-THUMB: invalid operand for instruction
93
94// CHECK-V8M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
95// CHECK-V8M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
96// CHECK-V8M: vmrs APSR_nzcv, fpscr       @ encoding: [0xf1,0xee,0x10,0xfa]
97// CHECK-V8M: vmrs r10, fpscr             @ encoding: [0xf1,0xee,0x10,0xaa]
98// CHECK-V8M: vmrs r2, fpsid              @ encoding: [0xf0,0xee,0x10,0x2a]
99// CHECK-V8M: vmrs r3, fpsid              @ encoding: [0xf0,0xee,0x10,0x3a]
100// CHECK-V8M: vmrs r4, mvfr0              @ encoding: [0xf7,0xee,0x10,0x4a]
101// CHECK-V8M: vmrs r5, mvfr1              @ encoding: [0xf6,0xee,0x10,0x5a]
102// CHECK-V8M: vmrs r6, mvfr2              @ encoding: [0xf5,0xee,0x10,0x6a]
103// ERROR-V8M: invalid operand for instruction
104// ERROR-V8M: invalid operand for instruction
105
106// ERROR-NOVFP: instruction requires: VFP2
107// ERROR-NOVFP: instruction requires: VFP2
108// ERROR-NOVFP: instruction requires: VFP2
109// ERROR-NOVFP: instruction requires: VFP2
110// ERROR-NOVFP: instruction requires: VFP2
111// ERROR-NOVFP: instruction requires: VFP2
112// ERROR-NOVFP: instruction requires: VFP2
113// ERROR-NOVFP: instruction requires: VFP2
114// ERROR-NOVFP: instruction requires: FPARMv8
115// ERROR-NOVFP: invalid instruction
116// ERROR-NOVFP: invalid instruction
117
118        vmsr  fpscr, APSR_nzcv
119        vmsr  fpscr, r0
120        vmsr  fpexc, r1
121        vmsr  fpsid, r2
122        vmsr  fpscr, r10
123        vmsr  fpscr, sp
124        vmsr  fpscr, pc
125
126// ERROR-V7A-ARM: operand must be a register in range [r0, r14]
127// CHECK-V7A-ARM: vmsr  fpscr, r0             @ encoding: [0x10,0x0a,0xe1,0xee]
128// CHECK-V7A-ARM: vmsr  fpexc, r1             @ encoding: [0x10,0x1a,0xe8,0xee]
129// CHECK-V7A-ARM: vmsr  fpsid, r2             @ encoding: [0x10,0x2a,0xe0,0xee]
130// CHECK-V7A-ARM: vmsr  fpscr, r10            @ encoding: [0x10,0xaa,0xe1,0xee]
131// CHECK-V7A-ARM: vmsr  fpscr, sp             @ encoding: [0x10,0xda,0xe1,0xee]
132// ERROR-V7A-ARM: operand must be a register in range [r0, r14]
133
134// ERROR-V7A-THUMB: operand must be a register in range [r0, r14]
135// CHECK-V7A-THUMB: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
136// CHECK-V7A-THUMB: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
137// CHECK-V7A-THUMB: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
138// CHECK-V7A-THUMB: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
139// ERROR-V7A-THUMB: invalid operand for instruction
140// ERROR-V7A-THUMB: operand must be a register in range [r0, r14]
141
142// ERROR-V7M: operand must be a register in range [r0, r14]
143// CHECK-V7M: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
144// CHECK-V7M: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
145// CHECK-V7M: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
146// CHECK-V7M: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
147// ERROR-V7M: invalid operand for instruction
148// ERROR-V7M: operand must be a register in range [r0, r14]
149
150// ERROR-V8A-ARM: operand must be a register in range [r0, r14]
151// CHECK-V8A-ARM: vmsr  fpscr, r0             @ encoding: [0x10,0x0a,0xe1,0xee]
152// CHECK-V8A-ARM: vmsr  fpexc, r1             @ encoding: [0x10,0x1a,0xe8,0xee]
153// CHECK-V8A-ARM: vmsr  fpsid, r2             @ encoding: [0x10,0x2a,0xe0,0xee]
154// CHECK-V8A-ARM: vmsr  fpscr, r10            @ encoding: [0x10,0xaa,0xe1,0xee]
155// CHECK-V8A-ARM: vmsr  fpscr, sp             @ encoding: [0x10,0xda,0xe1,0xee]
156// ERROR-V8A-ARM: operand must be a register in range [r0, r14]
157
158// ERROR-V8A-THUMB: operand must be a register in range [r0, r14]
159// CHECK-V8A-THUMB: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
160// CHECK-V8A-THUMB: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
161// CHECK-V8A-THUMB: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
162// CHECK-V8A-THUMB: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
163// CHECK-V8A-THUMB: vmsr  fpscr, sp             @ encoding: [0xe1,0xee,0x10,0xda]
164// ERROR-V8A-THUMB: operand must be a register in range [r0, r14]
165
166// ERROR-V8M: operand must be a register in range [r0, r14]
167// CHECK-V8M: vmsr  fpscr, r0             @ encoding: [0xe1,0xee,0x10,0x0a]
168// CHECK-V8M: vmsr  fpexc, r1             @ encoding: [0xe8,0xee,0x10,0x1a]
169// CHECK-V8M: vmsr  fpsid, r2             @ encoding: [0xe0,0xee,0x10,0x2a]
170// CHECK-V8M: vmsr  fpscr, r10            @ encoding: [0xe1,0xee,0x10,0xaa]
171// ERROR-V8M: invalid operand for instruction
172// ERROR-V8M: operand must be a register in range [r0, r14]
173
174// ERROR-NOVFP: invalid instruction
175// ERROR-NOVFP: instruction requires: VFP2
176// ERROR-NOVFP: instruction requires: VFP2
177// ERROR-NOVFP: instruction requires: VFP2
178// ERROR-NOVFP: instruction requires: VFP2
179// ERROR-NOVFP: invalid instruction
180// ERROR-NOVFP: invalid instruction
181