This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -612,6 +612,15 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
612612 generated_asm. push_str ( ".att_syntax\n " ) ;
613613 }
614614
615+ if self . arch == InlineAsmArch :: AArch64 {
616+ for feature in & self . tcx . codegen_fn_attrs ( self . enclosing_def_id ) . target_features {
617+ if feature. name == sym:: neon {
618+ continue ;
619+ }
620+ writeln ! ( generated_asm, ".arch_extension {}" , feature. name) . unwrap ( ) ;
621+ }
622+ }
623+
615624 // The actual inline asm
616625 for piece in self . template {
617626 match piece {
@@ -679,6 +688,15 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
679688 }
680689 generated_asm. push ( '\n' ) ;
681690
691+ if self . arch == InlineAsmArch :: AArch64 {
692+ for feature in & self . tcx . codegen_fn_attrs ( self . enclosing_def_id ) . target_features {
693+ if feature. name == sym:: neon {
694+ continue ;
695+ }
696+ writeln ! ( generated_asm, ".arch_extension no{}" , feature. name) . unwrap ( ) ;
697+ }
698+ }
699+
682700 if is_x86 && self . options . contains ( InlineAsmOptions :: ATT_SYNTAX ) {
683701 generated_asm. push_str ( ".intel_syntax noprefix\n " ) ;
684702 }
You can’t perform that action at this time.
0 commit comments