zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

compiler_rt.zig (11083B) - Raw


      1 const builtin = @import("builtin");
      2 const common = @import("compiler_rt/common.zig");
      3 
      4 pub const panic = common.panic;
      5 
      6 comptime {
      7     // Integer routines
      8     _ = @import("compiler_rt/count0bits.zig");
      9     _ = @import("compiler_rt/parity.zig");
     10     _ = @import("compiler_rt/popcount.zig");
     11     _ = @import("compiler_rt/bitreverse.zig");
     12     _ = @import("compiler_rt/bswap.zig");
     13     _ = @import("compiler_rt/cmp.zig");
     14 
     15     _ = @import("compiler_rt/shift.zig");
     16     _ = @import("compiler_rt/negXi2.zig");
     17     _ = @import("compiler_rt/int.zig");
     18     _ = @import("compiler_rt/mulXi3.zig");
     19     _ = @import("compiler_rt/divti3.zig");
     20     _ = @import("compiler_rt/udivti3.zig");
     21     _ = @import("compiler_rt/modti3.zig");
     22     _ = @import("compiler_rt/umodti3.zig");
     23 
     24     _ = @import("compiler_rt/absv.zig");
     25     _ = @import("compiler_rt/absvsi2.zig");
     26     _ = @import("compiler_rt/absvdi2.zig");
     27     _ = @import("compiler_rt/absvti2.zig");
     28     _ = @import("compiler_rt/negv.zig");
     29 
     30     _ = @import("compiler_rt/addvsi3.zig");
     31     _ = @import("compiler_rt/subvsi3.zig");
     32     _ = @import("compiler_rt/subvdi3.zig");
     33     _ = @import("compiler_rt/mulvsi3.zig");
     34 
     35     _ = @import("compiler_rt/addo.zig");
     36     _ = @import("compiler_rt/subo.zig");
     37     _ = @import("compiler_rt/mulo.zig");
     38 
     39     // Float routines
     40     // conversion
     41     _ = @import("compiler_rt/extendf.zig");
     42     _ = @import("compiler_rt/extendhfsf2.zig");
     43     _ = @import("compiler_rt/extendhfdf2.zig");
     44     _ = @import("compiler_rt/extendhftf2.zig");
     45     _ = @import("compiler_rt/extendhfxf2.zig");
     46     _ = @import("compiler_rt/extendsfdf2.zig");
     47     _ = @import("compiler_rt/extendsftf2.zig");
     48     _ = @import("compiler_rt/extendsfxf2.zig");
     49     _ = @import("compiler_rt/extenddftf2.zig");
     50     _ = @import("compiler_rt/extenddfxf2.zig");
     51     _ = @import("compiler_rt/extendxftf2.zig");
     52 
     53     _ = @import("compiler_rt/truncf.zig");
     54     _ = @import("compiler_rt/truncsfhf2.zig");
     55     _ = @import("compiler_rt/truncdfhf2.zig");
     56     _ = @import("compiler_rt/truncdfsf2.zig");
     57     _ = @import("compiler_rt/truncxfhf2.zig");
     58     _ = @import("compiler_rt/truncxfsf2.zig");
     59     _ = @import("compiler_rt/truncxfdf2.zig");
     60     _ = @import("compiler_rt/trunctfhf2.zig");
     61     _ = @import("compiler_rt/trunctfsf2.zig");
     62     _ = @import("compiler_rt/trunctfdf2.zig");
     63     _ = @import("compiler_rt/trunctfxf2.zig");
     64 
     65     _ = @import("compiler_rt/int_from_float.zig");
     66     _ = @import("compiler_rt/fixhfsi.zig");
     67     _ = @import("compiler_rt/fixhfdi.zig");
     68     _ = @import("compiler_rt/fixhfti.zig");
     69     _ = @import("compiler_rt/fixhfei.zig");
     70     _ = @import("compiler_rt/fixsfsi.zig");
     71     _ = @import("compiler_rt/fixsfdi.zig");
     72     _ = @import("compiler_rt/fixsfti.zig");
     73     _ = @import("compiler_rt/fixsfei.zig");
     74     _ = @import("compiler_rt/fixdfsi.zig");
     75     _ = @import("compiler_rt/fixdfdi.zig");
     76     _ = @import("compiler_rt/fixdfti.zig");
     77     _ = @import("compiler_rt/fixdfei.zig");
     78     _ = @import("compiler_rt/fixtfsi.zig");
     79     _ = @import("compiler_rt/fixtfdi.zig");
     80     _ = @import("compiler_rt/fixtfti.zig");
     81     _ = @import("compiler_rt/fixtfei.zig");
     82     _ = @import("compiler_rt/fixxfsi.zig");
     83     _ = @import("compiler_rt/fixxfdi.zig");
     84     _ = @import("compiler_rt/fixxfti.zig");
     85     _ = @import("compiler_rt/fixxfei.zig");
     86     _ = @import("compiler_rt/fixunshfsi.zig");
     87     _ = @import("compiler_rt/fixunshfdi.zig");
     88     _ = @import("compiler_rt/fixunshfti.zig");
     89     _ = @import("compiler_rt/fixunshfei.zig");
     90     _ = @import("compiler_rt/fixunssfsi.zig");
     91     _ = @import("compiler_rt/fixunssfdi.zig");
     92     _ = @import("compiler_rt/fixunssfti.zig");
     93     _ = @import("compiler_rt/fixunssfei.zig");
     94     _ = @import("compiler_rt/fixunsdfsi.zig");
     95     _ = @import("compiler_rt/fixunsdfdi.zig");
     96     _ = @import("compiler_rt/fixunsdfti.zig");
     97     _ = @import("compiler_rt/fixunsdfei.zig");
     98     _ = @import("compiler_rt/fixunstfsi.zig");
     99     _ = @import("compiler_rt/fixunstfdi.zig");
    100     _ = @import("compiler_rt/fixunstfti.zig");
    101     _ = @import("compiler_rt/fixunstfei.zig");
    102     _ = @import("compiler_rt/fixunsxfsi.zig");
    103     _ = @import("compiler_rt/fixunsxfdi.zig");
    104     _ = @import("compiler_rt/fixunsxfti.zig");
    105     _ = @import("compiler_rt/fixunsxfei.zig");
    106 
    107     _ = @import("compiler_rt/float_from_int.zig");
    108     _ = @import("compiler_rt/floatsihf.zig");
    109     _ = @import("compiler_rt/floatsisf.zig");
    110     _ = @import("compiler_rt/floatsidf.zig");
    111     _ = @import("compiler_rt/floatsitf.zig");
    112     _ = @import("compiler_rt/floatsixf.zig");
    113     _ = @import("compiler_rt/floatdihf.zig");
    114     _ = @import("compiler_rt/floatdisf.zig");
    115     _ = @import("compiler_rt/floatdidf.zig");
    116     _ = @import("compiler_rt/floatditf.zig");
    117     _ = @import("compiler_rt/floatdixf.zig");
    118     _ = @import("compiler_rt/floattihf.zig");
    119     _ = @import("compiler_rt/floattisf.zig");
    120     _ = @import("compiler_rt/floattidf.zig");
    121     _ = @import("compiler_rt/floattitf.zig");
    122     _ = @import("compiler_rt/floattixf.zig");
    123     _ = @import("compiler_rt/floateihf.zig");
    124     _ = @import("compiler_rt/floateisf.zig");
    125     _ = @import("compiler_rt/floateidf.zig");
    126     _ = @import("compiler_rt/floateitf.zig");
    127     _ = @import("compiler_rt/floateixf.zig");
    128     _ = @import("compiler_rt/floatunsihf.zig");
    129     _ = @import("compiler_rt/floatunsisf.zig");
    130     _ = @import("compiler_rt/floatunsidf.zig");
    131     _ = @import("compiler_rt/floatunsitf.zig");
    132     _ = @import("compiler_rt/floatunsixf.zig");
    133     _ = @import("compiler_rt/floatundihf.zig");
    134     _ = @import("compiler_rt/floatundisf.zig");
    135     _ = @import("compiler_rt/floatundidf.zig");
    136     _ = @import("compiler_rt/floatunditf.zig");
    137     _ = @import("compiler_rt/floatundixf.zig");
    138     _ = @import("compiler_rt/floatuntihf.zig");
    139     _ = @import("compiler_rt/floatuntisf.zig");
    140     _ = @import("compiler_rt/floatuntidf.zig");
    141     _ = @import("compiler_rt/floatuntitf.zig");
    142     _ = @import("compiler_rt/floatuntixf.zig");
    143     _ = @import("compiler_rt/floatuneihf.zig");
    144     _ = @import("compiler_rt/floatuneisf.zig");
    145     _ = @import("compiler_rt/floatuneidf.zig");
    146     _ = @import("compiler_rt/floatuneitf.zig");
    147     _ = @import("compiler_rt/floatuneixf.zig");
    148 
    149     // comparison
    150     _ = @import("compiler_rt/comparef.zig");
    151     _ = @import("compiler_rt/cmphf2.zig");
    152     _ = @import("compiler_rt/cmpsf2.zig");
    153     _ = @import("compiler_rt/cmpdf2.zig");
    154     _ = @import("compiler_rt/cmptf2.zig");
    155     _ = @import("compiler_rt/cmpxf2.zig");
    156     _ = @import("compiler_rt/unordhf2.zig");
    157     _ = @import("compiler_rt/unordsf2.zig");
    158     _ = @import("compiler_rt/unorddf2.zig");
    159     _ = @import("compiler_rt/unordxf2.zig");
    160     _ = @import("compiler_rt/unordtf2.zig");
    161     _ = @import("compiler_rt/gehf2.zig");
    162     _ = @import("compiler_rt/gesf2.zig");
    163     _ = @import("compiler_rt/gedf2.zig");
    164     _ = @import("compiler_rt/gexf2.zig");
    165     _ = @import("compiler_rt/getf2.zig");
    166 
    167     // arithmetic
    168     _ = @import("compiler_rt/addf3.zig");
    169     _ = @import("compiler_rt/addhf3.zig");
    170     _ = @import("compiler_rt/addsf3.zig");
    171     _ = @import("compiler_rt/adddf3.zig");
    172     _ = @import("compiler_rt/addtf3.zig");
    173     _ = @import("compiler_rt/addxf3.zig");
    174 
    175     _ = @import("compiler_rt/subhf3.zig");
    176     _ = @import("compiler_rt/subsf3.zig");
    177     _ = @import("compiler_rt/subdf3.zig");
    178     _ = @import("compiler_rt/subtf3.zig");
    179     _ = @import("compiler_rt/subxf3.zig");
    180 
    181     _ = @import("compiler_rt/mulf3.zig");
    182     _ = @import("compiler_rt/mulhf3.zig");
    183     _ = @import("compiler_rt/mulsf3.zig");
    184     _ = @import("compiler_rt/muldf3.zig");
    185     _ = @import("compiler_rt/multf3.zig");
    186     _ = @import("compiler_rt/mulxf3.zig");
    187 
    188     _ = @import("compiler_rt/divhf3.zig");
    189     _ = @import("compiler_rt/divsf3.zig");
    190     _ = @import("compiler_rt/divdf3.zig");
    191     _ = @import("compiler_rt/divxf3.zig");
    192     _ = @import("compiler_rt/divtf3.zig");
    193 
    194     _ = @import("compiler_rt/neghf2.zig");
    195     _ = @import("compiler_rt/negsf2.zig");
    196     _ = @import("compiler_rt/negdf2.zig");
    197     _ = @import("compiler_rt/negtf2.zig");
    198     _ = @import("compiler_rt/negxf2.zig");
    199 
    200     // other
    201     _ = @import("compiler_rt/powiXf2.zig");
    202     _ = @import("compiler_rt/mulc3.zig");
    203     _ = @import("compiler_rt/mulhc3.zig");
    204     _ = @import("compiler_rt/mulsc3.zig");
    205     _ = @import("compiler_rt/muldc3.zig");
    206     _ = @import("compiler_rt/mulxc3.zig");
    207     _ = @import("compiler_rt/multc3.zig");
    208 
    209     _ = @import("compiler_rt/divc3.zig");
    210     _ = @import("compiler_rt/divhc3.zig");
    211     _ = @import("compiler_rt/divsc3.zig");
    212     _ = @import("compiler_rt/divdc3.zig");
    213     _ = @import("compiler_rt/divxc3.zig");
    214     _ = @import("compiler_rt/divtc3.zig");
    215 
    216     // Math routines. Alphabetically sorted.
    217     _ = @import("compiler_rt/ceil.zig");
    218     _ = @import("compiler_rt/cos.zig");
    219     _ = @import("compiler_rt/exp.zig");
    220     _ = @import("compiler_rt/exp2.zig");
    221     _ = @import("compiler_rt/fabs.zig");
    222     _ = @import("compiler_rt/floor.zig");
    223     _ = @import("compiler_rt/fma.zig");
    224     _ = @import("compiler_rt/fmax.zig");
    225     _ = @import("compiler_rt/fmin.zig");
    226     _ = @import("compiler_rt/fmod.zig");
    227     _ = @import("compiler_rt/log.zig");
    228     _ = @import("compiler_rt/log10.zig");
    229     _ = @import("compiler_rt/log2.zig");
    230     _ = @import("compiler_rt/round.zig");
    231     _ = @import("compiler_rt/sin.zig");
    232     _ = @import("compiler_rt/sincos.zig");
    233     _ = @import("compiler_rt/sqrt.zig");
    234     _ = @import("compiler_rt/tan.zig");
    235     _ = @import("compiler_rt/trunc.zig");
    236 
    237     // BigInt. Alphabetically sorted.
    238     _ = @import("compiler_rt/divmodei4.zig");
    239     _ = @import("compiler_rt/udivmodei4.zig");
    240     _ = @import("compiler_rt/udivmodti4.zig");
    241 
    242     // extra
    243     _ = @import("compiler_rt/os_version_check.zig");
    244     _ = @import("compiler_rt/emutls.zig");
    245     _ = @import("compiler_rt/arm.zig");
    246     _ = @import("compiler_rt/aulldiv.zig");
    247     _ = @import("compiler_rt/aullrem.zig");
    248     _ = @import("compiler_rt/clear_cache.zig");
    249     _ = @import("compiler_rt/hexagon.zig");
    250 
    251     if (@import("builtin").object_format != .c) {
    252         if (builtin.zig_backend != .stage2_aarch64) _ = @import("compiler_rt/atomics.zig");
    253         _ = @import("compiler_rt/stack_probe.zig");
    254 
    255         // macOS has these functions inside libSystem.
    256         if (builtin.cpu.arch.isAARCH64() and !builtin.os.tag.isDarwin()) {
    257             if (builtin.zig_backend != .stage2_aarch64) _ = @import("compiler_rt/aarch64_outline_atomics.zig");
    258         }
    259 
    260         _ = @import("compiler_rt/memcpy.zig");
    261         _ = @import("compiler_rt/memset.zig");
    262         _ = @import("compiler_rt/memmove.zig");
    263         _ = @import("compiler_rt/memcmp.zig");
    264         _ = @import("compiler_rt/bcmp.zig");
    265         _ = @import("compiler_rt/ssp.zig");
    266     }
    267 
    268     // Temporarily used for uefi until https://github.com/ziglang/zig/issues/21630 is addressed.
    269     if (!builtin.link_libc and (builtin.os.tag == .windows or builtin.os.tag == .uefi) and (builtin.abi == .none or builtin.abi == .msvc)) {
    270         @export(&_fltused, .{ .name = "_fltused", .linkage = common.linkage, .visibility = common.visibility });
    271     }
    272 }
    273 
    274 var _fltused: c_int = 1;