[riscv-port] RFR: 8278994: riscv: RVC support [v10]

Fei Yang fyang at openjdk.java.net
Mon Jan 10 07:18:20 UTC 2022


On Mon, 10 Jan 2022 06:57:05 GMT, Xiaolin Zheng <xlinzheng at openjdk.org> wrote:

>> For the nmethod_entry_barrier case, I would omit the extra_offset parameter (and also the nmethod_barrier_guard_offset funtion). I think your newly-added assertion at line 265 is enough.
>> 
>> But looks like it's different in the trampoline case where I see we need a wordSize (8bytes) alignment. So we may keep the change for this case.
>
> Yes, I agree with your point. That trampoline part is special and requires to be scrupulous to make changes.
> 
> So maybe I'd better remove the `nmethod_barrier_guard_offset` part right?

Yes. Please also update the code comments. It looks strange to find those comments starts with a "RVC:".
Also we should make the exact alignment required explicit in comments like: "RISCV's amoswap instructions need an alignment for the memory address it swaps" or "RISCV CAS needs an alignment for memory", etc.

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

PR: https://git.openjdk.java.net/riscv-port/pull/34


More information about the riscv-port-dev mailing list