RFR: 8370708: RISC-V: Add VerifyStackAtCalls [v3]

Robbin Ehn rehn at openjdk.org
Tue Oct 28 12:44:38 UTC 2025


On Tue, 28 Oct 2025 12:10:53 GMT, Fei Yang <fyang at openjdk.org> wrote:

>> The two above is printed like:
>> 
>>   st->print("sd  fp, [sp, #%d]\n\t", - 2 * wordSize);
>>   st->print("sd  ra, [sp, #%d]\n\t", - wordSize);
>> 
>> I just followed that.
>
> Ah, I see. Seems we need to update this instruction sequence to match what `build_frame` does in `MachPrologNode::emit`. I guess that was once missed when we change `MachPrologNode::emit`.
> 
> 
> 4871 void MacroAssembler::build_frame(int framesize) {
> 4872   assert(framesize >= 2, "framesize must include space for FP/RA");
> 4873   assert(framesize % (2*wordSize) == 0, "must preserve 2*wordSize alignment");
> 4874   sub(sp, sp, framesize);
> 4875   sd(fp, Address(sp, framesize - 2 * wordSize));
> 4876   sd(ra, Address(sp, framesize - wordSize));
> 4877   if (PreserveFramePointer) { add(fp, sp, framesize); }
> 4878 }

Fixed!

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

PR Review Comment: https://git.openjdk.org/jdk/pull/28005#discussion_r2469432061


More information about the hotspot-compiler-dev mailing list