On Sun, 20 Mar 2022, Jeremy Drake via Mingw-w64-public wrote:
Microsoft defines this to the same value on x64, ARM, and ARM64, so do
the same.
This constant is used by Cairo. See
https://github.com/msys2/MINGW-packages/issues/11053
Signed-off-by: Jeremy Drake <[email protected]>
---
mingw-w64-headers/crt/float.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mingw-w64-headers/crt/float.h b/mingw-w64-headers/crt/float.h
index ac534a49a..da8717b83 100644
--- a/mingw-w64-headers/crt/float.h
+++ b/mingw-w64-headers/crt/float.h
@@ -245,7 +245,7 @@
#define _CW_DEFAULT
(_RC_NEAR+_PC_53+_EM_INVALID+_EM_ZERODIVIDE+_EM_OVERFLOW+_EM_UNDERFLOW+_EM_INEXACT+_EM_DENORMAL)
#elif defined(__ia64__)
#define _CW_DEFAULT
(_RC_NEAR+_PC_64+_EM_INVALID+_EM_ZERODIVIDE+_EM_OVERFLOW+_EM_UNDERFLOW+_EM_INEXACT+_EM_DENORMAL)
-#elif defined(__x86_64__)
+#elif defined(__x86_64__) || defined(__arm__) || defined(__aarch64__)
#define _CW_DEFAULT
(_RC_NEAR+_EM_INVALID+_EM_ZERODIVIDE+_EM_OVERFLOW+_EM_UNDERFLOW+_EM_INEXACT+_EM_DENORMAL)
#endif
LGTM, pushed.
Note, there's some amount of divergence between mingw-w64 and MSVC headers
regarding these bits... The bits used for _controlfp here in float.h,
_RC_UP/_RC_DOWN/_RC_CHOP etc, are the same as the bits for
FE_UPWARD/FE_DOWNWARD/FE_TOWARDZERO in fenv.h in MSVC headers. In
mingw-w64 headers, the _RC_* values match their MSVC counterparts, but the
fenv.h constants are different - they have arch specific values, matching
the corresponding bits in the float control words for those architectures.
Therefore, for the fenv.h functions, it's important that it ends up using
the ones from mingw-w64-crt and not importing the corresponding functions
from UCRT.
// Martin
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public