src/cpu/x86/vm/c1_Runtime1_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
JDK-8028109 Cdiff src/cpu/x86/vm/c1_Runtime1_x86.cpp
src/cpu/x86/vm/c1_Runtime1_x86.cpp
Print this page
*** 1717,1730 ****
// arg0: store_address
Address store_addr(rbp, 2*BytesPerWord);
BarrierSet* bs = Universe::heap()->barrier_set();
CardTableModRefBS* ct = (CardTableModRefBS*)bs;
Label done;
Label runtime;
! // At this point we know new_value is non-NULL and the new_value crosses regsion.
// Must check to see if card is already dirty
const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
--- 1717,1732 ----
// arg0: store_address
Address store_addr(rbp, 2*BytesPerWord);
BarrierSet* bs = Universe::heap()->barrier_set();
CardTableModRefBS* ct = (CardTableModRefBS*)bs;
+ assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
+
Label done;
Label runtime;
! // At this point we know new_value is non-NULL and the new_value crosses regions.
// Must check to see if card is already dirty
const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
*** 1733,1762 ****
PtrQueue::byte_offset_of_buf()));
__ push(rax);
__ push(rcx);
! NOT_LP64(__ get_thread(thread);)
! ExternalAddress cardtable((address)ct->byte_map_base);
! assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
!
const Register card_addr = rcx;
! #ifdef _LP64
! const Register tmp = rscratch1;
f.load_argument(0, card_addr);
! __ shrq(card_addr, CardTableModRefBS::card_shift);
! __ lea(tmp, cardtable);
! // get the address of the card
! __ addq(card_addr, tmp);
! #else
! const Register card_index = rcx;
! f.load_argument(0, card_index);
! __ shrl(card_index, CardTableModRefBS::card_shift);
!
! Address index(noreg, card_index, Address::times_1);
! __ leal(card_addr, __ as_Address(ArrayAddress(cardtable, index)));
! #endif
__ cmpb(Address(card_addr, 0), (int)G1SATBCardTableModRefBS::g1_young_card_val());
__ jcc(Assembler::equal, done);
__ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
--- 1735,1755 ----
PtrQueue::byte_offset_of_buf()));
__ push(rax);
__ push(rcx);
! const Register cardtable = rax;
const Register card_addr = rcx;
!
f.load_argument(0, card_addr);
! __ shrptr(card_addr, CardTableModRefBS::card_shift);
! // Do not use ExternalAddress to load 'byte_map_base', since 'byte_map_base' is NOT
! // a valid address and therefore is not properly handled by the relocation code. See 8028109.
! __ movptr(cardtable, (intptr_t)ct->byte_map_base);
! __ addptr(card_addr, cardtable);
!
! NOT_LP64(__ get_thread(thread);)
__ cmpb(Address(card_addr, 0), (int)G1SATBCardTableModRefBS::g1_young_card_val());
__ jcc(Assembler::equal, done);
__ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
src/cpu/x86/vm/c1_Runtime1_x86.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File