Skip to content

Commit

Permalink
8344526: RISC-V: implement -XX:+VerifyActivationFrameSize
Browse files Browse the repository at this point in the history
Co-authored-by: Fei Yang <[email protected]>
Reviewed-by: mli, fyang
  • Loading branch information
SendaoYan and RealFYang committed Nov 21, 2024
1 parent 1343911 commit 4fbf272
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/hotspot/cpu/riscv/interp_masm_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,14 @@ void InterpreterMacroAssembler::dispatch_base(TosState state,
Register Rs) {
// Pay attention to the argument Rs, which is acquiesce in t0.
if (VerifyActivationFrameSize) {
Unimplemented();
Label L;
sub(t1, fp, esp);
int min_frame_size =
(frame::link_offset - frame::interpreter_frame_initial_sp_offset + frame::metadata_words) * wordSize;
sub(t1, t1, min_frame_size);
bgez(t1, L);
stop("broken stack frame");
bind(L);
}
if (verifyoop && state == atos) {
verify_oop(x10);
Expand Down

0 comments on commit 4fbf272

Please sign in to comment.