RFR: 8294492: RISC-V: Use li instead of patchable movptr at non-patchable callsites [v4]

Xiaolin Zheng xlinzheng at openjdk.org
Wed Sep 28 14:02:58 UTC 2022


On Wed, 28 Sep 2022 13:52:02 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> Xiaolin Zheng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Comments, with one &
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.hpp line 534:
> 
>> 532:     // Split address into a lower 12-bit sign-extended offset and the remainder,
>> 533:     // so that the offset could be encoded in jalr or load/store instruction.
>> 534:     offset = ((int32_t)(uintptr_t)addr << 20) >> 20;
> 
> Would you mind one more tweak here? Considering that the type of 'offset' is int32_t, I think it will be more readable here if we convert 'addr' into int64_t type instead of uintptr_t.

Of course. Also changed other uintptr_t usages to int64_t.

-------------

PR: https://git.openjdk.org/jdk/pull/10462


More information about the hotspot-dev mailing list