Skip to content

Commit 929d4a5

Browse files
committed
8346231: RISC-V: Fix incorrect assertion in SharedRuntime::generate_handler_blob
Reviewed-by: fjiang, rehn
1 parent 3030230 commit 929d4a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/hotspot/cpu/riscv/sharedRuntime_riscv.cpp

+4-3
Original file line numberDiff line numberDiff line change
@@ -2553,17 +2553,18 @@ SafepointBlob* SharedRuntime::generate_handler_blob(SharedStubId id, address cal
25532553
// Verify the correct encoding of the poll we're about to skip.
25542554
// See NativeInstruction::is_lwu_to_zr()
25552555
__ lwu(t0, Address(x18));
2556-
__ andi(t1, t0, 0b0000011);
2556+
__ andi(t1, t0, 0b1111111);
25572557
__ mv(t2, 0b0000011);
25582558
__ bne(t1, t2, bail); // 0-6:0b0000011
25592559
__ srli(t1, t0, 7);
2560-
__ andi(t1, t1, 0b00000);
2560+
__ andi(t1, t1, 0b11111);
25612561
__ bnez(t1, bail); // 7-11:0b00000
25622562
__ srli(t1, t0, 12);
2563-
__ andi(t1, t1, 0b110);
2563+
__ andi(t1, t1, 0b111);
25642564
__ mv(t2, 0b110);
25652565
__ bne(t1, t2, bail); // 12-14:0b110
25662566
#endif
2567+
25672568
// Adjust return pc forward to step over the safepoint poll instruction
25682569
__ add(x18, x18, NativeInstruction::instruction_size);
25692570
__ sd(x18, Address(fp, frame::return_addr_offset * wordSize));

0 commit comments

Comments
 (0)