Skip to content

Commit ccbb663

Browse files
committed
8299168: RISC-V: Fix MachNode size mismatch for MacroAssembler::_verify_oops*
Reviewed-by: fyang Backport-of: 2f4098e1dc9c97e706d70008e473f9c4496cbc8a
1 parent f0b567d commit ccbb663

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -385,10 +385,13 @@ void MacroAssembler::verify_oop(Register reg, const char* s) {
385385
push_reg(RegSet::of(ra, t0, t1, c_rarg0), sp);
386386

387387
mv(c_rarg0, reg); // c_rarg0 : x10
388-
// The length of the instruction sequence emitted should be independent
389-
// of the values of the local char buffer address so that the size of mach
390-
// nodes for scratch emit and normal emit matches.
391-
movptr(t0, (address)b);
388+
{
389+
// The length of the instruction sequence emitted should not depend
390+
// on the address of the char buffer so that the size of mach nodes for
391+
// scratch emit and normal emit matches.
392+
IncompressibleRegion ir(this); // Fixed length
393+
movptr(t0, (address) b);
394+
}
392395

393396
// call indirectly to solve generation ordering problem
394397
int32_t offset = 0;
@@ -424,10 +427,13 @@ void MacroAssembler::verify_oop_addr(Address addr, const char* s) {
424427
ld(x10, addr);
425428
}
426429

427-
// The length of the instruction sequence emitted should be independent
428-
// of the values of the local char buffer address so that the size of mach
429-
// nodes for scratch emit and normal emit matches.
430-
movptr(t0, (address)b);
430+
{
431+
// The length of the instruction sequence emitted should not depend
432+
// on the address of the char buffer so that the size of mach nodes for
433+
// scratch emit and normal emit matches.
434+
IncompressibleRegion ir(this); // Fixed length
435+
movptr(t0, (address) b);
436+
}
431437

432438
// call indirectly to solve generation ordering problem
433439
int32_t offset = 0;

0 commit comments

Comments
 (0)