diff --git a/lib/c/math.zig b/lib/c/math.zig index 582c7232c8e05d1ac4fba803d087ed9457df6486..0621b4af9726ec9df87e55a1319c1e9ace74a677 100644 --- a/lib/c/math.zig +++ b/lib/c/math.zig @@ -49,6 +49,7 @@ comptime { } if (builtin.target.isMinGW() or builtin.target.isMuslLibC()) { + symbol(&rint, "rint"); symbol(&rintf, "rintf"); } @@ -81,7 +82,6 @@ comptime { if (builtin.target.isMuslLibC()) { symbol(©sign, "copysign"); symbol(©signf, "copysignf"); - symbol(&rint, "rint"); } symbol(©signl, "copysignl"); diff --git a/lib/libc/mingw/math/arm64/rint.c b/lib/libc/mingw/math/arm64/rint.c deleted file mode 100644 index 03a7ffa0a723b954eedfb5a688291094abf944b4..0000000000000000000000000000000000000000 --- a/lib/libc/mingw/math/arm64/rint.c +++ /dev/null @@ -1,12 +0,0 @@ -/** - * This file has no copyright assigned and is placed in the Public Domain. - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER.PD within this package. - */ -#include - -double rint (double x) { - double retval = 0.0; - __asm__ __volatile__ ("frintx %d0, %d1\n\t" : "=w" (retval) : "w" (x)); - return retval; -} diff --git a/src/libs/mingw.zig b/src/libs/mingw.zig index 2a3c858030e7b1f1e7f58f71f6262fecf01be14d..4a16f4e0a6fd49814374a2e3bd6cf1e9a66b5fb6 100644 --- a/src/libs/mingw.zig +++ b/src/libs/mingw.zig @@ -995,7 +995,6 @@ const mingw32_arm32_src = [_][]const u8{ const mingw32_arm64_src = [_][]const u8{ // mingwex - "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "rint.c", "math" ++ path.sep_str ++ "arm64" ++ path.sep_str ++ "sincos.S", };