Skip to content

Commit

Permalink
8346231: RISC-V: Fix incorrect assertion in SharedRuntime::generate_h…
Browse files Browse the repository at this point in the history
…andler_blob
  • Loading branch information
RealFYang committed Dec 14, 2024
1 parent 3b9de11 commit b8c8910
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2553,17 +2553,18 @@ SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address cal
// Verify the correct encoding of the poll we're about to skip.
// See NativeInstruction::is_lwu_to_zr()
__ lwu(t0, Address(x18));
__ andi(t1, t0, 0b0000011);
__ andi(t1, t0, 0b1111111);
__ mv(t2, 0b0000011);
__ bne(t1, t2, bail); // 0-6:0b0000011
__ srli(t1, t0, 7);
__ andi(t1, t1, 0b00000);
__ andi(t1, t1, 0b11111);
__ bnez(t1, bail); // 7-11:0b00000
__ srli(t1, t0, 12);
__ andi(t1, t1, 0b110);
__ andi(t1, t1, 0b111);
__ mv(t2, 0b110);
__ bne(t1, t2, bail); // 12-14:0b110
#endif

// Adjust return pc forward to step over the safepoint poll instruction
__ add(x18, x18, NativeInstruction::instruction_size);
__ sd(x18, Address(fp, frame::return_addr_offset * wordSize));
Expand Down

0 comments on commit b8c8910

Please sign in to comment.