On Thu, 31 Oct 2024 02:33:30 GMT, Dean Long <dl...@openjdk.org> wrote:

> OK, so you're saying it's the stack adjustment that's the problem. It sounds 
> like there is code that is using rsp instead of last_Java_sp to compute the 
> frame boundary. Isn't that a bug that should be fixed?
>
It's not a bug, it's just that the code from the runtime stub only cares about 
the actual rsp, not last_Java_sp. We are returning to the pc right after the 
call so we need to adjust rsp to what the runtime stub expects. Both 
alternatives will work, either changing the runtime stub to set last pc and not 
push those two extra words, or your suggestion of just setting the last pc to 
the instruction after the adjustment. Either way it requires to change the c2 
code though which I'm not familiar with. But if you can provide a patch I'm 
happy to apply it and we can remove this `possibly_adjust_frame()` method.

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

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

Reply via email to