Skip to content

Commit 4fbf272

Browse files
SendaoYanRealFYang
andcommitted
8344526: RISC-V: implement -XX:+VerifyActivationFrameSize
Co-authored-by: Fei Yang <[email protected]> Reviewed-by: mli, fyang
1 parent 1343911 commit 4fbf272

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/hotspot/cpu/riscv/interp_masm_riscv.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,14 @@ void InterpreterMacroAssembler::dispatch_base(TosState state,
441441
Register Rs) {
442442
// Pay attention to the argument Rs, which is acquiesce in t0.
443443
if (VerifyActivationFrameSize) {
444-
Unimplemented();
444+
Label L;
445+
sub(t1, fp, esp);
446+
int min_frame_size =
447+
(frame::link_offset - frame::interpreter_frame_initial_sp_offset + frame::metadata_words) * wordSize;
448+
sub(t1, t1, min_frame_size);
449+
bgez(t1, L);
450+
stop("broken stack frame");
451+
bind(L);
445452
}
446453
if (verifyoop && state == atos) {
447454
verify_oop(x10);

0 commit comments

Comments
 (0)