Skip to content

Commit 346afc7

Browse files
committed
Add UI test to verify invalid loads are not generated
1 parent fe658e1 commit 346afc7

4 files changed

+673
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
error: invalid operand for instruction
2+
--> $DIR/riscv32e-registers.rs:43:11
3+
|
4+
LL | asm!("li x16, 0");
5+
| ^
6+
|
7+
note: instantiated into assembly here
8+
--> <inline asm>:1:5
9+
|
10+
LL | li x16, 0
11+
| ^
12+
13+
error: invalid operand for instruction
14+
--> $DIR/riscv32e-registers.rs:46:11
15+
|
16+
LL | asm!("li x17, 0");
17+
| ^
18+
|
19+
note: instantiated into assembly here
20+
--> <inline asm>:1:5
21+
|
22+
LL | li x17, 0
23+
| ^
24+
25+
error: invalid operand for instruction
26+
--> $DIR/riscv32e-registers.rs:49:11
27+
|
28+
LL | asm!("li x18, 0");
29+
| ^
30+
|
31+
note: instantiated into assembly here
32+
--> <inline asm>:1:5
33+
|
34+
LL | li x18, 0
35+
| ^
36+
37+
error: invalid operand for instruction
38+
--> $DIR/riscv32e-registers.rs:52:11
39+
|
40+
LL | asm!("li x19, 0");
41+
| ^
42+
|
43+
note: instantiated into assembly here
44+
--> <inline asm>:1:5
45+
|
46+
LL | li x19, 0
47+
| ^
48+
49+
error: invalid operand for instruction
50+
--> $DIR/riscv32e-registers.rs:55:11
51+
|
52+
LL | asm!("li x20, 0");
53+
| ^
54+
|
55+
note: instantiated into assembly here
56+
--> <inline asm>:1:5
57+
|
58+
LL | li x20, 0
59+
| ^
60+
61+
error: invalid operand for instruction
62+
--> $DIR/riscv32e-registers.rs:58:11
63+
|
64+
LL | asm!("li x21, 0");
65+
| ^
66+
|
67+
note: instantiated into assembly here
68+
--> <inline asm>:1:5
69+
|
70+
LL | li x21, 0
71+
| ^
72+
73+
error: invalid operand for instruction
74+
--> $DIR/riscv32e-registers.rs:61:11
75+
|
76+
LL | asm!("li x22, 0");
77+
| ^
78+
|
79+
note: instantiated into assembly here
80+
--> <inline asm>:1:5
81+
|
82+
LL | li x22, 0
83+
| ^
84+
85+
error: invalid operand for instruction
86+
--> $DIR/riscv32e-registers.rs:64:11
87+
|
88+
LL | asm!("li x23, 0");
89+
| ^
90+
|
91+
note: instantiated into assembly here
92+
--> <inline asm>:1:5
93+
|
94+
LL | li x23, 0
95+
| ^
96+
97+
error: invalid operand for instruction
98+
--> $DIR/riscv32e-registers.rs:67:11
99+
|
100+
LL | asm!("li x24, 0");
101+
| ^
102+
|
103+
note: instantiated into assembly here
104+
--> <inline asm>:1:5
105+
|
106+
LL | li x24, 0
107+
| ^
108+
109+
error: invalid operand for instruction
110+
--> $DIR/riscv32e-registers.rs:70:11
111+
|
112+
LL | asm!("li x25, 0");
113+
| ^
114+
|
115+
note: instantiated into assembly here
116+
--> <inline asm>:1:5
117+
|
118+
LL | li x25, 0
119+
| ^
120+
121+
error: invalid operand for instruction
122+
--> $DIR/riscv32e-registers.rs:73:11
123+
|
124+
LL | asm!("li x26, 0");
125+
| ^
126+
|
127+
note: instantiated into assembly here
128+
--> <inline asm>:1:5
129+
|
130+
LL | li x26, 0
131+
| ^
132+
133+
error: invalid operand for instruction
134+
--> $DIR/riscv32e-registers.rs:76:11
135+
|
136+
LL | asm!("li x27, 0");
137+
| ^
138+
|
139+
note: instantiated into assembly here
140+
--> <inline asm>:1:5
141+
|
142+
LL | li x27, 0
143+
| ^
144+
145+
error: invalid operand for instruction
146+
--> $DIR/riscv32e-registers.rs:79:11
147+
|
148+
LL | asm!("li x28, 0");
149+
| ^
150+
|
151+
note: instantiated into assembly here
152+
--> <inline asm>:1:5
153+
|
154+
LL | li x28, 0
155+
| ^
156+
157+
error: invalid operand for instruction
158+
--> $DIR/riscv32e-registers.rs:82:11
159+
|
160+
LL | asm!("li x29, 0");
161+
| ^
162+
|
163+
note: instantiated into assembly here
164+
--> <inline asm>:1:5
165+
|
166+
LL | li x29, 0
167+
| ^
168+
169+
error: invalid operand for instruction
170+
--> $DIR/riscv32e-registers.rs:85:11
171+
|
172+
LL | asm!("li x30, 0");
173+
| ^
174+
|
175+
note: instantiated into assembly here
176+
--> <inline asm>:1:5
177+
|
178+
LL | li x30, 0
179+
| ^
180+
181+
error: invalid operand for instruction
182+
--> $DIR/riscv32e-registers.rs:88:11
183+
|
184+
LL | asm!("li x31, 0");
185+
| ^
186+
|
187+
note: instantiated into assembly here
188+
--> <inline asm>:1:5
189+
|
190+
LL | li x31, 0
191+
| ^
192+
193+
error: aborting due to 16 previous errors
194+
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,194 @@
1+
error: invalid operand for instruction
2+
--> $DIR/riscv32e-registers.rs:43:11
3+
|
4+
LL | asm!("li x16, 0");
5+
| ^
6+
|
7+
note: instantiated into assembly here
8+
--> <inline asm>:1:5
9+
|
10+
LL | li x16, 0
11+
| ^
12+
13+
error: invalid operand for instruction
14+
--> $DIR/riscv32e-registers.rs:46:11
15+
|
16+
LL | asm!("li x17, 0");
17+
| ^
18+
|
19+
note: instantiated into assembly here
20+
--> <inline asm>:1:5
21+
|
22+
LL | li x17, 0
23+
| ^
24+
25+
error: invalid operand for instruction
26+
--> $DIR/riscv32e-registers.rs:49:11
27+
|
28+
LL | asm!("li x18, 0");
29+
| ^
30+
|
31+
note: instantiated into assembly here
32+
--> <inline asm>:1:5
33+
|
34+
LL | li x18, 0
35+
| ^
36+
37+
error: invalid operand for instruction
38+
--> $DIR/riscv32e-registers.rs:52:11
39+
|
40+
LL | asm!("li x19, 0");
41+
| ^
42+
|
43+
note: instantiated into assembly here
44+
--> <inline asm>:1:5
45+
|
46+
LL | li x19, 0
47+
| ^
48+
49+
error: invalid operand for instruction
50+
--> $DIR/riscv32e-registers.rs:55:11
51+
|
52+
LL | asm!("li x20, 0");
53+
| ^
54+
|
55+
note: instantiated into assembly here
56+
--> <inline asm>:1:5
57+
|
58+
LL | li x20, 0
59+
| ^
60+
61+
error: invalid operand for instruction
62+
--> $DIR/riscv32e-registers.rs:58:11
63+
|
64+
LL | asm!("li x21, 0");
65+
| ^
66+
|
67+
note: instantiated into assembly here
68+
--> <inline asm>:1:5
69+
|
70+
LL | li x21, 0
71+
| ^
72+
73+
error: invalid operand for instruction
74+
--> $DIR/riscv32e-registers.rs:61:11
75+
|
76+
LL | asm!("li x22, 0");
77+
| ^
78+
|
79+
note: instantiated into assembly here
80+
--> <inline asm>:1:5
81+
|
82+
LL | li x22, 0
83+
| ^
84+
85+
error: invalid operand for instruction
86+
--> $DIR/riscv32e-registers.rs:64:11
87+
|
88+
LL | asm!("li x23, 0");
89+
| ^
90+
|
91+
note: instantiated into assembly here
92+
--> <inline asm>:1:5
93+
|
94+
LL | li x23, 0
95+
| ^
96+
97+
error: invalid operand for instruction
98+
--> $DIR/riscv32e-registers.rs:67:11
99+
|
100+
LL | asm!("li x24, 0");
101+
| ^
102+
|
103+
note: instantiated into assembly here
104+
--> <inline asm>:1:5
105+
|
106+
LL | li x24, 0
107+
| ^
108+
109+
error: invalid operand for instruction
110+
--> $DIR/riscv32e-registers.rs:70:11
111+
|
112+
LL | asm!("li x25, 0");
113+
| ^
114+
|
115+
note: instantiated into assembly here
116+
--> <inline asm>:1:5
117+
|
118+
LL | li x25, 0
119+
| ^
120+
121+
error: invalid operand for instruction
122+
--> $DIR/riscv32e-registers.rs:73:11
123+
|
124+
LL | asm!("li x26, 0");
125+
| ^
126+
|
127+
note: instantiated into assembly here
128+
--> <inline asm>:1:5
129+
|
130+
LL | li x26, 0
131+
| ^
132+
133+
error: invalid operand for instruction
134+
--> $DIR/riscv32e-registers.rs:76:11
135+
|
136+
LL | asm!("li x27, 0");
137+
| ^
138+
|
139+
note: instantiated into assembly here
140+
--> <inline asm>:1:5
141+
|
142+
LL | li x27, 0
143+
| ^
144+
145+
error: invalid operand for instruction
146+
--> $DIR/riscv32e-registers.rs:79:11
147+
|
148+
LL | asm!("li x28, 0");
149+
| ^
150+
|
151+
note: instantiated into assembly here
152+
--> <inline asm>:1:5
153+
|
154+
LL | li x28, 0
155+
| ^
156+
157+
error: invalid operand for instruction
158+
--> $DIR/riscv32e-registers.rs:82:11
159+
|
160+
LL | asm!("li x29, 0");
161+
| ^
162+
|
163+
note: instantiated into assembly here
164+
--> <inline asm>:1:5
165+
|
166+
LL | li x29, 0
167+
| ^
168+
169+
error: invalid operand for instruction
170+
--> $DIR/riscv32e-registers.rs:85:11
171+
|
172+
LL | asm!("li x30, 0");
173+
| ^
174+
|
175+
note: instantiated into assembly here
176+
--> <inline asm>:1:5
177+
|
178+
LL | li x30, 0
179+
| ^
180+
181+
error: invalid operand for instruction
182+
--> $DIR/riscv32e-registers.rs:88:11
183+
|
184+
LL | asm!("li x31, 0");
185+
| ^
186+
|
187+
note: instantiated into assembly here
188+
--> <inline asm>:1:5
189+
|
190+
LL | li x31, 0
191+
| ^
192+
193+
error: aborting due to 16 previous errors
194+

0 commit comments

Comments
 (0)