RFR: 8339783: Implement JEP 479: Remove the Windows 32-bit x86 Port [v30]
Julian Waters
jwaters at openjdk.org
Thu Nov 7 12:18:58 UTC 2024
On Thu, 7 Nov 2024 12:08:50 GMT, Aleksey Shipilev <shade at openjdk.org> wrote:
>> src/hotspot/os/windows/os_windows.cpp line 510:
>>
>>> 508: // Thread start routine for all newly created threads.
>>> 509: // Called with the associated Thread* as the argument.
>>> 510: static unsigned thread_native_entry(void* t) {
>>
>> Whoa! Hold on there. The `_stdcall` is required here and nothing to do with 32-bit. We use `begindthreadex` to start threads and the entry function is required to be `_stdcall`.
>> https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/beginthread-beginthreadex?view=msvc-170
>
> Not sure why this comment was marked as "Resolved". I have the same question here.
@shipilev See addressing comments below:
> https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170
> On ARM and x64 processors, __stdcall is accepted and ignored by the compiler; on ARM and x64 architectures, by convention, arguments are passed in registers when possible, and subsequent arguments are passed on the stack.
> To my knowledge the only thing __cdecl and __stdcall do is affect the argument passing on the stack since 32 bit uses the stack to pass arguments. Since 64 bit passes arguments inside registers and then only later uses the stack if there are too many parameters to fit in the parameter registers (Basically permanent __fastcall), these specifiers are probably ignored in all 64 bit platforms
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21744#discussion_r1832581212
More information about the core-libs-dev
mailing list