On Sat, 2 Nov 2024 02:41:44 GMT, Fei Yang <fy...@openjdk.org> wrote:

>> Changed.
>
> Note that `frame::sender_sp_offset` is 0 instead of 2 on linux-riscv64, which 
> is different from aarch64 or x86-64. So I think we should revert this change: 
> https://github.com/openjdk/jdk/pull/21565/commits/12213a70c1cf0639555f0f302237fd012549c4dd.
>  @pchilano : Could you please help do that? 
> 
> (PS: `hotspot_loom & jdk_loom` still test good with latest version after 
> locally reverting 
> https://github.com/openjdk/jdk/pull/21565/commits/12213a70c1cf0639555f0f302237fd012549c4dd)

As the same code on aarch64 and x86-64 uses `frame::sender_sp_offset` I 
suggested to change the literal 2 into `frame::sender_sp_offset` in order to 
increase the readability, but I forgot that `frame::sender_sp_offset` is 0 on 
riscv64. However I do think it's a problem that several places throughout the 
code base uses a literal 2 when it should really be `frame::sender_sp_offset`. 
This type of code is very fiddly and I think we should do what we can to 
increase the readability, so maybe we need another `frame::XYZ` constant that 
is 2 for this case.

Also, does this mean that the changes from 2 to `frame::sender_sp_offset` in 
all of the lines (267, 271 and 273) should be reverted?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21565#discussion_r1827720269

Reply via email to