Skip to content

Commit 9d9f4e5

Browse files
zhengxiaolinXRealFYang
authored andcommitted
8285437: riscv: Fix MachNode size mismatch for MacroAssembler::verify_oops*
Reviewed-by: shade, fyang
1 parent 08024d9 commit 9d9f4e5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/hotspot/cpu/riscv/macroAssembler_riscv.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,10 @@ void MacroAssembler::verify_oop(Register reg, const char* s) {
378378
push_reg(RegSet::of(ra, t0, t1, c_rarg0), sp);
379379

380380
mv(c_rarg0, reg); // c_rarg0 : x10
381-
li(t0, (uintptr_t)(address)b);
381+
// The length of the instruction sequence emitted should be independent
382+
// of the values of the local char buffer address so that the size of mach
383+
// nodes for scratch emit and normal emit matches.
384+
mv(t0, (address)b);
382385

383386
// call indirectly to solve generation ordering problem
384387
int32_t offset = 0;
@@ -414,7 +417,10 @@ void MacroAssembler::verify_oop_addr(Address addr, const char* s) {
414417
ld(x10, addr);
415418
}
416419

417-
li(t0, (uintptr_t)(address)b);
420+
// The length of the instruction sequence emitted should be independent
421+
// of the values of the local char buffer address so that the size of mach
422+
// nodes for scratch emit and normal emit matches.
423+
mv(t0, (address)b);
418424

419425
// call indirectly to solve generation ordering problem
420426
int32_t offset = 0;

0 commit comments

Comments
 (0)