| author | |
| committer | |
| log | 827538b88f9b440454616ec497b5f303fa199e59 |
| tree | 23fc0b623d4984b95ed8a3f864016d598bf244fd |
| parent | a5dc3f03423befa5a2ec1efc07f9bf26eae1a3d9 |
| parent | 65058ebd72d06ee5f920df3e2c3e68dd77f5fccf |
| signature |
add compiler_rt ceilf/ceil/ceill2 files changed, 17 insertions(+), 19 deletions(-)
lib/std/special/c.zig-19| ... | ... | @@ -83,10 +83,6 @@ comptime { |
| 83 | 83 | @export(log10, .{ .name = "log10", .linkage = .Strong }); |
| 84 | 84 | @export(log10f, .{ .name = "log10f", .linkage = .Strong }); |
| 85 | 85 | |
| 86 | @export(ceil, .{ .name = "ceil", .linkage = .Strong }); | |
| 87 | @export(ceilf, .{ .name = "ceilf", .linkage = .Strong }); | |
| 88 | @export(ceill, .{ .name = "ceill", .linkage = .Strong }); | |
| 89 | ||
| 90 | 86 | @export(fmod, .{ .name = "fmod", .linkage = .Strong }); |
| 91 | 87 | @export(fmodf, .{ .name = "fmodf", .linkage = .Strong }); |
| 92 | 88 | |
| ... | ... | @@ -429,21 +425,6 @@ fn log10f(a: f32) callconv(.C) f32 { |
| 429 | 425 | return math.log10(a); |
| 430 | 426 | } |
| 431 | 427 | |
| 432 | fn ceilf(x: f32) callconv(.C) f32 { | |
| 433 | return math.ceil(x); | |
| 434 | } | |
| 435 | ||
| 436 | fn ceil(x: f64) callconv(.C) f64 { | |
| 437 | return math.ceil(x); | |
| 438 | } | |
| 439 | ||
| 440 | fn ceill(x: c_longdouble) callconv(.C) c_longdouble { | |
| 441 | if (!long_double_is_f128) { | |
| 442 | @panic("TODO implement this"); | |
| 443 | } | |
| 444 | return math.ceil(x); | |
| 445 | } | |
| 446 | ||
| 447 | 428 | fn fmodf(x: f32, y: f32) callconv(.C) f32 { |
| 448 | 429 | return generic_fmod(f32, x, y); |
| 449 | 430 | } |
lib/std/special/compiler_rt.zig+17| ... | ... | @@ -680,6 +680,10 @@ comptime { |
| 680 | 680 | @export(floor, .{ .name = "floor", .linkage = linkage }); |
| 681 | 681 | @export(floorl, .{ .name = "floorl", .linkage = linkage }); |
| 682 | 682 | |
| 683 | @export(ceilf, .{ .name = "ceilf", .linkage = linkage }); | |
| 684 | @export(ceil, .{ .name = "ceil", .linkage = linkage }); | |
| 685 | @export(ceill, .{ .name = "ceill", .linkage = linkage }); | |
| 686 | ||
| 683 | 687 | @export(fma, .{ .name = "fma", .linkage = linkage }); |
| 684 | 688 | @export(fmaf, .{ .name = "fmaf", .linkage = linkage }); |
| 685 | 689 | @export(fmal, .{ .name = "fmal", .linkage = linkage }); |
| ... | ... | @@ -811,6 +815,19 @@ fn floorl(x: c_longdouble) callconv(.C) c_longdouble { |
| 811 | 815 | return math.floor(x); |
| 812 | 816 | } |
| 813 | 817 | |
| 818 | fn ceilf(x: f32) callconv(.C) f32 { | |
| 819 | return math.ceil(x); | |
| 820 | } | |
| 821 | fn ceil(x: f64) callconv(.C) f64 { | |
| 822 | return math.ceil(x); | |
| 823 | } | |
| 824 | fn ceill(x: c_longdouble) callconv(.C) c_longdouble { | |
| 825 | if (!long_double_is_f128) { | |
| 826 | @panic("TODO implement this"); | |
| 827 | } | |
| 828 | return math.ceil(x); | |
| 829 | } | |
| 830 | ||
| 814 | 831 | // Avoid dragging in the runtime safety mechanisms into this .o file, |
| 815 | 832 | // unless we're trying to test this file. |
| 816 | 833 | pub fn panic(msg: []const u8, error_return_trace: ?*std.builtin.StackTrace) noreturn { |