8329261: G1: interpreter post-barrier x86 code asserts index size of wrong buffer

Reviewed-by: aboldtch, kbarrett
This commit is contained in:
Roberto Castañeda Lozano
2024-04-05 07:33:14 +00:00
parent 6bc6392d2b
commit 1131bb77ec

View File

@@ -269,8 +269,6 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
Register thread,
Register tmp,
Register tmp2) {
// Generated code assumes that buffer index is pointer sized.
STATIC_ASSERT(in_bytes(SATBMarkQueue::byte_width_of_index()) == sizeof(intptr_t));
#ifdef _LP64
assert(thread == r15_thread, "must be");
#endif // _LP64
@@ -321,6 +319,9 @@ void G1BarrierSetAssembler::g1_write_barrier_post(MacroAssembler* masm,
__ movb(Address(card_addr, 0), G1CardTable::dirty_card_val());
// The code below assumes that buffer index is pointer sized.
STATIC_ASSERT(in_bytes(G1DirtyCardQueue::byte_width_of_index()) == sizeof(intptr_t));
__ movptr(tmp2, queue_index);
__ testptr(tmp2, tmp2);
__ jcc(Assembler::zero, runtime);