[Mingw-w64-public] [PATCH v3 6/7] crt: Provide *_recalloc functions

2025-04-07 Thread Pali Rohár
They are natively available since msvcr80.dll, they are not available in msvcrt.dll. Provide compatibility emulation into all import libraries where they are not available. Compatibility emulation needs to use _msize() or _aligned_msize() functions to figure out the previous size and properly clea

Re: [Mingw-w64-public] [PATCH v2 4/6] crt: Implement __mingw_aligned_msize() function

2025-04-07 Thread Pali Rohár
On Sunday 06 April 2025 14:10:35 Pali Rohár wrote: > It mimics msvc _aligned_msize() function. > --- > mingw-w64-crt/misc/mingw-aligned-malloc.c | 23 +++ > mingw-w64-headers/crt/malloc.h| 1 + > 2 files changed, 24 insertions(+) > > diff --git a/mingw-w64-crt/mis

[Mingw-w64-public] [PATCH v3 1/7] headers: Add missing declaration for __mingw_aligned_offset_malloc()

2025-04-07 Thread Pali Rohár
There is already declaration for msvcrt _aligned_offset_malloc() function, so add export also declaration for mingw __mingw_aligned_offset_malloc() function. At the same time, remove also uneeded declaration of this function from mingw-w64-crt/misc/mingw-aligned-malloc.c file and use the new one f

[Mingw-w64-public] [PATCH v3 2/7] crt: Provide _aligned_* functions

2025-04-07 Thread Pali Rohár
Functions _aligned_free(), _aligned_malloc(), _aligned_offset_malloc(), _aligned_offset_realloc() and _aligned_realloc() are available since msvcr70.dll. For older CRT import libraries provide emulation via mingw functions __mingw_aligned_free(), __mingw_aligned_malloc(), __mingw_aligned_offset_mal

Re: [Mingw-w64-public] [PATCH v2 6/6] crt: Add test case for _aligned_* and *_recalloc functions

2025-04-07 Thread Pali Rohár
On Monday 07 April 2025 14:03:17 Martin Storsjö wrote: > On Sun, 6 Apr 2025, Pali Rohár wrote: > > > --- > > mingw-w64-crt/Makefile.am | 1 + > > mingw-w64-crt/testcases/t_aligned_alloc.c | 134 ++ > > 2 files changed, 135 insertions(+) > > create mode 100644 mi

Re: [Mingw-w64-public] [PATCH v2 5/6] crt: Provide _aligned_msize function for all CRT import libraries

2025-04-07 Thread Pali Rohár
On Monday 07 April 2025 14:02:22 Martin Storsjö wrote: > On Sun, 6 Apr 2025, Pali Rohár wrote: > > > Function _aligned_msize() is available only in msvcr80+ and UCRT. It is not > > available in msvcrt.dll system os library. > > --- > > mingw-w64-crt/Makefile.am | 2 ++ > > mingw-w64-crt/

Re: [Mingw-w64-public] [PATCH v2 3/6] crt: Provide *_recalloc functions

2025-04-07 Thread Pali Rohár
On Monday 07 April 2025 13:59:05 Martin Storsjö wrote: > On Sun, 6 Apr 2025, Pali Rohár wrote: > > > They are natively available since msvcr80.dll, they are not available in > > msvcrt.dll. Provide compatibility emulation into all import libraries where > > they are not available. > > One concern

Re: [Mingw-w64-public] [PATCH] crt: Fix condition for fabsf in api-ms-win-crt-math

2025-04-07 Thread Jacek Caban
On 7.04.2025 15:16, Martin Storsjö wrote: This was changed erroneously in 95ad23696f57b0f966525b574096bd53d48c773a; fabsf is only available on arm/aarch64 - it doesn't have anything to do with whether we are compatible with UCRT regarding long doubles. Also fix _o_fabsf in ucrtbase-common.def.in

[Mingw-w64-public] [PATCH] crt: Fix condition for fabsf in api-ms-win-crt-math

2025-04-07 Thread Martin Storsjö
This was changed erroneously in 95ad23696f57b0f966525b574096bd53d48c773a; fabsf is only available on arm/aarch64 - it doesn't have anything to do with whether we are compatible with UCRT regarding long doubles. Also fix _o_fabsf in ucrtbase-common.def.in which also was changed erroneously in the s

Re: [Mingw-w64-public] [PATCH 1/3] crt: Add initial ARM64EC build system support

2025-04-07 Thread Martin Storsjö
On Sun, 6 Apr 2025, Jacek Caban wrote: From: Billy Laws This introduces basic ARM64EC build support by reusing a modified ARM64 configuration. In the future, the goal is to include both native and ARM64EC object files in aarch64 archives. This setup is still subject to change. These three c

Re: [Mingw-w64-public] [PATCH v2 3/6] crt: Provide *_recalloc functions

2025-04-07 Thread Martin Storsjö
On Sun, 6 Apr 2025, Pali Rohár wrote: They are natively available since msvcr80.dll, they are not available in msvcrt.dll. Provide compatibility emulation into all import libraries where they are not available. One concern here, sorry I didn't think about this the last time around: On msvcrt.

Re: [Mingw-w64-public] [PATCH v2 6/6] crt: Add test case for _aligned_* and *_recalloc functions

2025-04-07 Thread Martin Storsjö
On Mon, 7 Apr 2025, Martin Storsjö wrote: On Sun, 6 Apr 2025, Pali Rohár wrote: --- mingw-w64-crt/Makefile.am | 1 + mingw-w64-crt/testcases/t_aligned_alloc.c | 134 ++ 2 files changed, 135 insertions(+) create mode 100644 mingw-w64-crt/testcases/t_aligned_a

Re: [Mingw-w64-public] [PATCH v2 6/6] crt: Add test case for _aligned_* and *_recalloc functions

2025-04-07 Thread Martin Storsjö
On Sun, 6 Apr 2025, Pali Rohár wrote: --- mingw-w64-crt/Makefile.am | 1 + mingw-w64-crt/testcases/t_aligned_alloc.c | 134 ++ 2 files changed, 135 insertions(+) create mode 100644 mingw-w64-crt/testcases/t_aligned_alloc.c Probably ok, assuming that you've t

Re: [Mingw-w64-public] [PATCH] crt: Move definitions of `__mingw_fe_dfl_env` to 'fesetenv.c'

2025-04-07 Thread LIU Hao
在 2025-4-7 16:32, Jacek Caban 写道: Looks good to me. Thanks. Pushed now. -- Best regards, LIU Hao OpenPGP_signature.asc Description: OpenPGP digital signature ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.

Re: [Mingw-w64-public] [PATCH] crt: Move definitions of `__mingw_fe_dfl_env` to 'fesetenv.c'

2025-04-07 Thread Jacek Caban
On 31.03.2025 15:23, LIU Hao wrote: These macros are to be used with `fesetenv()`, so they belong there. Having these `selectany` variables in 'fenv.h' causes them to be defined with external linkage in every source file which includes 'fenv.h'. They can also be exported inappropriately from