about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-03-13 10:58:23 +0100
committerGitHub <noreply@github.com>2025-03-13 10:58:23 +0100
commit1827ffdef07efe8d860f4dba1ec1343db639df53 (patch)
tree296058ebb9f3172ee298426530f3068f1d9b357f /compiler
parent5ae93cf5b47eb329c726d411015939c21fcb6a5b (diff)
parentc0957ef45ade6a602dccaba0da7a37c0c7ec6aa6 (diff)
downloadrust-1827ffdef07efe8d860f4dba1ec1343db639df53.tar.gz
rust-1827ffdef07efe8d860f4dba1ec1343db639df53.zip
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)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_codegen_ssa/src/mir/naked_asm.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_codegen_ssa/src/mir/naked_asm.rs b/compiler/rustc_codegen_ssa/src/mir/naked_asm.rs
index 96d1ab018f6..676cd6d2477 100644
--- a/compiler/rustc_codegen_ssa/src/mir/naked_asm.rs
+++ b/compiler/rustc_codegen_ssa/src/mir/naked_asm.rs
@@ -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();