RFR: 8350095: RISC-V: Refactor string_compare [v6]
Fei Yang
fyang at openjdk.org
Wed Feb 26 00:30:58 UTC 2025
On Tue, 25 Feb 2025 13:26:20 GMT, Hamlin Li <mli at openjdk.org> wrote:
> Previously, we have a `TAIL` label at [1], seems when it get here, it could also exceed the boundary of the string?
No, it won't. The sub instruction at [1][2][3] will ensure that. Let me know if you have a case that will.
[1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp#L1478
[2] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp#L1492
[3] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp#L1506
> But seems to me exceeding the boundary should be fine, as we can not exceed the page boundary in this way. [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/cpu/riscv/c2_MacroAssembler_riscv.cpp#L1550
But the loaded 64-bit values are compared later at L1435. So I think it will make a difference here.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23633#discussion_r1970724146
More information about the hotspot-compiler-dev
mailing list