On Thu, 3 Apr 2025, Jacek Caban wrote:

---
This includes functions needed for ARM64EC support that are not covered
by Martin's WIP long-double-64 branch.

mingw-w64-crt/math/cephes_mconf.h | 4 ++--
mingw-w64-crt/math/fmal.c         | 2 +-
mingw-w64-crt/math/fpclassifyl.c  | 6 +++---
mingw-w64-crt/math/frexpl.c       | 2 +-
mingw-w64-crt/math/lrintl.c       | 6 +++---
mingw-w64-crt/math/rintl.c        | 6 +++---
mingw-w64-crt/math/signbit.c      | 2 +-
7 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/mingw-w64-crt/math/signbit.c b/mingw-w64-crt/math/signbit.c
index a97d8b9e9..b123b51cf 100644
--- a/mingw-w64-crt/math/signbit.c
+++ b/mingw-w64-crt/math/signbit.c
@@ -16,7 +16,7 @@ typedef union __mingw_dbl_type_t {

int __signbit (double x)
{
-#if defined(__x86_64__) || defined(_AMD64_) || defined(__arm__) || 
defined(_ARM_) || defined(__aarch64__) || defined(_ARM64_)
+#if __SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__
    __mingw_dbl_type_t hlp;

    hlp.x = x;
--

Actually, this change here breaks x86_64 (there are compile warnings about x being unused and the function reaching the end without a return); previously we did had ifdefs for x86_64, arm and aarch64 here.

I don't see a need to change this ifdef at all, wrt arm64ec actually (as that should pick the x86_64 codepath), and checking the size of long double here seems wrong - this function only deals with regular doubles.

So we probably could and should revert this change.

If we want to simplify it, we could reorder things, so that we'd first have the i386 specific codepath, and then an #else for all other platforms.

// Martin



_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to