RFR: 8342769: HotSpot Windows/gcc port is broken [v9]
David Holmes
dholmes at openjdk.org
Wed Dec 4 06:10:43 UTC 2024
On Wed, 4 Dec 2024 04:09:55 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> src/hotspot/os/windows/sharedRuntimeRem.cpp line 42:
>>
>>> 40: static const double one = 1.0, Zero[] = { 0.0, -0.0, };
>>> 41:
>>> 42: double SharedRuntime::fmod_win64(double x, double y)
>>
>> Wouldn't `fmod_winAarch64` or `fmod_winARM64` make more sense given this is now only used for Aarch64?
>
> The name was suggested by Andrew, I'll change it to fmod_winarm64 if you prefer
I thought at the time the name was because it was for both x64 and aarch64 - hence any win64 platform. But if it is only for Aarch64 then it makes sense to me that the function name conveys that.
>> src/hotspot/share/runtime/sharedRuntime.cpp line 287:
>>
>>> 285:
>>> 286:
>>> 287: #ifdef _M_ARM64
>>
>> If this is ARM64 only then the `#if !defined(X86)` at line 294 is not needed.
>
> Wouldn't this cause a multiple definition error for frem and drem if the #if !defined(X86) was removed? The #if prevents those 2 methods from being defined when on x86 so it doesn't conflict with the x86 specific definitions, without it frem and drem would be defined twice on x86
But if we enter this block because _M_ARM64 is defined then X86 cannot be defined so line 294 is vacuously true.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21627#discussion_r1868772112
PR Review Comment: https://git.openjdk.org/jdk/pull/21627#discussion_r1868771179
More information about the hotspot-dev
mailing list