@@ -689,7 +689,33 @@ pub mod reimpls {
689
689
float_as_signed ! ( a, f32 , i128_)
690
690
}
691
691
692
- #[ export_name="__floattidf" ]
692
+ // LLVM expectations for ABI on windows are pure madness.
693
+
694
+ #[ cfg( not( stage0) ) ]
695
+ #[ cfg_attr( windows, export_name="__floattidf" ) ]
696
+ pub extern "C" fn i128_as_f64_win ( alow : u64 , ahigh : i64 ) -> f64 {
697
+ i128_as_f64 ( i128_:: from_parts ( alow, ahigh) )
698
+ }
699
+
700
+ #[ cfg( not( stage0) ) ]
701
+ #[ cfg_attr( windows, export_name="__floattisf" ) ]
702
+ pub extern "C" fn i128_as_f32_win ( alow : u64 , ahigh : i64 ) -> f32 {
703
+ i128_as_f32 ( i128_:: from_parts ( alow, ahigh) )
704
+ }
705
+
706
+ #[ cfg( not( stage0) ) ]
707
+ #[ cfg_attr( windows, export_name="__floatuntidf" ) ]
708
+ pub extern "C" fn u128_as_f64_win ( alow : u64 , ahigh : u64 ) -> f64 {
709
+ u128_as_f64 ( u128_:: from_parts ( alow, ahigh) )
710
+ }
711
+
712
+ #[ cfg( not( stage0) ) ]
713
+ #[ cfg_attr( windows, export_name="__floatuntisf" ) ]
714
+ pub extern "C" fn u128_as_f32_win ( alow : u64 , ahigh : u64 ) -> f32 {
715
+ u128_as_f32 ( u128_:: from_parts ( alow, ahigh) )
716
+ }
717
+
718
+ #[ cfg_attr( any( not( windows) , stage0) , export_name="__floattidf" ) ]
693
719
pub extern "C" fn i128_as_f64 ( a : i128_ ) -> f64 {
694
720
match a. signum ( ) {
695
721
1 => u128_as_f64 ( a. uabs ( ) ) ,
@@ -698,7 +724,7 @@ pub mod reimpls {
698
724
}
699
725
}
700
726
701
- #[ export_name="__floattisf" ]
727
+ #[ cfg_attr ( any ( not ( windows ) , stage0 ) , export_name="__floattisf" ) ]
702
728
pub extern "C" fn i128_as_f32 ( a : i128_ ) -> f32 {
703
729
match a. signum ( ) {
704
730
1 => u128_as_f32 ( a. uabs ( ) ) ,
@@ -707,7 +733,7 @@ pub mod reimpls {
707
733
}
708
734
}
709
735
710
- #[ export_name="__floatuntidf" ]
736
+ #[ cfg_attr ( any ( not ( windows ) , stage0 ) , export_name="__floatuntidf" ) ]
711
737
pub extern "C" fn u128_as_f64 ( mut a : u128_ ) -> f64 {
712
738
use :: core:: f64:: MANTISSA_DIGITS ;
713
739
if a == 0 { return 0.0 ; }
@@ -743,7 +769,7 @@ pub mod reimpls {
743
769
}
744
770
}
745
771
746
- #[ export_name="__floatuntisf" ]
772
+ #[ cfg_attr ( any ( not ( windows ) , stage0 ) , export_name="__floatuntisf" ) ]
747
773
pub extern "C" fn u128_as_f32 ( mut a : u128_ ) -> f32 {
748
774
use :: core:: f32:: MANTISSA_DIGITS ;
749
775
if a == 0 { return 0.0 ; }
0 commit comments