RFR: 8362193: Re-work MacOS/AArch64 SpinPause to handle SB [v2]
Evgeny Astigeevich
eastigeevich at openjdk.org
Mon Jul 21 13:50:40 UTC 2025
On Mon, 21 Jul 2025 13:01:56 GMT, Evgeny Astigeevich <eastigeevich at openjdk.org> wrote:
>> src/hotspot/os_cpu/bsd_aarch64/os_bsd_aarch64.cpp line 577:
>>
>>> 575: "4: \n"
>>> 576: :
>>> 577: : [id]"r"(inst_id)
>>
>> There's no good reason to handle all this logic in asm. Please use a switch statement instead, and we can also get rid of most of the assertions by adding a ShouldNotReachHere() in the default clause.
>
> I agree with you. I proposed to use the switch when JDK-8321371 was being reviewed: https://github.com/openjdk/jdk/pull/16994#issuecomment-1865147655
>
> Frederick (@fbredber) wanted to avoid branches: https://github.com/openjdk/jdk/pull/16994#issuecomment-1865955740
The switch-based version is committed: https://github.com/openjdk/jdk/pull/26387/commits/e984fdeb10cc91a04860cbdbe45aacb05c4ffd3e
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26387#discussion_r2219270154
More information about the hotspot-dev
mailing list