@@ -394,9 +394,7 @@ extern "rust-intrinsic" {
394394
395395 pub fn roundf32 ( x : f32 ) -> f32 ;
396396 pub fn roundf64 ( x : f64 ) -> f64 ;
397- }
398- #[ cfg( not( stage0) ) ]
399- extern "rust-intrinsic" {
397+
400398 pub fn ctpop8 ( x : u8 ) -> u8 ;
401399 pub fn ctpop16 ( x : u16 ) -> u16 ;
402400 pub fn ctpop32 ( x : u32 ) -> u32 ;
@@ -415,29 +413,7 @@ extern "rust-intrinsic" {
415413 pub fn bswap16 ( x : u16 ) -> u16 ;
416414 pub fn bswap32 ( x : u32 ) -> u32 ;
417415 pub fn bswap64 ( x : u64 ) -> u64 ;
418- }
419416
420- // NOTE: remove this after a snap, and merge the extern block above
421- macro_rules! stage0_hack {
422- ( $( $u_ty: ty, $i_ty: ty => $( $name: ident) ,* ) ;* ) => {
423- $(
424- $(
425- #[ cfg( stage0) ]
426- pub unsafe fn $name( x: $u_ty) -> $u_ty {
427- extern "rust-intrinsic" { fn $name( x: $i_ty) -> $i_ty; }
428- $name( x as $i_ty) as $u_ty
429- }
430- ) * ) *
431- }
432- }
433- stage0_hack ! {
434- u8 , i8 => ctpop8, ctlz8, cttz8;
435- u16 , i16 => ctpop16, ctlz16, cttz16, bswap16;
436- u32 , i32 => ctpop32, ctlz32, cttz32, bswap32;
437- u64 , i64 => ctpop64, ctlz64, cttz64, bswap64
438- }
439-
440- extern "rust-intrinsic" {
441417 pub fn i8_add_with_overflow ( x : i8 , y : i8 ) -> ( i8 , bool ) ;
442418 pub fn i16_add_with_overflow ( x : i16 , y : i16 ) -> ( i16 , bool ) ;
443419 pub fn i32_add_with_overflow ( x : i32 , y : i32 ) -> ( i32 , bool ) ;
0 commit comments