Integrated: 8342014: RISC-V: ZStoreBarrierStubC2 clobbers rflags
Fei Yang
fyang at openjdk.org
Tue Oct 15 02:56:15 UTC 2024
On Mon, 14 Oct 2024 02:45:35 GMT, Fei Yang <fyang at openjdk.org> wrote:
> `ZStoreBarrierStubC2` (`ZBarriersetAssembler::generate_c2_store_barrier_stub`) clobbers rflags (the `t1` register) on riscv [1].
> And `ZStoreBarrierStubC2` is used by `z_store_barrier` in file gc/z/z_riscv.ad. But the calling instructs in the same ad file
> didn't list the rflags as being killed. As the call chain is not simple, this kind of problem could go silently unnoticed.
> I would suggest we add clobbering of rflags for all gc-related C2 instructs. No obvious impact witnessed on performance.
> This would help reduce the risk of another PR: https://github.com/openjdk/jdk/pull/21406 which touches g1/x/z prefering `t1` for performance reasons. Tagging @robehn
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/gc/z/zBarrierSetAssembler_riscv.cpp#L746
>
> Testing on linux-riscv64:
> - [x] hs-tier1 - hs-tier3
This pull request has now been integrated.
Changeset: a601cd2e
Author: Fei Yang <fyang at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/a601cd2e100958e3f37ae65e32e4b3cac246c079
Stats: 64 lines in 3 files changed: 0 ins; 0 del; 64 mod
8342014: RISC-V: ZStoreBarrierStubC2 clobbers rflags
Reviewed-by: rehn, aboldtch, mli
-------------
PR: https://git.openjdk.org/jdk/pull/21485
More information about the hotspot-dev
mailing list