@@ -1052,16 +1052,12 @@ extern "rust-intrinsic" {
1052
1052
pub fn fabsf64 ( x : f64 ) -> f64 ;
1053
1053
1054
1054
/// Returns the minimum of two `f32` values.
1055
- #[ cfg( not( bootstrap) ) ]
1056
1055
pub fn minnumf32 ( x : f32 , y : f32 ) -> f32 ;
1057
1056
/// Returns the minimum of two `f64` values.
1058
- #[ cfg( not( bootstrap) ) ]
1059
1057
pub fn minnumf64 ( x : f64 , y : f64 ) -> f64 ;
1060
1058
/// Returns the maximum of two `f32` values.
1061
- #[ cfg( not( bootstrap) ) ]
1062
1059
pub fn maxnumf32 ( x : f32 , y : f32 ) -> f32 ;
1063
1060
/// Returns the maximum of two `f64` values.
1064
- #[ cfg( not( bootstrap) ) ]
1065
1061
pub fn maxnumf64 ( x : f64 , y : f64 ) -> f64 ;
1066
1062
1067
1063
/// Copies the sign from `y` to `x` for `f32` values.
@@ -1255,17 +1251,14 @@ extern "rust-intrinsic" {
1255
1251
1256
1252
/// Returns the result of an unchecked addition, resulting in
1257
1253
/// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`.
1258
- #[ cfg( not( bootstrap) ) ]
1259
1254
pub fn unchecked_add < T > ( x : T , y : T ) -> T ;
1260
1255
1261
1256
/// Returns the result of an unchecked substraction, resulting in
1262
1257
/// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`.
1263
- #[ cfg( not( bootstrap) ) ]
1264
1258
pub fn unchecked_sub < T > ( x : T , y : T ) -> T ;
1265
1259
1266
1260
/// Returns the result of an unchecked multiplication, resulting in
1267
1261
/// undefined behavior when `x * y > T::max_value()` or `x * y < T::min_value()`.
1268
- #[ cfg( not( bootstrap) ) ]
1269
1262
pub fn unchecked_mul < T > ( x : T , y : T ) -> T ;
1270
1263
1271
1264
/// Performs rotate left.
@@ -1563,53 +1556,3 @@ pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
1563
1556
}
1564
1557
write_bytes ( dst, val, count)
1565
1558
}
1566
-
1567
- // Simple bootstrap implementations of minnum/maxnum for stage0 compilation.
1568
-
1569
- /// Returns the minimum of two `f32` values.
1570
- #[ cfg( bootstrap) ]
1571
- pub fn minnumf32 ( x : f32 , y : f32 ) -> f32 {
1572
- // IEEE754 says: minNum(x, y) is the canonicalized number x if x < y, y if y < x, the
1573
- // canonicalized number if one operand is a number and the other a quiet NaN. Otherwise it
1574
- // is either x or y, canonicalized (this means results might differ among implementations).
1575
- // When either x or y is a signaling NaN, then the result is according to 6.2.
1576
- //
1577
- // Since we do not support sNaN in Rust yet, we do not need to handle them.
1578
- // FIXME(nagisa): due to https://bugs.llvm.org/show_bug.cgi?id=33303 we canonicalize by
1579
- // multiplying by 1.0. Should switch to the `canonicalize` when it works.
1580
- ( if x < y || y != y { x } else { y } ) * 1.0
1581
- }
1582
-
1583
- /// Returns the minimum of two `f64` values.
1584
- #[ cfg( bootstrap) ]
1585
- pub fn minnumf64 ( x : f64 , y : f64 ) -> f64 {
1586
- // Identical to the `f32` case.
1587
- ( if x < y || y != y { x } else { y } ) * 1.0
1588
- }
1589
-
1590
- /// Returns the maximum of two `f32` values.
1591
- #[ cfg( bootstrap) ]
1592
- pub fn maxnumf32 ( x : f32 , y : f32 ) -> f32 {
1593
- // IEEE754 says: maxNum(x, y) is the canonicalized number y if x < y, x if y < x, the
1594
- // canonicalized number if one operand is a number and the other a quiet NaN. Otherwise it
1595
- // is either x or y, canonicalized (this means results might differ among implementations).
1596
- // When either x or y is a signaling NaN, then the result is according to 6.2.
1597
- //
1598
- // Since we do not support sNaN in Rust yet, we do not need to handle them.
1599
- // FIXME(nagisa): due to https://bugs.llvm.org/show_bug.cgi?id=33303 we canonicalize by
1600
- // multiplying by 1.0. Should switch to the `canonicalize` when it works.
1601
- ( if x < y || x != x { y } else { x } ) * 1.0
1602
- }
1603
-
1604
- /// Returns the maximum of two `f64` values.
1605
- #[ cfg( bootstrap) ]
1606
- pub fn maxnumf64 ( x : f64 , y : f64 ) -> f64 {
1607
- // Identical to the `f32` case.
1608
- ( if x < y || x != x { y } else { x } ) * 1.0
1609
- }
1610
-
1611
- /// For bootstrapping, implement unchecked_sub as just wrapping_sub.
1612
- #[ cfg( bootstrap) ]
1613
- pub unsafe fn unchecked_sub < T > ( x : T , y : T ) -> T {
1614
- sub_with_overflow ( x, y) . 0
1615
- }
0 commit comments