Skip to content

Commit 0dcd812

Browse files
committed
Re-bless asm tests for aarch64
1 parent 44a3a66 commit 0dcd812

File tree

7 files changed

+154
-152
lines changed

7 files changed

+154
-152
lines changed

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

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
error: invalid register class `foo`: unknown register class
2-
--> $DIR/bad-reg.rs:12:20
2+
--> $DIR/bad-reg.rs:14:20
33
|
44
LL | asm!("{}", in(foo) foo);
55
| ^^^^^^^^^^^
66

77
error: invalid register `foo`: unknown register
8-
--> $DIR/bad-reg.rs:14:18
8+
--> $DIR/bad-reg.rs:16:18
99
|
1010
LL | asm!("", in("foo") foo);
1111
| ^^^^^^^^^^^^^
1212

1313
error: invalid asm template modifier for this register class
14-
--> $DIR/bad-reg.rs:16:15
14+
--> $DIR/bad-reg.rs:18:15
1515
|
1616
LL | asm!("{:z}", in(reg) foo);
1717
| ^^^^ ----------- argument
@@ -21,7 +21,7 @@ LL | asm!("{:z}", in(reg) foo);
2121
= note: the `reg` register class supports the following template modifiers: `w`, `x`
2222

2323
error: invalid asm template modifier for this register class
24-
--> $DIR/bad-reg.rs:18:15
24+
--> $DIR/bad-reg.rs:20:15
2525
|
2626
LL | asm!("{:r}", in(vreg) foo);
2727
| ^^^^ ------------ argument
@@ -31,7 +31,7 @@ LL | asm!("{:r}", in(vreg) foo);
3131
= note: the `vreg` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, `v`
3232

3333
error: invalid asm template modifier for this register class
34-
--> $DIR/bad-reg.rs:20:15
34+
--> $DIR/bad-reg.rs:22:15
3535
|
3636
LL | asm!("{:r}", in(vreg_low16) foo);
3737
| ^^^^ ------------------ argument
@@ -41,103 +41,103 @@ LL | asm!("{:r}", in(vreg_low16) foo);
4141
= note: the `vreg_low16` register class supports the following template modifiers: `b`, `h`, `s`, `d`, `q`, `v`
4242

4343
error: asm template modifiers are not allowed for `const` arguments
44-
--> $DIR/bad-reg.rs:22:15
44+
--> $DIR/bad-reg.rs:24:15
4545
|
4646
LL | asm!("{:a}", const 0);
4747
| ^^^^ ------- argument
4848
| |
4949
| template modifier
5050

5151
error: asm template modifiers are not allowed for `sym` arguments
52-
--> $DIR/bad-reg.rs:24:15
52+
--> $DIR/bad-reg.rs:26:15
5353
|
5454
LL | asm!("{:a}", sym main);
5555
| ^^^^ -------- argument
5656
| |
5757
| template modifier
5858

5959
error: invalid register `x29`: the frame pointer cannot be used as an operand for inline asm
60-
--> $DIR/bad-reg.rs:26:18
60+
--> $DIR/bad-reg.rs:28:18
6161
|
6262
LL | asm!("", in("x29") foo);
6363
| ^^^^^^^^^^^^^
6464

6565
error: invalid register `sp`: the stack pointer cannot be used as an operand for inline asm
66-
--> $DIR/bad-reg.rs:28:18
66+
--> $DIR/bad-reg.rs:30:18
6767
|
6868
LL | asm!("", in("sp") foo);
6969
| ^^^^^^^^^^^^
7070

7171
error: invalid register `xzr`: the zero register cannot be used as an operand for inline asm
72-
--> $DIR/bad-reg.rs:30:18
72+
--> $DIR/bad-reg.rs:32:18
7373
|
7474
LL | asm!("", in("xzr") foo);
7575
| ^^^^^^^^^^^^^
7676

7777
error: invalid register `x19`: x19 is used internally by LLVM and cannot be used as an operand for inline asm
78-
--> $DIR/bad-reg.rs:32:18
78+
--> $DIR/bad-reg.rs:34:18
7979
|
8080
LL | asm!("", in("x19") foo);
8181
| ^^^^^^^^^^^^^
8282

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

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

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

101101
error: register `x0` conflicts with register `x0`
102-
--> $DIR/bad-reg.rs:46:32
102+
--> $DIR/bad-reg.rs:48:32
103103
|
104104
LL | asm!("", in("x0") foo, in("w0") bar);
105105
| ------------ ^^^^^^^^^^^^ register `x0`
106106
| |
107107
| register `x0`
108108

109109
error: register `x0` conflicts with register `x0`
110-
--> $DIR/bad-reg.rs:48:32
110+
--> $DIR/bad-reg.rs:50:32
111111
|
112112
LL | asm!("", in("x0") foo, out("x0") bar);
113113
| ------------ ^^^^^^^^^^^^^ register `x0`
114114
| |
115115
| register `x0`
116116
|
117117
help: use `lateout` instead of `out` to avoid conflict
118-
--> $DIR/bad-reg.rs:48:18
118+
--> $DIR/bad-reg.rs:50:18
119119
|
120120
LL | asm!("", in("x0") foo, out("x0") bar);
121121
| ^^^^^^^^^^^^
122122

123123
error: register `v0` conflicts with register `v0`
124-
--> $DIR/bad-reg.rs:51:32
124+
--> $DIR/bad-reg.rs:53:32
125125
|
126126
LL | asm!("", in("v0") foo, in("q0") bar);
127127
| ------------ ^^^^^^^^^^^^ register `v0`
128128
| |
129129
| register `v0`
130130

131131
error: register `v0` conflicts with register `v0`
132-
--> $DIR/bad-reg.rs:53:32
132+
--> $DIR/bad-reg.rs:55:32
133133
|
134134
LL | asm!("", in("v0") foo, out("q0") bar);
135135
| ------------ ^^^^^^^^^^^^^ register `v0`
136136
| |
137137
| register `v0`
138138
|
139139
help: use `lateout` instead of `out` to avoid conflict
140-
--> $DIR/bad-reg.rs:53:18
140+
--> $DIR/bad-reg.rs:55:18
141141
|
142142
LL | asm!("", in("v0") foo, out("q0") bar);
143143
| ^^^^^^^^^^^^

src/test/ui/asm/aarch64/duplicate-options.fixed

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
// only-aarch64
22
// run-rustfix
33

4+
use std::arch::asm;
5+
46
fn main() {
57
unsafe {
68
asm!("", options(nomem, ));
@@ -17,8 +19,8 @@ fn main() {
1719
"",
1820
options(nomem, noreturn),
1921
options(preserves_flags, ), //~ ERROR the `noreturn` option was already provided
20-
options( nostack), //~ ERROR the `nomem` option was already provided
21-
options(), //~ ERROR the `noreturn` option was already provided
22+
options( nostack), //~ ERROR the `nomem` option was already provided
23+
options(), //~ ERROR the `noreturn` option was already provided
2224
);
2325
}
2426
}

0 commit comments

Comments
 (0)