RFR: 8370708: RISC-V: Add VerifyStackAtCalls

Fei Yang fyang at openjdk.org
Tue Oct 28 02:56:03 UTC 2025


On Mon, 27 Oct 2025 16:47:35 GMT, Robbin Ehn <rehn at openjdk.org> wrote:

> Hi, please consider.
> 
> Sanity tested, running t1.
> 
> Thanks, Robbin

src/hotspot/cpu/riscv/riscv.ad line 1413:

> 1411:   __ build_frame(framesize);
> 1412: 
> 1413:   if (VerifyStackAtCalls) {

I think this should be reflected in `MachPrologNode::format` at the same time.

src/hotspot/cpu/riscv/riscv.ad line 1414:

> 1412: 
> 1413:   if (VerifyStackAtCalls) {
> 1414:     __ li(t2, MAJIK_DWORD);

Can you use `mv` instead here for consistency with other places where we move an immediate? If `li` is prefered, we might want to do a separate change handling all the places. But I don't have a strong bias.

src/hotspot/cpu/riscv/riscv.ad line 2440:

> 2438:       Label CHECK_PASSED;
> 2439:       __ ld(t1, Address(sp, framesize));
> 2440:       __ li(t2, MAJIK_DWORD);

Similar here.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28005#discussion_r2467731875
PR Review Comment: https://git.openjdk.org/jdk/pull/28005#discussion_r2467734980
PR Review Comment: https://git.openjdk.org/jdk/pull/28005#discussion_r2467735404


More information about the hotspot-compiler-dev mailing list