RFR: 8287418: riscv: Fix correctness issue of MacroAssembler::movptr [v2]

Xiaolin Zheng xlinzheng at openjdk.java.net
Fri May 27 07:03:21 UTC 2022


On Fri, 27 May 2022 06:41:07 GMT, Feilong Jiang <fjiang at openjdk.org> wrote:

>> Xiaolin Zheng has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix a typo in comments
>
> src/hotspot/cpu/riscv/macroAssembler_riscv.cpp line 1187:
> 
>> 1185:   int64_t upper = ((intptr_t)target - lower) >> 29;
>> 1186:   Assembler::patch(branch + 0,  31, 12, upper & 0xfffff);                       // Lui.             target[47:28] + target[27] ==> branch[31:12]
>> 1187:   Assembler::patch(branch + 4,  31, 20, (lower >> 17) & 0xfff);                 // Addiw.           target[27:16] ==> branch[31:20]
> 
> `Addiw` -> `Addi`
> 
> Are these comments still right? 
> 
> target[27:16] ==> branch[31:20]
> target[15: 5] ==> branch[31:20]
> target[ 4: 0] ==> branch[31:20]

Oh, thank you. My IDE prevents me from seeing the latter comments (the lines are a bit long). I would change that.

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

PR: https://git.openjdk.java.net/jdk/pull/8913


More information about the hotspot-compiler-dev mailing list