RFR: 8345047: RISC-V: Remove explicit use of AvoidUnalignedAccesses in interpreter
Fei Yang
fyang at openjdk.org
Tue Nov 26 11:11:41 UTC 2024
On Tue, 26 Nov 2024 10:57:30 GMT, Hamlin Li <mli at openjdk.org> wrote:
>> src/hotspot/cpu/riscv/interp_masm_riscv.cpp line 182:
>>
>>> 180: void InterpreterMacroAssembler::get_unsigned_2_byte_index_at_bcp(Register reg, int bcp_offset) {
>>> 181: assert(bcp_offset >= 0, "bcp is still pointing to start of bytecode");
>>> 182: lbu(t1, Address(xbcp, bcp_offset));
>>
>> maybe we could expand the revb_h_h here? something like below:
>>
>> if ((AvoidUnalignedAccesses && (bcp_offset % 2)) || !UseZbb) {
>> ...
>> } else {
>> // expand revb_h_h_u when +UseZbb
>> }
>
> similar comments for below changes.
Ah, that looks more complex than before from a maintainance perspective. We only get one instruction saved which is not on the performance critical path. I guess it doesn't worth it?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22387#discussion_r1858277897
More information about the hotspot-dev
mailing list