@@ -916,25 +916,26 @@ pub(crate) fn codegen_call_with_unwind_action(
916916pub ( crate ) fn lib_call_arg_param ( tcx : TyCtxt < ' _ > , ty : Type , is_signed : bool ) -> AbiParam {
917917 let param = AbiParam :: new ( ty) ;
918918 if ty. is_int ( ) && u64:: from ( ty. bits ( ) ) < tcx. data_layout . pointer_size ( ) . bits ( ) {
919- match ( & tcx. sess . target . arch , tcx. sess . target . vendor . as_ref ( ) ) {
920- ( Arch :: X86_64 , _) | ( Arch :: AArch64 , "apple" ) => match ( ty, is_signed) {
919+ match & tcx. sess . target . arch {
920+ Arch :: X86_64 | Arch :: AArch64 if tcx. sess . target . is_like_darwin => match ( ty, is_signed)
921+ {
921922 ( types:: I8 | types:: I16 , true ) => param. sext ( ) ,
922923 ( types:: I8 | types:: I16 , false ) => param. uext ( ) ,
923924 _ => param,
924925 } ,
925- ( Arch :: AArch64 , _ ) => param,
926- ( Arch :: RiscV64 , _ ) => match ( ty, is_signed) {
926+ Arch :: AArch64 => param,
927+ Arch :: RiscV64 => match ( ty, is_signed) {
927928 ( types:: I32 , _) | ( _, true ) => param. sext ( ) ,
928929 _ => param. uext ( ) ,
929930 } ,
930- ( Arch :: S390x , _ ) => {
931+ Arch :: S390x => {
931932 if is_signed {
932933 param. sext ( )
933934 } else {
934935 param. uext ( )
935936 }
936937 }
937- ( arch, _ ) => unimplemented ! ( "{arch:?}" ) ,
938+ arch => unimplemented ! ( "{arch:?}" ) ,
938939 }
939940 } else {
940941 param
0 commit comments