@@ -5,7 +5,7 @@ use crate::prelude::*;
55
66pub ( crate ) fn f16_to_f32 ( fx : & mut FunctionCx < ' _ , ' _ , ' _ > , value : Value ) -> Value {
77 let ( value, arg_ty) =
8- if fx. tcx . sess . target . vendor == "apple" && fx. tcx . sess . target . arch == Arch :: X86_64 {
8+ if fx. tcx . sess . target . is_like_darwin && fx. tcx . sess . target . arch == Arch :: X86_64 {
99 (
1010 fx. bcx . ins ( ) . bitcast ( types:: I16 , MemFlags :: new ( ) , value) ,
1111 lib_call_arg_param ( fx. tcx , types:: I16 , false ) ,
@@ -22,8 +22,7 @@ fn f16_to_f64(fx: &mut FunctionCx<'_, '_, '_>, value: Value) -> Value {
2222}
2323
2424pub ( crate ) fn f32_to_f16 ( fx : & mut FunctionCx < ' _ , ' _ , ' _ > , value : Value ) -> Value {
25- let ret_ty = if fx. tcx . sess . target . vendor == "apple" && fx. tcx . sess . target . arch == Arch :: X86_64
26- {
25+ let ret_ty = if fx. tcx . sess . target . is_like_darwin && fx. tcx . sess . target . arch == Arch :: X86_64 {
2726 types:: I16
2827 } else {
2928 types:: F16
@@ -38,8 +37,7 @@ pub(crate) fn f32_to_f16(fx: &mut FunctionCx<'_, '_, '_>, value: Value) -> Value
3837}
3938
4039fn f64_to_f16 ( fx : & mut FunctionCx < ' _ , ' _ , ' _ > , value : Value ) -> Value {
41- let ret_ty = if fx. tcx . sess . target . vendor == "apple" && fx. tcx . sess . target . arch == Arch :: X86_64
42- {
40+ let ret_ty = if fx. tcx . sess . target . is_like_darwin && fx. tcx . sess . target . arch == Arch :: X86_64 {
4341 types:: I16
4442 } else {
4543 types:: F16
0 commit comments