Skip to content

Commit 17766f8

Browse files
committed
Fix AArch64 asm ui tests
1 parent 8716f27 commit 17766f8

File tree

2 files changed

+11
-19
lines changed

2 files changed

+11
-19
lines changed

src/test/ui/asm/aarch64/bad-reg.rs

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ fn main() {
2929
//~^ ERROR invalid register `sp`: the stack pointer cannot be used as an operand
3030
asm!("", in("xzr") foo);
3131
//~^ ERROR invalid register `xzr`: the zero register cannot be used as an operand
32-
asm!("", in("x18") foo);
33-
//~^ ERROR invalid register `x18`: x18 is used as a reserved register on some targets and cannot be used as an operand for inline asm
3432
asm!("", in("x19") foo);
3533
//~^ ERROR invalid register `x19`: x19 is used internally by LLVM and cannot be used as an operand for inline asm
3634

src/test/ui/asm/aarch64/bad-reg.stderr

+11-17
Original file line numberDiff line numberDiff line change
@@ -74,79 +74,73 @@ error: invalid register `xzr`: the zero register cannot be used as an operand fo
7474
LL | asm!("", in("xzr") foo);
7575
| ^^^^^^^^^^^^^
7676

77-
error: invalid register `x18`: x18 is used as a reserved register on some targets and cannot be used as an operand for inline asm
78-
--> $DIR/bad-reg.rs:32:18
79-
|
80-
LL | asm!("", in("x18") foo);
81-
| ^^^^^^^^^^^^^
82-
8377
error: invalid register `x19`: x19 is used internally by LLVM and cannot be used as an operand for inline asm
84-
--> $DIR/bad-reg.rs:34:18
78+
--> $DIR/bad-reg.rs:32:18
8579
|
8680
LL | asm!("", in("x19") foo);
8781
| ^^^^^^^^^^^^^
8882

8983
error: register class `preg` can only be used as a clobber, not as an input or output
90-
--> $DIR/bad-reg.rs:37:18
84+
--> $DIR/bad-reg.rs:35:18
9185
|
9286
LL | asm!("", in("p0") foo);
9387
| ^^^^^^^^^^^^
9488

9589
error: register class `preg` can only be used as a clobber, not as an input or output
96-
--> $DIR/bad-reg.rs:40:20
90+
--> $DIR/bad-reg.rs:38:20
9791
|
9892
LL | asm!("{}", in(preg) foo);
9993
| ^^^^^^^^^^^^
10094

10195
error: register class `preg` can only be used as a clobber, not as an input or output
102-
--> $DIR/bad-reg.rs:42:20
96+
--> $DIR/bad-reg.rs:40:20
10397
|
10498
LL | asm!("{}", out(preg) _);
10599
| ^^^^^^^^^^^
106100

107101
error: register `x0` conflicts with register `x0`
108-
--> $DIR/bad-reg.rs:48:32
102+
--> $DIR/bad-reg.rs:46:32
109103
|
110104
LL | asm!("", in("x0") foo, in("w0") bar);
111105
| ------------ ^^^^^^^^^^^^ register `x0`
112106
| |
113107
| register `x0`
114108

115109
error: register `x0` conflicts with register `x0`
116-
--> $DIR/bad-reg.rs:50:32
110+
--> $DIR/bad-reg.rs:48:32
117111
|
118112
LL | asm!("", in("x0") foo, out("x0") bar);
119113
| ------------ ^^^^^^^^^^^^^ register `x0`
120114
| |
121115
| register `x0`
122116
|
123117
help: use `lateout` instead of `out` to avoid conflict
124-
--> $DIR/bad-reg.rs:50:18
118+
--> $DIR/bad-reg.rs:48:18
125119
|
126120
LL | asm!("", in("x0") foo, out("x0") bar);
127121
| ^^^^^^^^^^^^
128122

129123
error: register `v0` conflicts with register `v0`
130-
--> $DIR/bad-reg.rs:53:32
124+
--> $DIR/bad-reg.rs:51:32
131125
|
132126
LL | asm!("", in("v0") foo, in("q0") bar);
133127
| ------------ ^^^^^^^^^^^^ register `v0`
134128
| |
135129
| register `v0`
136130

137131
error: register `v0` conflicts with register `v0`
138-
--> $DIR/bad-reg.rs:55:32
132+
--> $DIR/bad-reg.rs:53:32
139133
|
140134
LL | asm!("", in("v0") foo, out("q0") bar);
141135
| ------------ ^^^^^^^^^^^^^ register `v0`
142136
| |
143137
| register `v0`
144138
|
145139
help: use `lateout` instead of `out` to avoid conflict
146-
--> $DIR/bad-reg.rs:55:18
140+
--> $DIR/bad-reg.rs:53:18
147141
|
148142
LL | asm!("", in("v0") foo, out("q0") bar);
149143
| ^^^^^^^^^^^^
150144

151-
error: aborting due to 19 previous errors
145+
error: aborting due to 18 previous errors
152146

0 commit comments

Comments
 (0)