11//@ add-minicore
2- //@ revisions: linux win_x86 win_i686 macos thumb
2+ //@ revisions: linux win_x86_msvc win_x86_gnu win_i686_gnu macos thumb
33//
44//@[linux] compile-flags: --target x86_64-unknown-linux-gnu
55//@[linux] needs-llvm-components: x86
6- //@[win_x86] compile-flags: --target x86_64-pc-windows-gnu
7- //@[win_x86] needs-llvm-components: x86
8- //@[win_i686] compile-flags: --target i686-pc-windows-gnu
9- //@[win_i686] needs-llvm-components: x86
6+ //@[win_x86_gnu] compile-flags: --target x86_64-pc-windows-gnu
7+ //@[win_x86_gnu] needs-llvm-components: x86
8+ //@[win_x86_msvc] compile-flags: --target x86_64-pc-windows-msvc
9+ //@[win_x86_msvc] needs-llvm-components: x86
10+ //@[win_i686_gnu] compile-flags: --target i686-pc-windows-gnu
11+ //@[win_i686_gnu] needs-llvm-components: x86
1012//@[macos] compile-flags: --target aarch64-apple-darwin
1113//@[macos] needs-llvm-components: aarch64
1214//@[thumb] compile-flags: --target thumbv7em-none-eabi
@@ -23,8 +25,9 @@ use minicore::*;
2325//
2426// linux: .pushsection .text.naked_empty,\22ax\22, @progbits
2527// macos: .pushsection __TEXT,__text,regular,pure_instructions
26- // win_x86: .pushsection .text.naked_empty,\22xr\22
27- // win_i686: .pushsection .text._naked_empty,\22xr\22
28+ // win_x86_msvc: .pushsection .text$naked_empty,\22xr\22
29+ // win_x86_gnu-NOT: .pushsection
30+ // win_i686_gnu-NOT: .pushsection
2831// thumb: .pushsection .text.naked_empty,\22ax\22, %progbits
2932//
3033// CHECK: .balign 4
@@ -37,12 +40,12 @@ use minicore::*;
3740//
3841// linux: .type naked_empty, @function
3942//
40- // win_x86 : .def naked_empty
41- // win_i686 : .def _naked_empty
43+ // win_x86_msvc,win_x86_gnu : .def naked_empty
44+ // win_i686_gnu : .def _naked_empty
4245//
43- // win_x86,win_i686 : .scl 2
44- // win_x86,win_i686 : .type 32
45- // win_x86,win_i686 : .endef
46+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .scl 2
47+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .type 32
48+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .endef
4649//
4750// thumb: .type naked_empty, %function
4851// thumb: .thumb
@@ -53,7 +56,8 @@ use minicore::*;
5356// linux,macos,win: ret
5457// thumb: bx lr
5558//
56- // CHECK: .popsection
59+ // linux,windows,win_x86_msvc,thumb: .popsection
60+ // win_x86_gnu-NOT,win_i686_gnu-NOT: .popsection
5761//
5862// thumb: .thumb
5963//
@@ -73,8 +77,9 @@ pub extern "C" fn naked_empty() {
7377//
7478// linux: .pushsection .text.naked_with_args_and_return,\22ax\22, @progbits
7579// macos: .pushsection __TEXT,__text,regular,pure_instructions
76- // win_x86: .pushsection .text.naked_with_args_and_return,\22xr\22
77- // win_i686: .pushsection .text._naked_with_args_and_return,\22xr\22
80+ // win_x86_msvc: .pushsection .text$naked_with_args_and_return,\22xr\22
81+ // win_x86_gnu-NOT: .pushsection
82+ // win_i686_gnu-NOT: .pushsection
7883// thumb: .pushsection .text.naked_with_args_and_return,\22ax\22, %progbits
7984//
8085// CHECK: .balign 4
@@ -87,27 +92,28 @@ pub extern "C" fn naked_empty() {
8792//
8893// linux: .type naked_with_args_and_return, @function
8994//
90- // win_x86 : .def naked_with_args_and_return
91- // win_i686 : .def _naked_with_args_and_return
95+ // win_x86_msvc,win_x86_gnu : .def naked_with_args_and_return
96+ // win_i686_gnu : .def _naked_with_args_and_return
9297//
93- // win_x86,win_i686 : .scl 2
94- // win_x86,win_i686 : .type 32
95- // win_x86,win_i686 : .endef
98+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .scl 2
99+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .type 32
100+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .endef
96101//
97102// thumb: .type naked_with_args_and_return, %function
98103// thumb: .thumb
99104// thumb: .thumb_func
100105//
101106// CHECK-LABEL: naked_with_args_and_return:
102107//
103- // linux, win_x86,win_i686 : lea rax, [rdi + rsi]
108+ // linux,win_x86_msvc,win_x86_gnu,win_i686_gnu : lea rax, [rdi + rsi]
104109// macos: add x0, x0, x1
105110// thumb: adds r0, r0, r1
106111//
107112// linux,macos,win: ret
108113// thumb: bx lr
109114//
110- // CHECK: .popsection
115+ // linux,windows,win_x86_msvc,thumb: .popsection
116+ // win_x86_gnu-NOT,win_i686_gnu-NOT: .popsection
111117//
112118// thumb: .thumb
113119//
@@ -134,7 +140,7 @@ pub extern "C" fn naked_with_args_and_return(a: isize, b: isize) -> isize {
134140
135141// linux: .pushsection .text.some_different_name,\22ax\22, @progbits
136142// macos: .pushsection .text.some_different_name,regular,pure_instructions
137- // win_x86,win_i686 : .pushsection .text.some_different_name,\22xr\22
143+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .pushsection .text.some_different_name,\22xr\22
138144// thumb: .pushsection .text.some_different_name,\22ax\22, %progbits
139145// CHECK-LABEL: test_link_section:
140146#[ no_mangle]
@@ -148,15 +154,15 @@ pub extern "C" fn test_link_section() {
148154 naked_asm ! ( "bx lr" ) ;
149155}
150156
151- // win_x86 : .def fastcall_cc
152- // win_i686 : .def @fastcall_cc@4
157+ // win_x86_msvc,win_x86_gnu : .def fastcall_cc
158+ // win_i686_gnu : .def @fastcall_cc@4
153159//
154- // win_x86,win_i686 : .scl 2
155- // win_x86,win_i686 : .type 32
156- // win_x86,win_i686 : .endef
160+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .scl 2
161+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .type 32
162+ // win_x86_msvc,win_x86_gnu,win_i686_gnu : .endef
157163//
158- // win_x86 -LABEL: fastcall_cc:
159- // win_i686 -LABEL: @fastcall_cc@4:
164+ // win_x86_msvc-LABEL,win_x86_gnu -LABEL: fastcall_cc:
165+ // win_i686_gnu -LABEL: @fastcall_cc@4:
160166#[ cfg( target_os = "windows" ) ]
161167#[ no_mangle]
162168#[ unsafe( naked) ]
0 commit comments