8309405: RISC-V: is_deopt may produce unaligned memory read

Reviewed-by: fyang, luhenry
This commit is contained in:
Vladimir Kempik 2023-06-05 07:30:28 +00:00
parent 3fa776d66a
commit a02d8001fa

@ -624,7 +624,7 @@ class NativeDeoptInstruction: public NativeInstruction {
static bool is_deopt_at(address instr) {
assert(instr != nullptr, "");
uint32_t value = *(uint32_t *) instr;
uint32_t value = Assembler::ld_instr(instr);
// 0xc0201073 encodes CSRRW x0, instret, x0
return value == 0xc0201073;
}