mirror of
https://codeberg.org/ziglang/zig.git
synced 2026-04-27 19:09:47 +03:00
04c180c8e5
introduce `symbol` helper function and partially migrate to using it
20 lines
470 B
Zig
20 lines
470 B
Zig
const common = @import("./common.zig");
|
|
const symbol = @import("../compiler_rt.zig").symbol;
|
|
const mulf3 = @import("./mulf3.zig").mulf3;
|
|
|
|
comptime {
|
|
if (common.want_aeabi) {
|
|
symbol(&__aeabi_dmul, "__aeabi_dmul");
|
|
} else {
|
|
symbol(&__muldf3, "__muldf3");
|
|
}
|
|
}
|
|
|
|
pub fn __muldf3(a: f64, b: f64) callconv(.c) f64 {
|
|
return mulf3(f64, a, b);
|
|
}
|
|
|
|
fn __aeabi_dmul(a: f64, b: f64) callconv(.{ .arm_aapcs = .{} }) f64 {
|
|
return mulf3(f64, a, b);
|
|
}
|