On Sun, 9 Feb 2025, Jacek Caban wrote:

Additionally, x86 MinGW's fenv.h defines structures like fenv_t and certain constants that are incompatible with other fenv.h implementations. Instead of carrying over these quirks, ARM64EC uses ARM64 variants that align with MSVC and the broader Windows ecosystem.

I believe that it would be good to include this rationale here in the commit message of patch 1/3 (possibly other bits of this cover letter in the commit messages of the other patches as well; I haven't looked that far yet).

It may also be good to include a bit of introduction in the commit message; each time I look at fenv.h it takes a bit of time to wrap my head around how it works, as it differs quite significantly from the corresponding MSVC ones.

If I remember correctly, our fenv.h directly exposes the architecture specific control words, as they are provided by the FPU. I.e. the fenv_t data type, and the flags/masks, have entirely different definitions across architectures.

On the other hand, the MSVC fenv.h uses architecture independent generalized definitions outwards, that don't exactly match any specific architecture, and the fesetenv/fegetenv functions translate between the architecture specific interface and the external public interface.

// 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