File tree 2 files changed +20
-2
lines changed
2 files changed +20
-2
lines changed Original file line number Diff line number Diff line change @@ -612,6 +612,15 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
612
612
generated_asm. push_str ( ".att_syntax\n " ) ;
613
613
}
614
614
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
+
615
624
// The actual inline asm
616
625
for piece in self . template {
617
626
match piece {
@@ -679,6 +688,15 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
679
688
}
680
689
generated_asm. push ( '\n' ) ;
681
690
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
+
682
700
if is_x86 && self . options . contains ( InlineAsmOptions :: ATT_SYNTAX ) {
683
701
generated_asm. push_str ( ".intel_syntax noprefix\n " ) ;
684
702
}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ pub(crate) fn codegen_aarch64_llvm_intrinsic_call<'tcx>(
21
21
fx. bcx . ins ( ) . fence ( ) ;
22
22
}
23
23
24
- "llvm.aarch64.neon.ld1x4.v16i8.p0i8 " => {
24
+ "llvm.aarch64.neon.ld1x4.v16i8.p0 " => {
25
25
intrinsic_args ! ( fx, args => ( ptr) ; intrinsic) ;
26
26
27
27
let ptr = ptr. load_scalar ( fx) ;
@@ -253,7 +253,7 @@ pub(crate) fn codegen_aarch64_llvm_intrinsic_call<'tcx>(
253
253
}
254
254
let res = CValue :: by_val (
255
255
fx. bcx . ins ( ) . uextend ( types:: I32 , res_val) ,
256
- fx. layout_of ( fx. tcx . types . u32 ) ,
256
+ fx. layout_of ( fx. tcx . types . i32 ) ,
257
257
) ;
258
258
ret. write_cvalue ( fx, res) ;
259
259
}
You can’t perform that action at this time.
0 commit comments