@@ -378,21 +378,21 @@ pub mod reimpls {
378
378
if b != 0 && b != 1 {
379
379
* overflow = 1 ;
380
380
}
381
- return result. to_ret ( ) ;
381
+ return result;
382
382
}
383
383
if b == <$ty>:: min_value( ) {
384
384
if a != 0 && a != 1 {
385
385
* overflow = 1 ;
386
386
}
387
- return result. to_ret ( ) ;
387
+ return result;
388
388
}
389
389
390
390
let sa = a. signum( ) ;
391
391
let abs_a = a. iabs( ) ;
392
392
let sb = b. signum( ) ;
393
393
let abs_b = b. iabs( ) ;
394
394
if abs_a < 2 || abs_b < 2 {
395
- return result. to_ret ( ) ;
395
+ return result;
396
396
}
397
397
unsafe {
398
398
if sa == sb {
@@ -405,13 +405,14 @@ pub mod reimpls {
405
405
}
406
406
}
407
407
}
408
- result. to_ret ( )
408
+ result
409
409
} }
410
410
}
411
411
412
412
// FIXME: i32 here should be c_int.
413
- #[ export_name="__muloti4" ]
414
- pub extern "C" fn i128_mul_oflow ( a : i128_ , b : i128_ , o : & mut i32 ) -> i128ret {
413
+ #[ cfg_attr( not( all( windows, target_pointer_width="64" , not( stage0) ) ) ,
414
+ export_name="__muloti4" ) ]
415
+ pub extern "C" fn i128_mul_oflow ( a : i128_ , b : i128_ , o : & mut i32 ) -> i128 {
415
416
mulo ! ( a, b, o, i128_)
416
417
}
417
418
@@ -696,7 +697,14 @@ pub mod reimpls {
696
697
#[ cfg( all( windows, target_pointer_width="64" ) ) ]
697
698
mod windows_64_workarounds {
698
699
use super :: { i128_, u128_, LargeInt } ;
699
- use super :: { i128_as_f64, i128_as_f32, u128_as_f64, u128_as_f32} ;
700
+ use super :: { i128_as_f64, i128_as_f32, u128_as_f64, u128_as_f32, i128_mul_oflow} ;
701
+
702
+ #[ export_name="__muloti4" ]
703
+ pub extern "C" fn i128_mul_oflow_win ( alow : u64 , ahigh : i64 ,
704
+ blow : u64 , bhigh : i64 , o : & mut i32 ) -> i128 {
705
+ i128_mul_oflow ( i128_:: from_parts ( alow, ahigh) , i128_:: from_parts ( blow, bhigh) , o)
706
+ }
707
+
700
708
#[ export_name="__floattidf" ]
701
709
pub extern "C" fn i128_as_f64_win ( alow : u64 , ahigh : i64 ) -> f64 {
702
710
i128_as_f64 ( i128_:: from_parts ( alow, ahigh) )
0 commit comments