Re: [Mingw-w64-public] [PATCH v2 1/3] headers: Use ARM definitions for ARM64EC in fenv.h.

2025-02-10 Thread LIU Hao
在 2025-02-10 23:56, Jacek Caban 写道: I didn’t mean to suggest changing any of that, x87 is part of the 32-bit x86 ABI, and we can't change that. What I meant is making long double a 64-bit built-in C type, i.e. sizeof(long double) == 8. The compiler could generate the same code for long double as

Re: [Mingw-w64-public] winpthreads: further clean up header files

2025-02-10 Thread LIU Hao
在 2025-02-10 16:41, Kirill Makurin 写道: We already moved `WINPTHREAD_API` and `clockid_t` to pthread_compat.h. Also move `mode_t` (from sched.h) to and errno constants (from pthread.h) to pthread_compat.h. sched.h and semaphore.h use `WINPTHREAD_SCHED_API` and `WINPTHREAD_SEMA_API` instead of

Re: [Mingw-w64-public] [PATCH v2 1/3] headers: Use ARM definitions for ARM64EC in fenv.h.

2025-02-10 Thread LIU Hao
在 2025-02-10 23:56, Jacek Caban 写道: I didn’t mean to suggest changing any of that, x87 is part of the 32-bit x86 ABI, and we can't change that. What I meant is making long double a 64-bit built-in C type, i.e. sizeof(long double) == 8. The compiler could generate the same code for long double as

[Mingw-w64-public] [PATCH] crt/delayimp: Make IAT temporarily writeable before modifying it

2025-02-10 Thread LIU Hao
UCRT64 ~/Desktop $ cat delay_user32.d cat: delay_user32.d: No such file or directory UCRT64 ~/Desktop $ cat delay_user32.def LIBRARY "USER32.DLL" EXPORTS MessageBoxW UCRT64 ~/Desktop $ cat test.c #include #include extern void** __imp_MessageBoxW; int main(void) { fprintf(stderr, "main

Re: [Mingw-w64-public] [PATCH] crt: Mark _tls_index as used for LTO

2025-02-10 Thread Martin Storsjö
On Mon, 10 Feb 2025, LIU Hao wrote: 在 2025-02-10 21:24, Martin Storsjö 写道: If translation units that use thread local variables are built with LTO (using native TLS, not emulated TLS), then the implicit access to _tls_index isn't visible on the LTO object file level. Therefore, mark _tls_index

Re: [Mingw-w64-public] [PATCH v2 2/2] crt: Call the regular sin()/cos() functions in sincos() on UCRT/x86

2025-02-10 Thread Martin Storsjö
On Fri, 7 Feb 2025, Jacek Caban wrote: On 7.02.2025 10:22, Martin Storsjö wrote: On Fri, 7 Feb 2025, LIU Hao wrote: 在 2025-02-06 22:23, Jacek Caban 写道: FWIW, that's the approach we take in Wine for entire CRT modules (not just static parts like mingw- w64-crt's counterpart), and it works wel

Re: [Mingw-w64-public] [PATCH v2 1/3] headers: Use ARM definitions for ARM64EC in fenv.h.

2025-02-10 Thread Jacek Caban
On 10.02.2025 15:39, LIU Hao wrote: 在 2025-02-10 22:14, Jacek Caban 写道: The MinGW variant of ARM64EC is still undefined, meaning we have the flexibility to decide how it should work. There is an argument that ARM64EC should support 80-bit long double, as full interoperability is a core princip

Re: [Mingw-w64-public] [PATCH] crt: Mark _tls_index as used for LTO

2025-02-10 Thread LIU Hao
在 2025-02-10 21:24, Martin Storsjö 写道: If translation units that use thread local variables are built with LTO (using native TLS, not emulated TLS), then the implicit access to _tls_index isn't visible on the LTO object file level. Therefore, mark _tls_index as used, so that it gets retained thr

Re: [Mingw-w64-public] [PATCH v2 1/3] headers: Use ARM definitions for ARM64EC in fenv.h.

2025-02-10 Thread LIU Hao
在 2025-02-10 22:14, Jacek Caban 写道: The MinGW variant of ARM64EC is still undefined, meaning we have the flexibility to decide how it should work. There is an argument that ARM64EC should support 80-bit long double, as full interoperability is a core principle of ARM64EC, and lacking it goes aga

Re: [Mingw-w64-public] [PATCH v2 1/3] headers: Use ARM definitions for ARM64EC in fenv.h.

2025-02-10 Thread Jacek Caban
On 10.02.2025 02:22, LIU Hao wrote: 在 2025-02-09 22:48, Jacek Caban 写道: From: Billy Laws Signed-off-by: Jacek Caban ---   mingw-w64-headers/crt/fenv.h | 4 ++--   1 file changed, 2 insertions(+), 2 deletions(-) While there doesn't seem to be any issue in this series of patches, I would like

[Mingw-w64-public] [PATCH] crt: Mark _tls_index as used for LTO

2025-02-10 Thread Martin Storsjö
If translation units that use thread local variables are built with LTO (using native TLS, not emulated TLS), then the implicit access to _tls_index isn't visible on the LTO object file level. Therefore, mark _tls_index as used, so that it gets retained through LTO. This fixes linking user code w

[Mingw-w64-public] winpthreads: further clean up header files

2025-02-10 Thread Kirill Makurin
We already moved `WINPTHREAD_API` and `clockid_t` to pthread_compat.h. Also move `mode_t` (from sched.h) to and errno constants (from pthread.h) to pthread_compat.h. sched.h and semaphore.h use `WINPTHREAD_SCHED_API` and `WINPTHREAD_SEMA_API` instead of `WINPTHREAD_API`. Include pthread_compat.