On Wed, 12 Mar 2025, Jacek Caban wrote:
These files are already in a target-specific directory, and it's the build
system's job to include them only for applicable targets.
This also allows their use for ARM64EC.
---
mingw-w64-crt/math/arm-common/acoshl.c | 4 ----
mingw-w64-crt/math/arm-common/asinhl.c | 4 ----
mingw-w64-crt/math/arm-common/atanhl.c | 4 ----
mingw-w64-crt/math/arm-common/expm1l.c | 4 ----
mingw-w64-crt/math/arm-common/ilogbl.c | 4 ----
mingw-w64-crt/math/arm-common/ldexpl.c | 4 ----
mingw-w64-crt/math/arm-common/log1pl.c | 4 ----
mingw-w64-crt/math/arm-common/log2.c | 4 ----
mingw-w64-crt/math/arm-common/logbl.c | 4 ----
mingw-w64-crt/math/arm-common/powl.c | 4 ----
mingw-w64-crt/math/arm-common/remainderl.c | 4 ----
mingw-w64-crt/math/arm-common/remquol.c | 4 ----
mingw-w64-crt/math/arm-common/scalbn.c | 8 --------
13 files changed, 56 deletions(-)
diff --git a/mingw-w64-crt/math/arm-common/acoshl.c
b/mingw-w64-crt/math/arm-common/acoshl.c
index c2157bebc..451926e3b 100644
--- a/mingw-w64-crt/math/arm-common/acoshl.c
+++ b/mingw-w64-crt/math/arm-common/acoshl.c
@@ -8,9 +8,5 @@
long double acoshl(long double x)
{
-#if defined(__arm__) || defined(_ARM_) || defined(__aarch64__) ||
defined(_ARM64_)
return acosh(x);
-#else
-#error Not supported on your platform yet
-#endif
}
While we are in an architecture specific directory, this kind of #error is
somewhat nice to make sure one doesn't accidentally use this kind of code
if we're building it in an unexpected configuration. (To be honest,
there's a huge number of various scattered math functions, and if building
in various test configuratons it's not very easy to make sure that all
functions really are covered.)
But for arm64ec, we could change these ifdefs into "#if
__SIZEOF_LONG_DOUBLE__ == __SIZEOF_DOUBLE__" then we should pick the same
existing codepath for now. (And if the arm64ec environment gets 80 bit
long doubles in the future, it should make it clear that these codepaths
no longer are suitable as such.)
What do you think?
// Martin
_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public