Re: [Mingw-w64-public] [PATCH 3/3] headers: Use register variable for NtCurrentTeb implementation on aarch64.

2024-12-29 Thread Julian Waters
I wonder if gcc would accept a contribution where someone wrote a patch to introduce an attribute for register variables instead of having the register + __asm thing. Sounds way less confusing to me best regards, Julian On Mon, Dec 30, 2024 at 9:39 AM LIU Hao wrote: > > 在 2024-12-30 01:57, Jerem

Re: [Mingw-w64-public] [PATCH 3/3] headers: Use register variable for NtCurrentTeb implementation on aarch64.

2024-12-29 Thread LIU Hao
在 2024-12-30 01:57, Jeremy Drake via Mingw-w64-public 写道: I did some playing with godbolt.org. It seems OK with `register` with `__asm__`: https://godbolt.org/z/xrdn3rG45 but gives an error without: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister] https://godbolt.o

Re: [Mingw-w64-public] [PATCH 3/3] headers: Use register variable for NtCurrentTeb implementation on aarch64.

2024-12-29 Thread Jeremy Drake via Mingw-w64-public
On Sun, 29 Dec 2024, Jacek Caban wrote: > We may need to revert use of register keyword for TEB access or make it > conditional if that's indeed problematic for C++. I couldn't reproduce the > warning with Clang. I did some playing with godbolt.org. It seems OK with `register` with `__asm__`: ht

Re: [Mingw-w64-public] [PATCH 3/3] headers: Use register variable for NtCurrentTeb implementation on aarch64.

2024-12-29 Thread Jeremy Drake via Mingw-w64-public
On Sun, 29 Dec 2024, Jacek Caban wrote: > On 29.12.2024 13:28, Jacek Caban wrote: > > It's indeed defined by the build system, see > https://github.com/doxygen/doxygen/commit/aa1cc42254 > > We may need to revert use of register keyword for TEB access or make it > conditional if that's indeed probl

Re: [Mingw-w64-public] [RFC PATCH 1/2] crt: Remove @ stdcall mangling when processing lib-common/*.def.in files for non-I386 builds

2024-12-29 Thread Pali Rohár
On Sunday 29 December 2024 17:47:58 Martin Storsjö wrote: > On Sun, 29 Dec 2024, Pali Rohár wrote: > > > On Sunday 29 December 2024 17:35:03 Martin Storsjö wrote: > > > On Sat, 14 Dec 2024, Pali Rohár wrote: > > > > > > > This allows to define in lib-common/*.def.in files symbols with I386 > > >

Re: [Mingw-w64-public] [RFC PATCH 1/2] crt: Remove @ stdcall mangling when processing lib-common/*.def.in files for non-I386 builds

2024-12-29 Thread Martin Storsjö
On Sun, 29 Dec 2024, Pali Rohár wrote: On Sunday 29 December 2024 17:35:03 Martin Storsjö wrote: On Sat, 14 Dec 2024, Pali Rohár wrote: This allows to define in lib-common/*.def.in files symbols with I386 stdcall @ suffixes and therefore have one common def file for all platforms. --- mingw-w

Re: [Mingw-w64-public] [RFC PATCH 2/2] crt: Merge lib32/ws2_32.def into lib-common/ws2_32.def.in

2024-12-29 Thread Martin Storsjö
On Sat, 14 Dec 2024, Pali Rohár wrote: Now all I386 symbols in lib-common/ws2_32.def.in file are defined with stdcall @ suffixes. These suffixes are automatically removed for non-I386 builds by Makefile.am rule during processing of lib-common/*.def.in files. During merging of lib32/ws2_32.def a

Re: [Mingw-w64-public] [RFC PATCH 1/2] crt: Remove @ stdcall mangling when processing lib-common/*.def.in files for non-I386 builds

2024-12-29 Thread Pali Rohár
On Sunday 29 December 2024 17:35:03 Martin Storsjö wrote: > On Sat, 14 Dec 2024, Pali Rohár wrote: > > > This allows to define in lib-common/*.def.in files symbols with I386 > > stdcall @ suffixes and therefore have one common def file for all > > platforms. > > --- > > mingw-w64-crt/Makefile.am |

Re: [Mingw-w64-public] [RFC PATCH 1/2] crt: Remove @ stdcall mangling when processing lib-common/*.def.in files for non-I386 builds

2024-12-29 Thread Martin Storsjö
On Sat, 14 Dec 2024, Pali Rohár wrote: This allows to define in lib-common/*.def.in files symbols with I386 stdcall @ suffixes and therefore have one common def file for all platforms. --- mingw-w64-crt/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mingw-w6

Re: [Mingw-w64-public] [PATCH 3/3] headers: Use register variable for NtCurrentTeb implementation on aarch64.

2024-12-29 Thread Jacek Caban
On 29.12.2024 13:28, Jacek Caban wrote: On 29.12.2024 07:20, Jeremy Drake via Mingw-w64-public wrote: On Fri, 13 Dec 2024, Jacek Caban wrote: This change is based on Wine's winnt.h implementation. Using a register variable for NtCurrentTeb allows the compiler to optimize the access more effect

Re: [Mingw-w64-public] [PATCH 3/3] headers: Use register variable for NtCurrentTeb implementation on aarch64.

2024-12-29 Thread Jacek Caban
On 29.12.2024 07:20, Jeremy Drake via Mingw-w64-public wrote: On Fri, 13 Dec 2024, Jacek Caban wrote: This change is based on Wine's winnt.h implementation. Using a register variable for NtCurrentTeb allows the compiler to optimize the access more effectively. --- mingw-w64-headers/include/wi