File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,18 @@ macro_rules! mul {
9
9
pub extern "C" fn $intrinsic( a: $ty, b: $ty) -> $ty {
10
10
let half_bits = <$ty>:: bits( ) / 4 ;
11
11
let lower_mask = !0 >> half_bits;
12
- let mut low = ( a. low( ) & lower_mask) * ( b. low( ) & lower_mask) ;
12
+ let mut low = ( a. low( ) & lower_mask) . wrapping_mul ( b. low( ) & lower_mask) ;
13
13
let mut t = low >> half_bits;
14
14
low &= lower_mask;
15
- t += ( a. low( ) >> half_bits) * ( b. low( ) & lower_mask) ;
15
+ t += ( a. low( ) >> half_bits) . wrapping_mul ( b. low( ) & lower_mask) ;
16
16
low += ( t & lower_mask) << half_bits;
17
17
let mut high = t >> half_bits;
18
18
t = low >> half_bits;
19
19
low &= lower_mask;
20
- t += ( b. low( ) >> half_bits) * ( a. low( ) & lower_mask) ;
20
+ t += ( b. low( ) >> half_bits) . wrapping_mul ( a. low( ) & lower_mask) ;
21
21
low += ( t & lower_mask) << half_bits;
22
22
high += t >> half_bits;
23
- high += ( a. low( ) >> half_bits) * ( b. low( ) >> half_bits) ;
23
+ high += ( a. low( ) >> half_bits) . wrapping_mul ( b. low( ) >> half_bits) ;
24
24
high = high. wrapping_add( a. high( ) . wrapping_mul( b. low( ) ) . wrapping_add( a. low( ) . wrapping_mul( b. high( ) ) ) ) ;
25
25
<$ty>:: from_parts( low, high)
26
26
}
You can’t perform that action at this time.
0 commit comments