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