On 2026-10-20 12:40, Pali Rohár wrote:
+#if defined(__i386__)
+  /* msvcrt _fpreset() on i386 changes the x87 precision to 53-bit,
+   * so no change is needed */
+#elif defined(__x86_64__)

This breaks the arm64ec build. arm64ec defines __x86_64__, and CRT_fp8.o
is built for arm64ec too (it's in the libarm64 object list), so the x87
asm ends up being compiled as ARM64 code:

  CRT_fp8.c:23:5: error: unrecognized instruction mnemonic

Using the same check as fesetenv.c and mingw_setfp.c fixes it:

  #elif defined(__x86_64__) && !defined(__arm64ec__)

+  /* msvcrt _fpreset() on x86-64 does not touch the x87 FPU unit all,

Typo: "at all".

Otherwise it does the right thing on x86_64. I tested it with the
t_fesetenv tests and FE_DFL_ENV gives 0x027f.


_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to