@@ -2648,146 +2648,146 @@ pub fn p2i(ccx: &CrateContext, v: ValueRef) -> ValueRef {
2648
2648
}
2649
2649
2650
2650
macro_rules! ifn (
2651
- ( $name: expr, $args: expr, $ret: expr) => ( {
2651
+ ( $intrinsics : ident , $ name: expr, $args: expr, $ret: expr) => ( {
2652
2652
let name = $name;
2653
2653
let f = decl_cdecl_fn( llmod, name, Type :: func( $args, & $ret) ) ;
2654
- intrinsics. insert( name, f) ;
2654
+ $ intrinsics. insert( name, f) ;
2655
2655
} )
2656
2656
)
2657
2657
2658
2658
pub fn declare_intrinsics ( llmod : ModuleRef ) -> HashMap < & ' static str , ValueRef > {
2659
2659
let i8p = Type :: i8p ( ) ;
2660
2660
let mut intrinsics = HashMap :: new ( ) ;
2661
2661
2662
- ifn ! ( "llvm.memcpy.p0i8.p0i8.i32" ,
2662
+ ifn ! ( intrinsics , "llvm.memcpy.p0i8.p0i8.i32" ,
2663
2663
[ i8p, i8p, Type :: i32 ( ) , Type :: i32 ( ) , Type :: i1( ) ] , Type :: void( ) ) ;
2664
- ifn ! ( "llvm.memcpy.p0i8.p0i8.i64" ,
2664
+ ifn ! ( intrinsics , "llvm.memcpy.p0i8.p0i8.i64" ,
2665
2665
[ i8p, i8p, Type :: i64 ( ) , Type :: i32 ( ) , Type :: i1( ) ] , Type :: void( ) ) ;
2666
- ifn ! ( "llvm.memmove.p0i8.p0i8.i32" ,
2666
+ ifn ! ( intrinsics , "llvm.memmove.p0i8.p0i8.i32" ,
2667
2667
[ i8p, i8p, Type :: i32 ( ) , Type :: i32 ( ) , Type :: i1( ) ] , Type :: void( ) ) ;
2668
- ifn ! ( "llvm.memmove.p0i8.p0i8.i64" ,
2668
+ ifn ! ( intrinsics , "llvm.memmove.p0i8.p0i8.i64" ,
2669
2669
[ i8p, i8p, Type :: i64 ( ) , Type :: i32 ( ) , Type :: i1( ) ] , Type :: void( ) ) ;
2670
- ifn ! ( "llvm.memset.p0i8.i32" ,
2670
+ ifn ! ( intrinsics , "llvm.memset.p0i8.i32" ,
2671
2671
[ i8p, Type :: i8 ( ) , Type :: i32 ( ) , Type :: i32 ( ) , Type :: i1( ) ] , Type :: void( ) ) ;
2672
- ifn ! ( "llvm.memset.p0i8.i64" ,
2672
+ ifn ! ( intrinsics , "llvm.memset.p0i8.i64" ,
2673
2673
[ i8p, Type :: i8 ( ) , Type :: i64 ( ) , Type :: i32 ( ) , Type :: i1( ) ] , Type :: void( ) ) ;
2674
2674
2675
- ifn ! ( "llvm.trap" , [ ] , Type :: void( ) ) ;
2676
- ifn ! ( "llvm.frameaddress" , [ Type :: i32 ( ) ] , i8p) ;
2677
-
2678
- ifn ! ( "llvm.powi.f32" , [ Type :: f32 ( ) , Type :: i32 ( ) ] , Type :: f32 ( ) ) ;
2679
- ifn ! ( "llvm.powi.f64" , [ Type :: f64 ( ) , Type :: i32 ( ) ] , Type :: f64 ( ) ) ;
2680
- ifn ! ( "llvm.pow.f32" , [ Type :: f32 ( ) , Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2681
- ifn ! ( "llvm.pow.f64" , [ Type :: f64 ( ) , Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2682
-
2683
- ifn ! ( "llvm.sqrt.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2684
- ifn ! ( "llvm.sqrt.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2685
- ifn ! ( "llvm.sin.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2686
- ifn ! ( "llvm.sin.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2687
- ifn ! ( "llvm.cos.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2688
- ifn ! ( "llvm.cos.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2689
- ifn ! ( "llvm.exp.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2690
- ifn ! ( "llvm.exp.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2691
- ifn ! ( "llvm.exp2.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2692
- ifn ! ( "llvm.exp2.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2693
- ifn ! ( "llvm.log.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2694
- ifn ! ( "llvm.log.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2695
- ifn ! ( "llvm.log10.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2696
- ifn ! ( "llvm.log10.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2697
- ifn ! ( "llvm.log2.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2698
- ifn ! ( "llvm.log2.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2699
-
2700
- ifn ! ( "llvm.fma.f32" , [ Type :: f32 ( ) , Type :: f32 ( ) , Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2701
- ifn ! ( "llvm.fma.f64" , [ Type :: f64 ( ) , Type :: f64 ( ) , Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2702
-
2703
- ifn ! ( "llvm.fabs.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2704
- ifn ! ( "llvm.fabs.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2705
- ifn ! ( "llvm.floor.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2706
- ifn ! ( "llvm.floor.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2707
- ifn ! ( "llvm.ceil.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2708
- ifn ! ( "llvm.ceil.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2709
- ifn ! ( "llvm.trunc.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2710
- ifn ! ( "llvm.trunc.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2711
-
2712
- ifn ! ( "llvm.ctpop.i8" , [ Type :: i8 ( ) ] , Type :: i8 ( ) ) ;
2713
- ifn ! ( "llvm.ctpop.i16" , [ Type :: i16 ( ) ] , Type :: i16 ( ) ) ;
2714
- ifn ! ( "llvm.ctpop.i32" , [ Type :: i32 ( ) ] , Type :: i32 ( ) ) ;
2715
- ifn ! ( "llvm.ctpop.i64" , [ Type :: i64 ( ) ] , Type :: i64 ( ) ) ;
2716
-
2717
- ifn ! ( "llvm.ctlz.i8" , [ Type :: i8 ( ) , Type :: i1( ) ] , Type :: i8 ( ) ) ;
2718
- ifn ! ( "llvm.ctlz.i16" , [ Type :: i16 ( ) , Type :: i1( ) ] , Type :: i16 ( ) ) ;
2719
- ifn ! ( "llvm.ctlz.i32" , [ Type :: i32 ( ) , Type :: i1( ) ] , Type :: i32 ( ) ) ;
2720
- ifn ! ( "llvm.ctlz.i64" , [ Type :: i64 ( ) , Type :: i1( ) ] , Type :: i64 ( ) ) ;
2721
-
2722
- ifn ! ( "llvm.cttz.i8" , [ Type :: i8 ( ) , Type :: i1( ) ] , Type :: i8 ( ) ) ;
2723
- ifn ! ( "llvm.cttz.i16" , [ Type :: i16 ( ) , Type :: i1( ) ] , Type :: i16 ( ) ) ;
2724
- ifn ! ( "llvm.cttz.i32" , [ Type :: i32 ( ) , Type :: i1( ) ] , Type :: i32 ( ) ) ;
2725
- ifn ! ( "llvm.cttz.i64" , [ Type :: i64 ( ) , Type :: i1( ) ] , Type :: i64 ( ) ) ;
2726
-
2727
- ifn ! ( "llvm.bswap.i16" , [ Type :: i16 ( ) ] , Type :: i16 ( ) ) ;
2728
- ifn ! ( "llvm.bswap.i32" , [ Type :: i32 ( ) ] , Type :: i32 ( ) ) ;
2729
- ifn ! ( "llvm.bswap.i64" , [ Type :: i64 ( ) ] , Type :: i64 ( ) ) ;
2730
-
2731
- ifn ! ( "llvm.sadd.with.overflow.i8" ,
2675
+ ifn ! ( intrinsics , "llvm.trap" , [ ] , Type :: void( ) ) ;
2676
+ ifn ! ( intrinsics , "llvm.frameaddress" , [ Type :: i32 ( ) ] , i8p) ;
2677
+
2678
+ ifn ! ( intrinsics , "llvm.powi.f32" , [ Type :: f32 ( ) , Type :: i32 ( ) ] , Type :: f32 ( ) ) ;
2679
+ ifn ! ( intrinsics , "llvm.powi.f64" , [ Type :: f64 ( ) , Type :: i32 ( ) ] , Type :: f64 ( ) ) ;
2680
+ ifn ! ( intrinsics , "llvm.pow.f32" , [ Type :: f32 ( ) , Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2681
+ ifn ! ( intrinsics , "llvm.pow.f64" , [ Type :: f64 ( ) , Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2682
+
2683
+ ifn ! ( intrinsics , "llvm.sqrt.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2684
+ ifn ! ( intrinsics , "llvm.sqrt.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2685
+ ifn ! ( intrinsics , "llvm.sin.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2686
+ ifn ! ( intrinsics , "llvm.sin.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2687
+ ifn ! ( intrinsics , "llvm.cos.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2688
+ ifn ! ( intrinsics , "llvm.cos.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2689
+ ifn ! ( intrinsics , "llvm.exp.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2690
+ ifn ! ( intrinsics , "llvm.exp.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2691
+ ifn ! ( intrinsics , "llvm.exp2.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2692
+ ifn ! ( intrinsics , "llvm.exp2.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2693
+ ifn ! ( intrinsics , "llvm.log.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2694
+ ifn ! ( intrinsics , "llvm.log.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2695
+ ifn ! ( intrinsics , "llvm.log10.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2696
+ ifn ! ( intrinsics , "llvm.log10.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2697
+ ifn ! ( intrinsics , "llvm.log2.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2698
+ ifn ! ( intrinsics , "llvm.log2.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2699
+
2700
+ ifn ! ( intrinsics , "llvm.fma.f32" , [ Type :: f32 ( ) , Type :: f32 ( ) , Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2701
+ ifn ! ( intrinsics , "llvm.fma.f64" , [ Type :: f64 ( ) , Type :: f64 ( ) , Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2702
+
2703
+ ifn ! ( intrinsics , "llvm.fabs.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2704
+ ifn ! ( intrinsics , "llvm.fabs.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2705
+ ifn ! ( intrinsics , "llvm.floor.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2706
+ ifn ! ( intrinsics , "llvm.floor.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2707
+ ifn ! ( intrinsics , "llvm.ceil.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2708
+ ifn ! ( intrinsics , "llvm.ceil.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2709
+ ifn ! ( intrinsics , "llvm.trunc.f32" , [ Type :: f32 ( ) ] , Type :: f32 ( ) ) ;
2710
+ ifn ! ( intrinsics , "llvm.trunc.f64" , [ Type :: f64 ( ) ] , Type :: f64 ( ) ) ;
2711
+
2712
+ ifn ! ( intrinsics , "llvm.ctpop.i8" , [ Type :: i8 ( ) ] , Type :: i8 ( ) ) ;
2713
+ ifn ! ( intrinsics , "llvm.ctpop.i16" , [ Type :: i16 ( ) ] , Type :: i16 ( ) ) ;
2714
+ ifn ! ( intrinsics , "llvm.ctpop.i32" , [ Type :: i32 ( ) ] , Type :: i32 ( ) ) ;
2715
+ ifn ! ( intrinsics , "llvm.ctpop.i64" , [ Type :: i64 ( ) ] , Type :: i64 ( ) ) ;
2716
+
2717
+ ifn ! ( intrinsics , "llvm.ctlz.i8" , [ Type :: i8 ( ) , Type :: i1( ) ] , Type :: i8 ( ) ) ;
2718
+ ifn ! ( intrinsics , "llvm.ctlz.i16" , [ Type :: i16 ( ) , Type :: i1( ) ] , Type :: i16 ( ) ) ;
2719
+ ifn ! ( intrinsics , "llvm.ctlz.i32" , [ Type :: i32 ( ) , Type :: i1( ) ] , Type :: i32 ( ) ) ;
2720
+ ifn ! ( intrinsics , "llvm.ctlz.i64" , [ Type :: i64 ( ) , Type :: i1( ) ] , Type :: i64 ( ) ) ;
2721
+
2722
+ ifn ! ( intrinsics , "llvm.cttz.i8" , [ Type :: i8 ( ) , Type :: i1( ) ] , Type :: i8 ( ) ) ;
2723
+ ifn ! ( intrinsics , "llvm.cttz.i16" , [ Type :: i16 ( ) , Type :: i1( ) ] , Type :: i16 ( ) ) ;
2724
+ ifn ! ( intrinsics , "llvm.cttz.i32" , [ Type :: i32 ( ) , Type :: i1( ) ] , Type :: i32 ( ) ) ;
2725
+ ifn ! ( intrinsics , "llvm.cttz.i64" , [ Type :: i64 ( ) , Type :: i1( ) ] , Type :: i64 ( ) ) ;
2726
+
2727
+ ifn ! ( intrinsics , "llvm.bswap.i16" , [ Type :: i16 ( ) ] , Type :: i16 ( ) ) ;
2728
+ ifn ! ( intrinsics , "llvm.bswap.i32" , [ Type :: i32 ( ) ] , Type :: i32 ( ) ) ;
2729
+ ifn ! ( intrinsics , "llvm.bswap.i64" , [ Type :: i64 ( ) ] , Type :: i64 ( ) ) ;
2730
+
2731
+ ifn ! ( intrinsics , "llvm.sadd.with.overflow.i8" ,
2732
2732
[ Type :: i8 ( ) , Type :: i8 ( ) ] , Type :: struct_( [ Type :: i8 ( ) , Type :: i1( ) ] , false ) ) ;
2733
- ifn ! ( "llvm.sadd.with.overflow.i16" ,
2733
+ ifn ! ( intrinsics , "llvm.sadd.with.overflow.i16" ,
2734
2734
[ Type :: i16 ( ) , Type :: i16 ( ) ] , Type :: struct_( [ Type :: i16 ( ) , Type :: i1( ) ] , false ) ) ;
2735
- ifn ! ( "llvm.sadd.with.overflow.i32" ,
2735
+ ifn ! ( intrinsics , "llvm.sadd.with.overflow.i32" ,
2736
2736
[ Type :: i32 ( ) , Type :: i32 ( ) ] , Type :: struct_( [ Type :: i32 ( ) , Type :: i1( ) ] , false ) ) ;
2737
- ifn ! ( "llvm.sadd.with.overflow.i64" ,
2737
+ ifn ! ( intrinsics , "llvm.sadd.with.overflow.i64" ,
2738
2738
[ Type :: i64 ( ) , Type :: i64 ( ) ] , Type :: struct_( [ Type :: i64 ( ) , Type :: i1( ) ] , false ) ) ;
2739
2739
2740
- ifn ! ( "llvm.uadd.with.overflow.i8" ,
2740
+ ifn ! ( intrinsics , "llvm.uadd.with.overflow.i8" ,
2741
2741
[ Type :: i8 ( ) , Type :: i8 ( ) ] , Type :: struct_( [ Type :: i8 ( ) , Type :: i1( ) ] , false ) ) ;
2742
- ifn ! ( "llvm.uadd.with.overflow.i16" ,
2742
+ ifn ! ( intrinsics , "llvm.uadd.with.overflow.i16" ,
2743
2743
[ Type :: i16 ( ) , Type :: i16 ( ) ] , Type :: struct_( [ Type :: i16 ( ) , Type :: i1( ) ] , false ) ) ;
2744
- ifn ! ( "llvm.uadd.with.overflow.i32" ,
2744
+ ifn ! ( intrinsics , "llvm.uadd.with.overflow.i32" ,
2745
2745
[ Type :: i32 ( ) , Type :: i32 ( ) ] , Type :: struct_( [ Type :: i32 ( ) , Type :: i1( ) ] , false ) ) ;
2746
- ifn ! ( "llvm.uadd.with.overflow.i64" ,
2746
+ ifn ! ( intrinsics , "llvm.uadd.with.overflow.i64" ,
2747
2747
[ Type :: i64 ( ) , Type :: i64 ( ) ] , Type :: struct_( [ Type :: i64 ( ) , Type :: i1( ) ] , false ) ) ;
2748
2748
2749
- ifn ! ( "llvm.ssub.with.overflow.i8" ,
2749
+ ifn ! ( intrinsics , "llvm.ssub.with.overflow.i8" ,
2750
2750
[ Type :: i8 ( ) , Type :: i8 ( ) ] , Type :: struct_( [ Type :: i8 ( ) , Type :: i1( ) ] , false ) ) ;
2751
- ifn ! ( "llvm.ssub.with.overflow.i16" ,
2751
+ ifn ! ( intrinsics , "llvm.ssub.with.overflow.i16" ,
2752
2752
[ Type :: i16 ( ) , Type :: i16 ( ) ] , Type :: struct_( [ Type :: i16 ( ) , Type :: i1( ) ] , false ) ) ;
2753
- ifn ! ( "llvm.ssub.with.overflow.i32" ,
2753
+ ifn ! ( intrinsics , "llvm.ssub.with.overflow.i32" ,
2754
2754
[ Type :: i32 ( ) , Type :: i32 ( ) ] , Type :: struct_( [ Type :: i32 ( ) , Type :: i1( ) ] , false ) ) ;
2755
- ifn ! ( "llvm.ssub.with.overflow.i64" ,
2755
+ ifn ! ( intrinsics , "llvm.ssub.with.overflow.i64" ,
2756
2756
[ Type :: i64 ( ) , Type :: i64 ( ) ] , Type :: struct_( [ Type :: i64 ( ) , Type :: i1( ) ] , false ) ) ;
2757
2757
2758
- ifn ! ( "llvm.usub.with.overflow.i8" ,
2758
+ ifn ! ( intrinsics , "llvm.usub.with.overflow.i8" ,
2759
2759
[ Type :: i8 ( ) , Type :: i8 ( ) ] , Type :: struct_( [ Type :: i8 ( ) , Type :: i1( ) ] , false ) ) ;
2760
- ifn ! ( "llvm.usub.with.overflow.i16" ,
2760
+ ifn ! ( intrinsics , "llvm.usub.with.overflow.i16" ,
2761
2761
[ Type :: i16 ( ) , Type :: i16 ( ) ] , Type :: struct_( [ Type :: i16 ( ) , Type :: i1( ) ] , false ) ) ;
2762
- ifn ! ( "llvm.usub.with.overflow.i32" ,
2762
+ ifn ! ( intrinsics , "llvm.usub.with.overflow.i32" ,
2763
2763
[ Type :: i32 ( ) , Type :: i32 ( ) ] , Type :: struct_( [ Type :: i32 ( ) , Type :: i1( ) ] , false ) ) ;
2764
- ifn ! ( "llvm.usub.with.overflow.i64" ,
2764
+ ifn ! ( intrinsics , "llvm.usub.with.overflow.i64" ,
2765
2765
[ Type :: i64 ( ) , Type :: i64 ( ) ] , Type :: struct_( [ Type :: i64 ( ) , Type :: i1( ) ] , false ) ) ;
2766
2766
2767
- ifn ! ( "llvm.smul.with.overflow.i8" ,
2767
+ ifn ! ( intrinsics , "llvm.smul.with.overflow.i8" ,
2768
2768
[ Type :: i8 ( ) , Type :: i8 ( ) ] , Type :: struct_( [ Type :: i8 ( ) , Type :: i1( ) ] , false ) ) ;
2769
- ifn ! ( "llvm.smul.with.overflow.i16" ,
2769
+ ifn ! ( intrinsics , "llvm.smul.with.overflow.i16" ,
2770
2770
[ Type :: i16 ( ) , Type :: i16 ( ) ] , Type :: struct_( [ Type :: i16 ( ) , Type :: i1( ) ] , false ) ) ;
2771
- ifn ! ( "llvm.smul.with.overflow.i32" ,
2771
+ ifn ! ( intrinsics , "llvm.smul.with.overflow.i32" ,
2772
2772
[ Type :: i32 ( ) , Type :: i32 ( ) ] , Type :: struct_( [ Type :: i32 ( ) , Type :: i1( ) ] , false ) ) ;
2773
- ifn ! ( "llvm.smul.with.overflow.i64" ,
2773
+ ifn ! ( intrinsics , "llvm.smul.with.overflow.i64" ,
2774
2774
[ Type :: i64 ( ) , Type :: i64 ( ) ] , Type :: struct_( [ Type :: i64 ( ) , Type :: i1( ) ] , false ) ) ;
2775
2775
2776
- ifn ! ( "llvm.umul.with.overflow.i8" ,
2776
+ ifn ! ( intrinsics , "llvm.umul.with.overflow.i8" ,
2777
2777
[ Type :: i8 ( ) , Type :: i8 ( ) ] , Type :: struct_( [ Type :: i8 ( ) , Type :: i1( ) ] , false ) ) ;
2778
- ifn ! ( "llvm.umul.with.overflow.i16" ,
2778
+ ifn ! ( intrinsics , "llvm.umul.with.overflow.i16" ,
2779
2779
[ Type :: i16 ( ) , Type :: i16 ( ) ] , Type :: struct_( [ Type :: i16 ( ) , Type :: i1( ) ] , false ) ) ;
2780
- ifn ! ( "llvm.umul.with.overflow.i32" ,
2780
+ ifn ! ( intrinsics , "llvm.umul.with.overflow.i32" ,
2781
2781
[ Type :: i32 ( ) , Type :: i32 ( ) ] , Type :: struct_( [ Type :: i32 ( ) , Type :: i1( ) ] , false ) ) ;
2782
- ifn ! ( "llvm.umul.with.overflow.i64" ,
2782
+ ifn ! ( intrinsics , "llvm.umul.with.overflow.i64" ,
2783
2783
[ Type :: i64 ( ) , Type :: i64 ( ) ] , Type :: struct_( [ Type :: i64 ( ) , Type :: i1( ) ] , false ) ) ;
2784
2784
2785
2785
return intrinsics;
2786
2786
}
2787
2787
2788
2788
pub fn declare_dbg_intrinsics ( llmod : ModuleRef , intrinsics : & mut HashMap < & ' static str , ValueRef > ) {
2789
- ifn ! ( "llvm.dbg.declare" , [ Type :: metadata( ) , Type :: metadata( ) ] , Type :: void( ) ) ;
2790
- ifn ! ( "llvm.dbg.value" , [ Type :: metadata( ) , Type :: i64 ( ) , Type :: metadata( ) ] , Type :: void( ) ) ;
2789
+ ifn ! ( intrinsics , "llvm.dbg.declare" , [ Type :: metadata( ) , Type :: metadata( ) ] , Type :: void( ) ) ;
2790
+ ifn ! ( intrinsics , "llvm.dbg.value" , [ Type :: metadata( ) , Type :: i64 ( ) , Type :: metadata( ) ] , Type :: void( ) ) ;
2791
2791
}
2792
2792
2793
2793
pub fn trap ( bcx : @mut Block ) {
0 commit comments