xref: /llvm-project/llvm/test/MC/RISCV/corev/XCVmem-invalid.s (revision 71a7108ee91a522251ff37638e26158570c1e2a5)
1# RUN: not llvm-mc -triple=riscv32 --mattr=+xcvmem %s 2>&1 \
2# RUN:        | FileCheck %s --check-prefixes=CHECK-ERROR
3
4cv.lb t0, (0), 0
5# CHECK-ERROR: operands must be register and register
6
7cv.lb 0, (t1), 0
8# CHECK-ERROR: invalid operand for instruction
9
10cv.lb 0, (0), t2
11# CHECK-ERROR: invalid operand for instruction
12
13cv.lb t0, (t1), -2049
14# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
15
16cv.lb t0, (t1), 2048
17# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
18
19cv.lb t0, (0), t1
20# CHECK-ERROR: operands must be register and register
21
22cv.lb 0, (t1), t1
23# CHECK-ERROR: invalid operand for instruction
24
25cv.lb t0
26# CHECK-ERROR: too few operands for instruction
27
28cv.lb t0, (t2)
29# CHECK-ERROR: too few operands for instruction
30
31cv.lb t0, (t1), t2, t3
32# CHECK-ERROR: invalid operand for instruction
33
34cv.lbu t0, (0), 0
35# CHECK-ERROR: operands must be register and register
36
37cv.lbu 0, (t1), 0
38# CHECK-ERROR: invalid operand for instruction
39
40cv.lbu 0, (0), t0
41# CHECK-ERROR: invalid operand for instruction
42
43cv.lbu t0, (t1), -2049
44# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
45
46cv.lbu t0, (t1), 2048
47# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
48
49cv.lbu t0, (0), t1
50# CHECK-ERROR: operands must be register and register
51
52cv.lbu 0, (t1), t1
53# CHECK-ERROR: invalid operand for instruction
54
55cv.lbu t0
56# CHECK-ERROR: too few operands for instruction
57
58cv.lbu t0, (t2)
59# CHECK-ERROR: too few operands for instruction
60
61cv.lbu t0, (t1), t2, t3
62# CHECK-ERROR: invalid operand for instruction
63
64cv.lh t0, (0), 0
65# CHECK-ERROR: operands must be register and register
66
67cv.lh 0, (t1), 0
68# CHECK-ERROR: invalid operand for instruction
69
70cv.lh 0, (0), t2
71# CHECK-ERROR: invalid operand for instruction
72
73cv.lh t0, (t1), -2049
74# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
75
76cv.lh t0, (t1), 2048
77# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
78
79cv.lh t0, (0), t1
80# CHECK-ERROR: operands must be register and register
81
82cv.lh t0, t1(0)
83# CHECK-ERROR: expected register
84
85cv.lh 0, (t1), t1
86# CHECK-ERROR: invalid operand for instruction
87
88cv.lh t0
89# CHECK-ERROR: too few operands for instruction
90
91cv.lh t0, (t1)
92# CHECK-ERROR: too few operands for instruction
93
94cv.lh t0, (t1), t2, t3
95# CHECK-ERROR: invalid operand for instruction
96
97cv.lhu t0, (0), 0
98# CHECK-ERROR: operands must be register and register
99
100cv.lhu 0, (t1), 0
101# CHECK-ERROR: invalid operand for instruction
102
103cv.lhu 0, 0(t1)
104# CHECK-ERROR: invalid operand for instruction
105
106cv.lhu t0, (t1), -2049
107# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
108
109cv.lhu t0, (t1), 2048
110# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
111
112cv.lhu t0, (0), t1
113# CHECK-ERROR: operands must be register and register
114
115cv.lhu t0, t1(0)
116# CHECK-ERROR: expected register
117
118cv.lhu 0, t0, t1
119# CHECK-ERROR: expected '(' or invalid operand
120
121cv.lhu t0
122# CHECK-ERROR: too few operands for instruction
123
124cv.lhu t0, (t1)
125# CHECK-ERROR: too few operands for instruction
126
127cv.lhu t0, (t1), t2, t3
128# CHECK-ERROR: invalid operand for instruction
129
130cv.lw t0, (0), 0
131# CHECK-ERROR: operands must be register and register
132
133cv.lw 0, (t1), 0
134# CHECK-ERROR: invalid operand for instruction
135
136cv.lw 0, (0), t2
137# CHECK-ERROR: invalid operand for instruction
138
139cv.lw t0, (t1), -2049
140# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
141
142cv.lw t0, (t1), 2048
143# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
144
145cv.lw t0, (0), t1
146# CHECK-ERROR: operands must be register and register
147
148cv.lw t0, t1(0)
149# CHECK-ERROR: expected register
150
151cv.lw 0, (t0), t1
152# CHECK-ERROR: invalid operand for instruction
153
154cv.lw t0
155# CHECK-ERROR: too few operands for instruction
156
157cv.lw t0, (t1)
158# CHECK-ERROR: too few operands for instruction
159
160cv.lw t0, (t1), t2, t3
161# CHECK-ERROR: invalid operand for instruction
162
163cv.sb t0, (0), 0
164# CHECK-ERROR: operands must be register and register
165
166cv.sb 0, (t0), 0
167# CHECK-ERROR: invalid operand for instruction
168
169cv.sb t0, 0(t1)
170# CHECK-ERROR: operands must be register and register
171
172cv.sb t0, (t1), 2048
173# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
174
175cv.sb t0, (0), t1
176# CHECK-ERROR: operands must be register and register
177
178cv.sb 0, (t1), t1
179# CHECK-ERROR: invalid operand for instruction
180
181cv.sb t0
182# CHECK-ERROR: too few operands for instruction
183
184cv.sh t0, (0), 0
185# CHECK-ERROR: operands must be register and register
186
187cv.sh 0, (t1), 0
188# CHECK-ERROR: invalid operand for instruction
189
190cv.sh t0, 0(t1)
191# CHECK-ERROR: operands must be register and register
192
193cv.sh t0, (t1), 2048
194# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
195
196cv.sh t0, (0), t1
197# CHECK-ERROR: operands must be register and register
198
199cv.sh 0, (t1), t1
200# CHECK-ERROR: invalid operand for instruction
201
202cv.sh t0
203# CHECK-ERROR: too few operands for instruction
204
205cv.sw t0, (0), 0
206# CHECK-ERROR: operands must be register and register
207
208cv.sw 0, (t1), 0
209# CHECK-ERROR: invalid operand for instruction
210
211cv.sw t0, 0(t1)
212# CHECK-ERROR: operands must be register and register
213
214cv.sw t0, (t1), 2048
215# CHECK-ERROR: operand must be a symbol with %lo/%pcrel_lo/%tprel_lo modifier or an integer in the range [-2048, 2047]
216
217cv.sw t0, (0), t1
218# CHECK-ERROR: operands must be register and register
219
220cv.sw 0, (t1), t1
221# CHECK-ERROR: invalid operand for instruction
222
223cv.sw t0
224# CHECK-ERROR: too few operands for instruction
225