Skip to content

Commit d02b18a

Browse files
committed
don't unset target features for aarch64
1 parent 6eaad40 commit d02b18a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

compiler/rustc_codegen_ssa/src/mir/naked_asm.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ fn enable_disable_target_features<'tcx>(
190190
for feature in features {
191191
writeln!(begin, ".arch_extension {}", feature.name).unwrap();
192192

193-
writeln!(end, ".arch_extension no{}", feature.name).unwrap();
193+
// aarch does not have the push/pop mechanism like riscv below.
194+
//
195+
// > The .arch_extension directive is effective until the end of the assembly block and is not propagated to subsequent code
196+
//
197+
// https://github.com/taiki-e/portable-atomic/blob/75a36c33b38c4c68f4095e95f106cfbedce9a914/src/imp/atomic128/aarch64.rs#L330
194198
}
195199
}
196200
Architecture::Riscv32 | Architecture::Riscv64 => {

0 commit comments

Comments
 (0)