Skip to content

Commit 2cc81ba

Browse files
committed
tests/ui/asm/inline-syntax: adapt for LLVM 18
1 parent 25b706c commit 2cc81ba

4 files changed

+116
-14
lines changed

tests/ui/asm/inline-syntax.arm.stderr

+6-6
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ LL | .intel_syntax noprefix
1313
| ^
1414

1515
error: unknown directive
16-
--> $DIR/inline-syntax.rs:32:15
16+
--> $DIR/inline-syntax.rs:38:15
1717
|
1818
LL | asm!(".intel_syntax noprefix", "nop");
1919
| ^
@@ -25,7 +25,7 @@ LL | .intel_syntax noprefix
2525
| ^
2626

2727
error: unknown directive
28-
--> $DIR/inline-syntax.rs:35:15
28+
--> $DIR/inline-syntax.rs:42:15
2929
|
3030
LL | asm!(".intel_syntax aaa noprefix", "nop");
3131
| ^
@@ -37,7 +37,7 @@ LL | .intel_syntax aaa noprefix
3737
| ^
3838

3939
error: unknown directive
40-
--> $DIR/inline-syntax.rs:38:15
40+
--> $DIR/inline-syntax.rs:46:15
4141
|
4242
LL | asm!(".att_syntax noprefix", "nop");
4343
| ^
@@ -49,7 +49,7 @@ LL | .att_syntax noprefix
4949
| ^
5050

5151
error: unknown directive
52-
--> $DIR/inline-syntax.rs:41:15
52+
--> $DIR/inline-syntax.rs:50:15
5353
|
5454
LL | asm!(".att_syntax bbb noprefix", "nop");
5555
| ^
@@ -61,7 +61,7 @@ LL | .att_syntax bbb noprefix
6161
| ^
6262

6363
error: unknown directive
64-
--> $DIR/inline-syntax.rs:44:15
64+
--> $DIR/inline-syntax.rs:54:15
6565
|
6666
LL | asm!(".intel_syntax noprefix; nop");
6767
| ^
@@ -73,7 +73,7 @@ LL | .intel_syntax noprefix; nop
7373
| ^
7474

7575
error: unknown directive
76-
--> $DIR/inline-syntax.rs:50:13
76+
--> $DIR/inline-syntax.rs:61:13
7777
|
7878
LL | .intel_syntax noprefix
7979
| ^
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
error: unknown directive
2+
|
3+
note: instantiated into assembly here
4+
--> <inline asm>:1:1
5+
|
6+
LL | .intel_syntax noprefix
7+
| ^
8+
9+
error: unknown directive
10+
|
11+
note: instantiated into assembly here
12+
--> <inline asm>:1:1
13+
|
14+
LL | .intel_syntax noprefix
15+
| ^
16+
17+
error: unknown directive
18+
--> $DIR/inline-syntax.rs:38:15
19+
|
20+
LL | asm!(".intel_syntax noprefix", "nop");
21+
| ^
22+
|
23+
note: instantiated into assembly here
24+
--> <inline asm>:1:2
25+
|
26+
LL | .intel_syntax noprefix
27+
| ^
28+
29+
error: unknown directive
30+
--> $DIR/inline-syntax.rs:42:15
31+
|
32+
LL | asm!(".intel_syntax aaa noprefix", "nop");
33+
| ^
34+
|
35+
note: instantiated into assembly here
36+
--> <inline asm>:1:2
37+
|
38+
LL | .intel_syntax aaa noprefix
39+
| ^
40+
41+
error: unknown directive
42+
--> $DIR/inline-syntax.rs:46:15
43+
|
44+
LL | asm!(".att_syntax noprefix", "nop");
45+
| ^
46+
|
47+
note: instantiated into assembly here
48+
--> <inline asm>:1:2
49+
|
50+
LL | .att_syntax noprefix
51+
| ^
52+
53+
error: unknown directive
54+
--> $DIR/inline-syntax.rs:50:15
55+
|
56+
LL | asm!(".att_syntax bbb noprefix", "nop");
57+
| ^
58+
|
59+
note: instantiated into assembly here
60+
--> <inline asm>:1:2
61+
|
62+
LL | .att_syntax bbb noprefix
63+
| ^
64+
65+
error: unknown directive
66+
--> $DIR/inline-syntax.rs:54:15
67+
|
68+
LL | asm!(".intel_syntax noprefix; nop");
69+
| ^
70+
|
71+
note: instantiated into assembly here
72+
--> <inline asm>:1:2
73+
|
74+
LL | .intel_syntax noprefix; nop
75+
| ^
76+
77+
error: unknown directive
78+
--> $DIR/inline-syntax.rs:61:13
79+
|
80+
LL | .intel_syntax noprefix
81+
| ^
82+
|
83+
note: instantiated into assembly here
84+
--> <inline asm>:2:13
85+
|
86+
LL | .intel_syntax noprefix
87+
| ^
88+
89+
error: aborting due to 8 previous errors
90+

tests/ui/asm/inline-syntax.rs

+13-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// revisions: x86_64 arm
1+
// revisions: x86_64 arm arm_llvm_18
22
//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu
33
//[x86_64] check-pass
44
//[x86_64] needs-llvm-components: x86
@@ -8,6 +8,12 @@
88
//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf
99
//[arm] build-fail
1010
//[arm] needs-llvm-components: arm
11+
//[arm] ignore-llvm-version: 18 - 99
12+
// Newer LLVM produces extra error notes.
13+
//[arm_llvm_18] compile-flags: --target armv7-unknown-linux-gnueabihf
14+
//[arm_llvm_18] build-fail
15+
//[arm_llvm_18] needs-llvm-components: arm
16+
//[arm_llvm_18] min-llvm-version: 18
1117
// needs-asm-support
1218

1319
#![feature(no_core, lang_items, rustc_attrs)]
@@ -32,18 +38,23 @@ pub fn main() {
3238
asm!(".intel_syntax noprefix", "nop");
3339
//[x86_64]~^ WARN avoid using `.intel_syntax`
3440
//[arm]~^^ ERROR unknown directive
41+
//[arm_llvm_18]~^^^ ERROR unknown directive
3542
asm!(".intel_syntax aaa noprefix", "nop");
3643
//[x86_64]~^ WARN avoid using `.intel_syntax`
3744
//[arm]~^^ ERROR unknown directive
45+
//[arm_llvm_18]~^^^ ERROR unknown directive
3846
asm!(".att_syntax noprefix", "nop");
3947
//[x86_64]~^ WARN avoid using `.att_syntax`
4048
//[arm]~^^ ERROR unknown directive
49+
//[arm_llvm_18]~^^^ ERROR unknown directive
4150
asm!(".att_syntax bbb noprefix", "nop");
4251
//[x86_64]~^ WARN avoid using `.att_syntax`
4352
//[arm]~^^ ERROR unknown directive
53+
//[arm_llvm_18]~^^^ ERROR unknown directive
4454
asm!(".intel_syntax noprefix; nop");
4555
//[x86_64]~^ WARN avoid using `.intel_syntax`
4656
//[arm]~^^ ERROR unknown directive
57+
//[arm_llvm_18]~^^^ ERROR unknown directive
4758

4859
asm!(
4960
r"
@@ -52,6 +63,7 @@ pub fn main() {
5263
);
5364
//[x86_64]~^^^ WARN avoid using `.intel_syntax`
5465
//[arm]~^^^^ ERROR unknown directive
66+
//[arm_llvm_18]~^^^^^ ERROR unknown directive
5567
}
5668
}
5769

tests/ui/asm/inline-syntax.x86_64.stderr

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
warning: avoid using `.intel_syntax`, Intel syntax is the default
2-
--> $DIR/inline-syntax.rs:58:14
2+
--> $DIR/inline-syntax.rs:70:14
33
|
44
LL | global_asm!(".intel_syntax noprefix", "nop");
55
| ^^^^^^^^^^^^^^^^^^^^^^
66
|
77
= note: `#[warn(bad_asm_style)]` on by default
88

99
warning: avoid using `.intel_syntax`, Intel syntax is the default
10-
--> $DIR/inline-syntax.rs:32:15
10+
--> $DIR/inline-syntax.rs:38:15
1111
|
1212
LL | asm!(".intel_syntax noprefix", "nop");
1313
| ^^^^^^^^^^^^^^^^^^^^^^
1414

1515
warning: avoid using `.intel_syntax`, Intel syntax is the default
16-
--> $DIR/inline-syntax.rs:35:15
16+
--> $DIR/inline-syntax.rs:42:15
1717
|
1818
LL | asm!(".intel_syntax aaa noprefix", "nop");
1919
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
2020

2121
warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
22-
--> $DIR/inline-syntax.rs:38:15
22+
--> $DIR/inline-syntax.rs:46:15
2323
|
2424
LL | asm!(".att_syntax noprefix", "nop");
2525
| ^^^^^^^^^^^^^^^^^^^^
2626

2727
warning: avoid using `.att_syntax`, prefer using `options(att_syntax)` instead
28-
--> $DIR/inline-syntax.rs:41:15
28+
--> $DIR/inline-syntax.rs:50:15
2929
|
3030
LL | asm!(".att_syntax bbb noprefix", "nop");
3131
| ^^^^^^^^^^^^^^^^^^^^^^^^
3232

3333
warning: avoid using `.intel_syntax`, Intel syntax is the default
34-
--> $DIR/inline-syntax.rs:44:15
34+
--> $DIR/inline-syntax.rs:54:15
3535
|
3636
LL | asm!(".intel_syntax noprefix; nop");
3737
| ^^^^^^^^^^^^^^^^^^^^^^
3838

3939
warning: avoid using `.intel_syntax`, Intel syntax is the default
40-
--> $DIR/inline-syntax.rs:50:13
40+
--> $DIR/inline-syntax.rs:61:13
4141
|
4242
LL | .intel_syntax noprefix
4343
| ^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)