RFR: 8331360: RISCV: u32 _partial_subtype_ctr loaded/stored as 64
Fei Yang
fyang at openjdk.org
Tue Apr 30 07:33:06 UTC 2024
On Tue, 30 Apr 2024 06:54:56 GMT, Robbin Ehn <rehn at openjdk.org> wrote:
> Hi, please consider.
>
> We should use incrementw() for these.
>
> Sanity tested, running t1.
>
> Thanks, Robbin
Good catch. Looks good!
src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 3347:
> 3345:
> 3346: #ifndef PRODUCT
> 3347: incrementw(ExternalAddress((address)&SharedRuntime::_partial_subtype_ctr));
I just checked the x86 and aarch64 counterpart. Seems that aarch64 bears the same issue [1] as it uses `ldr` & `str` which load and store 64-bit data items like here.
[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/aarch64/macroAssembler_aarch64.cpp#L1565
-------------
Marked as reviewed by fyang (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/19010#pullrequestreview-2030430740
PR Review Comment: https://git.openjdk.org/jdk/pull/19010#discussion_r1584269517
More information about the hotspot-dev
mailing list