@@ -1052,16 +1052,12 @@ extern "rust-intrinsic" {
10521052 pub fn fabsf64 ( x : f64 ) -> f64 ;
10531053
10541054 /// Returns the minimum of two `f32` values.
1055- #[ cfg( not( bootstrap) ) ]
10561055 pub fn minnumf32 ( x : f32 , y : f32 ) -> f32 ;
10571056 /// Returns the minimum of two `f64` values.
1058- #[ cfg( not( bootstrap) ) ]
10591057 pub fn minnumf64 ( x : f64 , y : f64 ) -> f64 ;
10601058 /// Returns the maximum of two `f32` values.
1061- #[ cfg( not( bootstrap) ) ]
10621059 pub fn maxnumf32 ( x : f32 , y : f32 ) -> f32 ;
10631060 /// Returns the maximum of two `f64` values.
1064- #[ cfg( not( bootstrap) ) ]
10651061 pub fn maxnumf64 ( x : f64 , y : f64 ) -> f64 ;
10661062
10671063 /// Copies the sign from `y` to `x` for `f32` values.
@@ -1255,17 +1251,14 @@ extern "rust-intrinsic" {
12551251
12561252 /// Returns the result of an unchecked addition, resulting in
12571253 /// undefined behavior when `x + y > T::max_value()` or `x + y < T::min_value()`.
1258- #[ cfg( not( bootstrap) ) ]
12591254 pub fn unchecked_add < T > ( x : T , y : T ) -> T ;
12601255
12611256 /// Returns the result of an unchecked substraction, resulting in
12621257 /// undefined behavior when `x - y > T::max_value()` or `x - y < T::min_value()`.
1263- #[ cfg( not( bootstrap) ) ]
12641258 pub fn unchecked_sub < T > ( x : T , y : T ) -> T ;
12651259
12661260 /// Returns the result of an unchecked multiplication, resulting in
12671261 /// undefined behavior when `x * y > T::max_value()` or `x * y < T::min_value()`.
1268- #[ cfg( not( bootstrap) ) ]
12691262 pub fn unchecked_mul < T > ( x : T , y : T ) -> T ;
12701263
12711264 /// Performs rotate left.
@@ -1563,53 +1556,3 @@ pub unsafe fn write_bytes<T>(dst: *mut T, val: u8, count: usize) {
15631556 }
15641557 write_bytes ( dst, val, count)
15651558}
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