[riscv-port] RFR: 8278743: riscv: Remove the x4 register saving logic in Java frames
Yadong Wang
yadongwang at openjdk.java.net
Tue Dec 14 06:36:41 UTC 2021
On Tue, 14 Dec 2021 04:27:20 GMT, Xiaolin Zheng <xlinzheng at openjdk.org> wrote:
> Hi team,
>
> x4 is the thread pointer register and would be modified by the kernel. With this respect, we shall not modify or change its value. In the riscv-port repo, we have no other modifications for the x4 register so I would recommend removing the x4 saving logic in java frames. I have verified this change along with other patches under jdk/hotspot full tiers on different boards and qemu.
>
> BTW, due to the logic that can automatically adjust the sp to 16-byte aligned[1], it is safe to change the `sp_after_call_off` to an odd number.
>
> [1] https://github.com/openjdk/riscv-port/blob/riscv-port/src/hotspot/cpu/riscv/stubGenerator_riscv.cpp#L277
>
> Thanks,
> Xiaolin
lgtm
-------------
PR: https://git.openjdk.java.net/riscv-port/pull/29
More information about the riscv-port-dev
mailing list