Rollup merge of #138346 - folkertdev:naked-asm-windows-endef, r=ChrisDenton

naked functions: on windows emit `.endef` without the symbol name

tracking issue: https://github.com/rust-lang/rust/issues/90957
fixes https://github.com/rust-lang/rust/issues/138320

The `.endef` directive does not take the name as an argument. Apparently the LLVM x86_64 parser does accept this, but on i686 it's rejected. In general `i686` does some special name mangling stuff, so it's good to include it in the naked function tests.

r? ````@ChrisDenton```` (because windows)
This commit is contained in:
Matthias Krüger 2025-03-13 10:58:23 +01:00 committed by GitHub
commit 1827ffdef0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 49 additions and 25 deletions

View file

@ -245,7 +245,7 @@ fn prefix_and_suffix<'tcx>(
writeln!(begin, ".def {asm_name}").unwrap();
writeln!(begin, ".scl 2").unwrap();
writeln!(begin, ".type 32").unwrap();
writeln!(begin, ".endef {asm_name}").unwrap();
writeln!(begin, ".endef").unwrap();
writeln!(begin, "{asm_name}:").unwrap();
writeln!(end).unwrap();