authorgravatar for seda18@rolmail.netDavid Senoner <seda18@rolmail.net> 2025-05-21 00:57:38+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2025-05-21 00:57:38+02:00
log55848363fd5c88bd6313880e770515a9c548c0df
tree1c2cb9fe2d20f6273d41e238aa366f775611f413
parenta63f7875f451bda975ddabcc0c1feed10a216516
signaturebadge-check Signed by PGP key B5690EEEBB952194

libc: implement common `abs` for various integer sizes (#23893)

* libc: implement common `abs` for various integer sizes * libc: move imaxabs to inttypes.zig and don't use cInclude * libc: delete `fabs` c implementations because already implemented in compiler_rt * libc: export functions depending on the target libc Previously all the functions that were exported were handled equally, though some may exist and some not inside the same file. Moving the checks inside the file allows handling different functions differently * remove empty ifs in inttypes Co-authored-by: Alex Rønne Petersen <alex@alexrp.com> * remove empty ifs in stdlib Co-authored-by: Alex Rønne Petersen <alex@alexrp.com> * libc: use `@abs` for the absolute value calculation --------- Co-authored-by: Alex Rønne Petersen <alex@alexrp.com>

42 files changed, 65 insertions(+), 428 deletions(-)

lib/c.zig+3
...@@ -14,6 +14,9 @@ else...@@ -14,6 +14,9 @@ else
14 std.debug.no_panic;14 std.debug.no_panic;
1515
16comptime {16comptime {
17 _ = @import("c/inttypes.zig");
18 _ = @import("c/stdlib.zig");
19
17 if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) {20 if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) {
18 // Files specific to musl and wasi-libc.21 // Files specific to musl and wasi-libc.
19 _ = @import("c/string.zig");22 _ = @import("c/string.zig");
lib/c/inttypes.zig created+20
...@@ -0,0 +1,20 @@
1const std = @import("std");
2const common = @import("common.zig");
3const builtin = @import("builtin");
4const intmax_t = std.c.intmax_t;
5
6comptime {
7 if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) {
8 // Functions specific to musl and wasi-libc.
9 @export(&imaxabs, .{ .name = "imaxabs", .linkage = common.linkage, .visibility = common.visibility });
10 }
11}
12
13fn imaxabs(a: intmax_t) callconv(.c) intmax_t {
14 return @intCast(@abs(a));
15}
16
17test imaxabs {
18 const val: intmax_t = -10;
19 try std.testing.expectEqual(10, imaxabs(val));
20}
lib/c/stdlib.zig created+39
...@@ -0,0 +1,39 @@
1const std = @import("std");
2const common = @import("common.zig");
3const builtin = @import("builtin");
4
5comptime {
6 if (builtin.target.isMuslLibC() or builtin.target.isWasiLibC()) {
7 // Functions specific to musl and wasi-libc.
8 @export(&abs, .{ .name = "abs", .linkage = common.linkage, .visibility = common.visibility });
9 @export(&labs, .{ .name = "labs", .linkage = common.linkage, .visibility = common.visibility });
10 @export(&llabs, .{ .name = "llabs", .linkage = common.linkage, .visibility = common.visibility });
11 }
12}
13
14fn abs(a: c_int) callconv(.c) c_int {
15 return @intCast(@abs(a));
16}
17
18fn labs(a: c_long) callconv(.c) c_long {
19 return @intCast(@abs(a));
20}
21
22fn llabs(a: c_longlong) callconv(.c) c_longlong {
23 return @intCast(@abs(a));
24}
25
26test abs {
27 const val: c_int = -10;
28 try std.testing.expectEqual(10, abs(val));
29}
30
31test labs {
32 const val: c_long = -10;
33 try std.testing.expectEqual(10, labs(val));
34}
35
36test llabs {
37 const val: c_longlong = -10;
38 try std.testing.expectEqual(10, llabs(val));
39}
lib/libc/mingw/math/fabsf.c deleted-18
...@@ -1,18 +0,0 @@
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6float fabsf (float x);
7
8float
9fabsf (float x)
10{
11#if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
12 return __builtin_fabsf (x);
13#elif defined(__i386__) || defined(_X86_)
14 float res = 0.0F;
15 asm volatile ("fabs;" : "=t" (res) : "0" (x));
16 return res;
17#endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_) */
18}
lib/libc/mingw/math/fabsl.c deleted-18
...@@ -1,18 +0,0 @@
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6long double fabsl (long double x);
7
8long double
9fabsl (long double x)
10{
11#if defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_)
12 long double res = 0.0L;
13 asm volatile ("fabs;" : "=t" (res) : "0" (x));
14 return res;
15#elif defined(__arm__) || defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
16 return __builtin_fabsl (x);
17#endif /* defined(__x86_64__) || defined(_AMD64_) || defined(__i386__) || defined(_X86_) */
18}
lib/libc/musl/src/math/aarch64/fabs.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3double fabs(double x)
4{
5 __asm__ ("fabs %d0, %d1" : "=w"(x) : "w"(x));
6 return x;
7}
lib/libc/musl/src/math/aarch64/fabsf.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3float fabsf(float x)
4{
5 __asm__ ("fabs %s0, %s1" : "=w"(x) : "w"(x));
6 return x;
7}
lib/libc/musl/src/math/arm/fabs.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if __ARM_PCS_VFP && __ARM_FP&8
4
5double fabs(double x)
6{
7 __asm__ ("vabs.f64 %P0, %P1" : "=w"(x) : "w"(x));
8 return x;
9}
10
11#else
12
13#include "../fabs.c"
14
15#endif
lib/libc/musl/src/math/arm/fabsf.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if __ARM_PCS_VFP && !BROKEN_VFP_ASM
4
5float fabsf(float x)
6{
7 __asm__ ("vabs.f32 %0, %1" : "=t"(x) : "t"(x));
8 return x;
9}
10
11#else
12
13#include "../fabsf.c"
14
15#endif
lib/libc/musl/src/math/fabs.c deleted-9
...@@ -1,9 +0,0 @@
1#include <math.h>
2#include <stdint.h>
3
4double fabs(double x)
5{
6 union {double f; uint64_t i;} u = {x};
7 u.i &= -1ULL/2;
8 return u.f;
9}
lib/libc/musl/src/math/fabsf.c deleted-9
...@@ -1,9 +0,0 @@
1#include <math.h>
2#include <stdint.h>
3
4float fabsf(float x)
5{
6 union {float f; uint32_t i;} u = {x};
7 u.i &= 0x7fffffff;
8 return u.f;
9}
lib/libc/musl/src/math/fabsl.c deleted-15
...@@ -1,15 +0,0 @@
1#include "libm.h"
2#if LDBL_MANT_DIG == 53 && LDBL_MAX_EXP == 1024
3long double fabsl(long double x)
4{
5 return fabs(x);
6}
7#elif (LDBL_MANT_DIG == 64 || LDBL_MANT_DIG == 113) && LDBL_MAX_EXP == 16384
8long double fabsl(long double x)
9{
10 union ldshape u = {x};
11
12 u.i.se &= 0x7fff;
13 return u.f;
14}
15#endif
lib/libc/musl/src/math/i386/fabs.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3double fabs(double x)
4{
5 __asm__ ("fabs" : "+t"(x));
6 return x;
7}
lib/libc/musl/src/math/i386/fabsf.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3float fabsf(float x)
4{
5 __asm__ ("fabs" : "+t"(x));
6 return x;
7}
lib/libc/musl/src/math/i386/fabsl.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3long double fabsl(long double x)
4{
5 __asm__ ("fabs" : "+t"(x));
6 return x;
7}
lib/libc/musl/src/math/mips/fabs.c deleted-16
...@@ -1,16 +0,0 @@
1#if !defined(__mips_soft_float) && defined(__mips_abs2008)
2
3#include <math.h>
4
5double fabs(double x)
6{
7 double r;
8 __asm__("abs.d %0,%1" : "=f"(r) : "f"(x));
9 return r;
10}
11
12#else
13
14#include "../fabs.c"
15
16#endif
lib/libc/musl/src/math/mips/fabsf.c deleted-16
...@@ -1,16 +0,0 @@
1#if !defined(__mips_soft_float) && defined(__mips_abs2008)
2
3#include <math.h>
4
5float fabsf(float x)
6{
7 float r;
8 __asm__("abs.s %0,%1" : "=f"(r) : "f"(x));
9 return r;
10}
11
12#else
13
14#include "../fabsf.c"
15
16#endif
lib/libc/musl/src/math/powerpc/fabs.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__) || defined(BROKEN_PPC_D_ASM)
4
5#include "../fabs.c"
6
7#else
8
9double fabs(double x)
10{
11 __asm__ ("fabs %0, %1" : "=d"(x) : "d"(x));
12 return x;
13}
14
15#endif
lib/libc/musl/src/math/powerpc/fabsf.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if defined(_SOFT_FLOAT) || defined(__NO_FPRS__)
4
5#include "../fabsf.c"
6
7#else
8
9float fabsf(float x)
10{
11 __asm__ ("fabs %0, %1" : "=f"(x) : "f"(x));
12 return x;
13}
14
15#endif
lib/libc/musl/src/math/powerpc64/fabs.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3double fabs(double x)
4{
5 __asm__ ("fabs %0, %1" : "=d"(x) : "d"(x));
6 return x;
7}
lib/libc/musl/src/math/powerpc64/fabsf.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3float fabsf(float x)
4{
5 __asm__ ("fabs %0, %1" : "=f"(x) : "f"(x));
6 return x;
7}
lib/libc/musl/src/math/riscv32/fabs.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if __riscv_flen >= 64
4
5double fabs(double x)
6{
7 __asm__ ("fabs.d %0, %1" : "=f"(x) : "f"(x));
8 return x;
9}
10
11#else
12
13#include "../fabs.c"
14
15#endif
lib/libc/musl/src/math/riscv32/fabsf.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if __riscv_flen >= 32
4
5float fabsf(float x)
6{
7 __asm__ ("fabs.s %0, %1" : "=f"(x) : "f"(x));
8 return x;
9}
10
11#else
12
13#include "../fabsf.c"
14
15#endif
lib/libc/musl/src/math/riscv64/fabs.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if __riscv_flen >= 64
4
5double fabs(double x)
6{
7 __asm__ ("fabs.d %0, %1" : "=f"(x) : "f"(x));
8 return x;
9}
10
11#else
12
13#include "../fabs.c"
14
15#endif
lib/libc/musl/src/math/riscv64/fabsf.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if __riscv_flen >= 32
4
5float fabsf(float x)
6{
7 __asm__ ("fabs.s %0, %1" : "=f"(x) : "f"(x));
8 return x;
9}
10
11#else
12
13#include "../fabsf.c"
14
15#endif
lib/libc/musl/src/math/s390x/fabs.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if defined(__HTM__) || __ARCH__ >= 9
4
5double fabs(double x)
6{
7 __asm__ ("lpdbr %0, %1" : "=f"(x) : "f"(x));
8 return x;
9}
10
11#else
12
13#include "../fabs.c"
14
15#endif
lib/libc/musl/src/math/s390x/fabsf.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if defined(__HTM__) || __ARCH__ >= 9
4
5float fabsf(float x)
6{
7 __asm__ ("lpebr %0, %1" : "=f"(x) : "f"(x));
8 return x;
9}
10
11#else
12
13#include "../fabsf.c"
14
15#endif
lib/libc/musl/src/math/s390x/fabsl.c deleted-15
...@@ -1,15 +0,0 @@
1#include <math.h>
2
3#if defined(__HTM__) || __ARCH__ >= 9
4
5long double fabsl(long double x)
6{
7 __asm__ ("lpxbr %0, %1" : "=f"(x) : "f"(x));
8 return x;
9}
10
11#else
12
13#include "../fabsl.c"
14
15#endif
lib/libc/musl/src/math/x32/fabs.s deleted-9
...@@ -1,9 +0,0 @@
1.global fabs
2.type fabs,@function
3fabs:
4 xor %eax,%eax
5 dec %rax
6 shr %rax
7 movq %rax,%xmm1
8 andpd %xmm1,%xmm0
9 ret
lib/libc/musl/src/math/x32/fabsf.s deleted-7
...@@ -1,7 +0,0 @@
1.global fabsf
2.type fabsf,@function
3fabsf:
4 mov $0x7fffffff,%eax
5 movq %rax,%xmm1
6 andps %xmm1,%xmm0
7 ret
lib/libc/musl/src/math/x32/fabsl.s deleted-6
...@@ -1,6 +0,0 @@
1.global fabsl
2.type fabsl,@function
3fabsl:
4 fldt 8(%esp)
5 fabs
6 ret
lib/libc/musl/src/math/x86_64/fabs.c deleted-10
...@@ -1,10 +0,0 @@
1#include <math.h>
2
3double fabs(double x)
4{
5 double t;
6 __asm__ ("pcmpeqd %0, %0" : "=x"(t)); // t = ~0
7 __asm__ ("psrlq $1, %0" : "+x"(t)); // t >>= 1
8 __asm__ ("andps %1, %0" : "+x"(x) : "x"(t)); // x &= t
9 return x;
10}
lib/libc/musl/src/math/x86_64/fabsf.c deleted-10
...@@ -1,10 +0,0 @@
1#include <math.h>
2
3float fabsf(float x)
4{
5 float t;
6 __asm__ ("pcmpeqd %0, %0" : "=x"(t)); // t = ~0
7 __asm__ ("psrld $1, %0" : "+x"(t)); // t >>= 1
8 __asm__ ("andps %1, %0" : "+x"(x) : "x"(t)); // x &= t
9 return x;
10}
lib/libc/musl/src/math/x86_64/fabsl.c deleted-7
...@@ -1,7 +0,0 @@
1#include <math.h>
2
3long double fabsl(long double x)
4{
5 __asm__ ("fabs" : "+t"(x));
6 return x;
7}
lib/libc/musl/src/stdlib/abs.c deleted-6
...@@ -1,6 +0,0 @@
1#include <stdlib.h>
2
3int abs(int a)
4{
5 return a>0 ? a : -a;
6}
lib/libc/musl/src/stdlib/imaxabs.c deleted-6
...@@ -1,6 +0,0 @@
1#include <inttypes.h>
2
3intmax_t imaxabs(intmax_t a)
4{
5 return a>0 ? a : -a;
6}
lib/libc/musl/src/stdlib/labs.c deleted-6
...@@ -1,6 +0,0 @@
1#include <stdlib.h>
2
3long labs(long a)
4{
5 return a>0 ? a : -a;
6}
lib/libc/musl/src/stdlib/llabs.c deleted-6
...@@ -1,6 +0,0 @@
1#include <stdlib.h>
2
3long long llabs(long long a)
4{
5 return a>0 ? a : -a;
6}
lib/std/c.zig+3
...@@ -10822,6 +10822,9 @@ else...@@ -10822,6 +10822,9 @@ else
10822 b: c_longdouble,10822 b: c_longdouble,
10823 };10823 };
1082410824
10825pub const intmax_t = i64;
10826pub const uintmax_t = u64;
10827
10825pub extern "c" fn pthread_getthreadid_np() c_int;10828pub extern "c" fn pthread_getthreadid_np() c_int;
10826pub extern "c" fn pthread_set_name_np(thread: pthread_t, name: [*:0]const u8) void;10829pub extern "c" fn pthread_set_name_np(thread: pthread_t, name: [*:0]const u8) void;
10827pub extern "c" fn pthread_get_name_np(thread: pthread_t, name: [*:0]u8, len: usize) void;10830pub extern "c" fn pthread_get_name_np(thread: pthread_t, name: [*:0]u8, len: usize) void;
src/libs/mingw.zig-2
...@@ -574,7 +574,6 @@ const mingw32_generic_src = [_][]const u8{...@@ -574,7 +574,6 @@ const mingw32_generic_src = [_][]const u8{
574 "gdtoa" ++ path.sep_str ++ "sum.c",574 "gdtoa" ++ path.sep_str ++ "sum.c",
575 "gdtoa" ++ path.sep_str ++ "ulp.c",575 "gdtoa" ++ path.sep_str ++ "ulp.c",
576 "math" ++ path.sep_str ++ "coshl.c",576 "math" ++ path.sep_str ++ "coshl.c",
577 "math" ++ path.sep_str ++ "fabsl.c",
578 "math" ++ path.sep_str ++ "fp_consts.c",577 "math" ++ path.sep_str ++ "fp_consts.c",
579 "math" ++ path.sep_str ++ "fp_constsf.c",578 "math" ++ path.sep_str ++ "fp_constsf.c",
580 "math" ++ path.sep_str ++ "fp_constsl.c",579 "math" ++ path.sep_str ++ "fp_constsl.c",
...@@ -946,7 +945,6 @@ const mingw32_x86_src = [_][]const u8{...@@ -946,7 +945,6 @@ const mingw32_x86_src = [_][]const u8{
946 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "sinl_internal.S",945 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "sinl_internal.S",
947 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "tanl.S",946 "math" ++ path.sep_str ++ "x86" ++ path.sep_str ++ "tanl.S",
948 // ucrtbase947 // ucrtbase
949 "math" ++ path.sep_str ++ "fabsf.c",
950 "math" ++ path.sep_str ++ "nextafterl.c",948 "math" ++ path.sep_str ++ "nextafterl.c",
951 "math" ++ path.sep_str ++ "nexttoward.c",949 "math" ++ path.sep_str ++ "nexttoward.c",
952 "math" ++ path.sep_str ++ "nexttowardf.c",950 "math" ++ path.sep_str ++ "nexttowardf.c",
src/libs/musl.zig-33
...@@ -825,8 +825,6 @@ const src_files = [_][]const u8{...@@ -825,8 +825,6 @@ const src_files = [_][]const u8{
825 "musl/src/malloc/replaced.c",825 "musl/src/malloc/replaced.c",
826 "musl/src/math/aarch64/ceil.c",826 "musl/src/math/aarch64/ceil.c",
827 "musl/src/math/aarch64/ceilf.c",827 "musl/src/math/aarch64/ceilf.c",
828 "musl/src/math/aarch64/fabs.c",
829 "musl/src/math/aarch64/fabsf.c",
830 "musl/src/math/aarch64/floor.c",828 "musl/src/math/aarch64/floor.c",
831 "musl/src/math/aarch64/floorf.c",829 "musl/src/math/aarch64/floorf.c",
832 "musl/src/math/aarch64/fma.c",830 "musl/src/math/aarch64/fma.c",
...@@ -859,8 +857,6 @@ const src_files = [_][]const u8{...@@ -859,8 +857,6 @@ const src_files = [_][]const u8{
859 "musl/src/math/acoshf.c",857 "musl/src/math/acoshf.c",
860 "musl/src/math/acoshl.c",858 "musl/src/math/acoshl.c",
861 "musl/src/math/acosl.c",859 "musl/src/math/acosl.c",
862 "musl/src/math/arm/fabs.c",
863 "musl/src/math/arm/fabsf.c",
864 "musl/src/math/arm/fma.c",860 "musl/src/math/arm/fma.c",
865 "musl/src/math/arm/fmaf.c",861 "musl/src/math/arm/fmaf.c",
866 "musl/src/math/arm/sqrt.c",862 "musl/src/math/arm/sqrt.c",
...@@ -917,9 +913,6 @@ const src_files = [_][]const u8{...@@ -917,9 +913,6 @@ const src_files = [_][]const u8{
917 "musl/src/math/expm1l.c",913 "musl/src/math/expm1l.c",
918 "musl/src/math/__expo2.c",914 "musl/src/math/__expo2.c",
919 "musl/src/math/__expo2f.c",915 "musl/src/math/__expo2f.c",
920 "musl/src/math/fabs.c",
921 "musl/src/math/fabsf.c",
922 "musl/src/math/fabsl.c",
923 "musl/src/math/fdim.c",916 "musl/src/math/fdim.c",
924 "musl/src/math/fdimf.c",917 "musl/src/math/fdimf.c",
925 "musl/src/math/fdiml.c",918 "musl/src/math/fdiml.c",
...@@ -968,9 +961,6 @@ const src_files = [_][]const u8{...@@ -968,9 +961,6 @@ const src_files = [_][]const u8{
968 "musl/src/math/i386/exp_ld.s",961 "musl/src/math/i386/exp_ld.s",
969 "musl/src/math/i386/expl.s",962 "musl/src/math/i386/expl.s",
970 "musl/src/math/i386/expm1l.s",963 "musl/src/math/i386/expm1l.s",
971 "musl/src/math/i386/fabs.c",
972 "musl/src/math/i386/fabsf.c",
973 "musl/src/math/i386/fabsl.c",
974 "musl/src/math/i386/floorf.s",964 "musl/src/math/i386/floorf.s",
975 "musl/src/math/i386/floorl.s",965 "musl/src/math/i386/floorl.s",
976 "musl/src/math/i386/floor.s",966 "musl/src/math/i386/floor.s",
...@@ -1083,8 +1073,6 @@ const src_files = [_][]const u8{...@@ -1083,8 +1073,6 @@ const src_files = [_][]const u8{
1083 "musl/src/math/__math_uflowf.c",1073 "musl/src/math/__math_uflowf.c",
1084 "musl/src/math/__math_xflow.c",1074 "musl/src/math/__math_xflow.c",
1085 "musl/src/math/__math_xflowf.c",1075 "musl/src/math/__math_xflowf.c",
1086 "musl/src/math/mips/fabs.c",
1087 "musl/src/math/mips/fabsf.c",
1088 "musl/src/math/mips/sqrt.c",1076 "musl/src/math/mips/sqrt.c",
1089 "musl/src/math/mips/sqrtf.c",1077 "musl/src/math/mips/sqrtf.c",
1090 "musl/src/math/modf.c",1078 "musl/src/math/modf.c",
...@@ -1107,8 +1095,6 @@ const src_files = [_][]const u8{...@@ -1107,8 +1095,6 @@ const src_files = [_][]const u8{
1107 "musl/src/math/pow_data.c",1095 "musl/src/math/pow_data.c",
1108 "musl/src/math/powerpc64/ceil.c",1096 "musl/src/math/powerpc64/ceil.c",
1109 "musl/src/math/powerpc64/ceilf.c",1097 "musl/src/math/powerpc64/ceilf.c",
1110 "musl/src/math/powerpc64/fabs.c",
1111 "musl/src/math/powerpc64/fabsf.c",
1112 "musl/src/math/powerpc64/floor.c",1098 "musl/src/math/powerpc64/floor.c",
1113 "musl/src/math/powerpc64/floorf.c",1099 "musl/src/math/powerpc64/floorf.c",
1114 "musl/src/math/powerpc64/fma.c",1100 "musl/src/math/powerpc64/fma.c",
...@@ -1127,8 +1113,6 @@ const src_files = [_][]const u8{...@@ -1127,8 +1113,6 @@ const src_files = [_][]const u8{
1127 "musl/src/math/powerpc64/sqrtf.c",1113 "musl/src/math/powerpc64/sqrtf.c",
1128 "musl/src/math/powerpc64/trunc.c",1114 "musl/src/math/powerpc64/trunc.c",
1129 "musl/src/math/powerpc64/truncf.c",1115 "musl/src/math/powerpc64/truncf.c",
1130 "musl/src/math/powerpc/fabs.c",
1131 "musl/src/math/powerpc/fabsf.c",
1132 "musl/src/math/powerpc/fma.c",1116 "musl/src/math/powerpc/fma.c",
1133 "musl/src/math/powerpc/fmaf.c",1117 "musl/src/math/powerpc/fmaf.c",
1134 "musl/src/math/powerpc/sqrt.c",1118 "musl/src/math/powerpc/sqrt.c",
...@@ -1151,8 +1135,6 @@ const src_files = [_][]const u8{...@@ -1151,8 +1135,6 @@ const src_files = [_][]const u8{
1151 "musl/src/math/rintl.c",1135 "musl/src/math/rintl.c",
1152 "musl/src/math/riscv32/copysign.c",1136 "musl/src/math/riscv32/copysign.c",
1153 "musl/src/math/riscv32/copysignf.c",1137 "musl/src/math/riscv32/copysignf.c",
1154 "musl/src/math/riscv32/fabs.c",
1155 "musl/src/math/riscv32/fabsf.c",
1156 "musl/src/math/riscv32/fma.c",1138 "musl/src/math/riscv32/fma.c",
1157 "musl/src/math/riscv32/fmaf.c",1139 "musl/src/math/riscv32/fmaf.c",
1158 "musl/src/math/riscv32/fmax.c",1140 "musl/src/math/riscv32/fmax.c",
...@@ -1163,8 +1145,6 @@ const src_files = [_][]const u8{...@@ -1163,8 +1145,6 @@ const src_files = [_][]const u8{
1163 "musl/src/math/riscv32/sqrtf.c",1145 "musl/src/math/riscv32/sqrtf.c",
1164 "musl/src/math/riscv64/copysign.c",1146 "musl/src/math/riscv64/copysign.c",
1165 "musl/src/math/riscv64/copysignf.c",1147 "musl/src/math/riscv64/copysignf.c",
1166 "musl/src/math/riscv64/fabs.c",
1167 "musl/src/math/riscv64/fabsf.c",
1168 "musl/src/math/riscv64/fma.c",1148 "musl/src/math/riscv64/fma.c",
1169 "musl/src/math/riscv64/fmaf.c",1149 "musl/src/math/riscv64/fmaf.c",
1170 "musl/src/math/riscv64/fmax.c",1150 "musl/src/math/riscv64/fmax.c",
...@@ -1179,9 +1159,6 @@ const src_files = [_][]const u8{...@@ -1179,9 +1159,6 @@ const src_files = [_][]const u8{
1179 "musl/src/math/s390x/ceil.c",1159 "musl/src/math/s390x/ceil.c",
1180 "musl/src/math/s390x/ceilf.c",1160 "musl/src/math/s390x/ceilf.c",
1181 "musl/src/math/s390x/ceill.c",1161 "musl/src/math/s390x/ceill.c",
1182 "musl/src/math/s390x/fabs.c",
1183 "musl/src/math/s390x/fabsf.c",
1184 "musl/src/math/s390x/fabsl.c",
1185 "musl/src/math/s390x/floor.c",1162 "musl/src/math/s390x/floor.c",
1186 "musl/src/math/s390x/floorf.c",1163 "musl/src/math/s390x/floorf.c",
1187 "musl/src/math/s390x/floorl.c",1164 "musl/src/math/s390x/floorl.c",
...@@ -1255,9 +1232,6 @@ const src_files = [_][]const u8{...@@ -1255,9 +1232,6 @@ const src_files = [_][]const u8{
1255 "musl/src/math/x32/exp2l.s",1232 "musl/src/math/x32/exp2l.s",
1256 "musl/src/math/x32/expl.s",1233 "musl/src/math/x32/expl.s",
1257 "musl/src/math/x32/expm1l.s",1234 "musl/src/math/x32/expm1l.s",
1258 "musl/src/math/x32/fabsf.s",
1259 "musl/src/math/x32/fabsl.s",
1260 "musl/src/math/x32/fabs.s",
1261 "musl/src/math/x32/floorl.s",1235 "musl/src/math/x32/floorl.s",
1262 "musl/src/math/x32/fma.c",1236 "musl/src/math/x32/fma.c",
1263 "musl/src/math/x32/fmaf.c",1237 "musl/src/math/x32/fmaf.c",
...@@ -1287,9 +1261,6 @@ const src_files = [_][]const u8{...@@ -1287,9 +1261,6 @@ const src_files = [_][]const u8{
1287 "musl/src/math/x86_64/exp2l.s",1261 "musl/src/math/x86_64/exp2l.s",
1288 "musl/src/math/x86_64/expl.s",1262 "musl/src/math/x86_64/expl.s",
1289 "musl/src/math/x86_64/expm1l.s",1263 "musl/src/math/x86_64/expm1l.s",
1290 "musl/src/math/x86_64/fabs.c",
1291 "musl/src/math/x86_64/fabsf.c",
1292 "musl/src/math/x86_64/fabsl.c",
1293 "musl/src/math/x86_64/floorl.s",1264 "musl/src/math/x86_64/floorl.s",
1294 "musl/src/math/x86_64/fma.c",1265 "musl/src/math/x86_64/fma.c",
1295 "musl/src/math/x86_64/fmaf.c",1266 "musl/src/math/x86_64/fmaf.c",
...@@ -1809,7 +1780,6 @@ const src_files = [_][]const u8{...@@ -1809,7 +1780,6 @@ const src_files = [_][]const u8{
1809 "musl/src/stdio/vwscanf.c",1780 "musl/src/stdio/vwscanf.c",
1810 "musl/src/stdio/wprintf.c",1781 "musl/src/stdio/wprintf.c",
1811 "musl/src/stdio/wscanf.c",1782 "musl/src/stdio/wscanf.c",
1812 "musl/src/stdlib/abs.c",
1813 "musl/src/stdlib/atof.c",1783 "musl/src/stdlib/atof.c",
1814 "musl/src/stdlib/atoi.c",1784 "musl/src/stdlib/atoi.c",
1815 "musl/src/stdlib/atol.c",1785 "musl/src/stdlib/atol.c",
...@@ -1819,11 +1789,8 @@ const src_files = [_][]const u8{...@@ -1819,11 +1789,8 @@ const src_files = [_][]const u8{
1819 "musl/src/stdlib/ecvt.c",1789 "musl/src/stdlib/ecvt.c",
1820 "musl/src/stdlib/fcvt.c",1790 "musl/src/stdlib/fcvt.c",
1821 "musl/src/stdlib/gcvt.c",1791 "musl/src/stdlib/gcvt.c",
1822 "musl/src/stdlib/imaxabs.c",
1823 "musl/src/stdlib/imaxdiv.c",1792 "musl/src/stdlib/imaxdiv.c",
1824 "musl/src/stdlib/labs.c",
1825 "musl/src/stdlib/ldiv.c",1793 "musl/src/stdlib/ldiv.c",
1826 "musl/src/stdlib/llabs.c",
1827 "musl/src/stdlib/lldiv.c",1794 "musl/src/stdlib/lldiv.c",
1828 "musl/src/stdlib/qsort.c",1795 "musl/src/stdlib/qsort.c",
1829 "musl/src/stdlib/qsort_nr.c",1796 "musl/src/stdlib/qsort_nr.c",
src/libs/wasi_libc.zig-5
...@@ -751,7 +751,6 @@ const libc_top_half_src_files = [_][]const u8{...@@ -751,7 +751,6 @@ const libc_top_half_src_files = [_][]const u8{
751 "musl/src/math/expm1.c",751 "musl/src/math/expm1.c",
752 "musl/src/math/expm1f.c",752 "musl/src/math/expm1f.c",
753 "musl/src/math/expm1l.c",753 "musl/src/math/expm1l.c",
754 "musl/src/math/fabsl.c",
755 "musl/src/math/fdim.c",754 "musl/src/math/fdim.c",
756 "musl/src/math/fdimf.c",755 "musl/src/math/fdimf.c",
757 "musl/src/math/fdiml.c",756 "musl/src/math/fdiml.c",
...@@ -1024,7 +1023,6 @@ const libc_top_half_src_files = [_][]const u8{...@@ -1024,7 +1023,6 @@ const libc_top_half_src_files = [_][]const u8{
1024 "musl/src/stdio/vwscanf.c",1023 "musl/src/stdio/vwscanf.c",
1025 "musl/src/stdio/wprintf.c",1024 "musl/src/stdio/wprintf.c",
1026 "musl/src/stdio/wscanf.c",1025 "musl/src/stdio/wscanf.c",
1027 "musl/src/stdlib/abs.c",
1028 "musl/src/stdlib/atof.c",1026 "musl/src/stdlib/atof.c",
1029 "musl/src/stdlib/atoi.c",1027 "musl/src/stdlib/atoi.c",
1030 "musl/src/stdlib/atol.c",1028 "musl/src/stdlib/atol.c",
...@@ -1034,11 +1032,8 @@ const libc_top_half_src_files = [_][]const u8{...@@ -1034,11 +1032,8 @@ const libc_top_half_src_files = [_][]const u8{
1034 "musl/src/stdlib/ecvt.c",1032 "musl/src/stdlib/ecvt.c",
1035 "musl/src/stdlib/fcvt.c",1033 "musl/src/stdlib/fcvt.c",
1036 "musl/src/stdlib/gcvt.c",1034 "musl/src/stdlib/gcvt.c",
1037 "musl/src/stdlib/imaxabs.c",
1038 "musl/src/stdlib/imaxdiv.c",1035 "musl/src/stdlib/imaxdiv.c",
1039 "musl/src/stdlib/labs.c",
1040 "musl/src/stdlib/ldiv.c",1036 "musl/src/stdlib/ldiv.c",
1041 "musl/src/stdlib/llabs.c",
1042 "musl/src/stdlib/lldiv.c",1037 "musl/src/stdlib/lldiv.c",
1043 "musl/src/stdlib/qsort.c",1038 "musl/src/stdlib/qsort.c",
1044 "musl/src/stdlib/qsort_nr.c",1039 "musl/src/stdlib/qsort_nr.c",