RFR: 8342769: HotSpot Windows/gcc port is broken [v9]
Julian Waters
jwaters at openjdk.org
Fri Dec 6 08:19:39 UTC 2024
On Fri, 6 Dec 2024 06:14:59 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> x86 (And by extension x64) uses handwritten assembly to implement this, and as such simply doesn't use float_sign_mask and friends: https://github.com/openjdk/jdk/blob/3b7571d37812472a2152f9c8cbfd2a4abdb35016/src/hotspot/cpu/x86/stubGenerator_x86_64_fmod.cpp#L123
>
> Sorry still struggling to understand what os+cpu combinations will cause this code to be compiled. If not ARM64 and not x64 then where are the definitions for things like `float_sign_mask` used by this seemingly shared code?
float_sign_mask and friends are only used by Windows ARM64, in the workaround for the Windows CRT bug (I do wish we could get rid of it though!). If looked at closely, the workaround that uses float_sign_mask and friends is only compiled when !X86 && _WIN64, which means Windows ARM64. To simplify:
- All x86 platforms, including x64, use handwritten assembly, so doesn't use float_sign_mask and friends
- Windows ARM64 uses float_sign_mask and friends, as it has to use the workaround
- All other platforms simply directly call fmod without using float_sign_mask and friends at all, so there is no definition for those platforms
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21627#discussion_r1872793460
More information about the hotspot-dev
mailing list