< prev index next >

src/hotspot/cpu/x86/c1_Runtime1_x86.cpp

Print this page
rev 49217 : 8199511: Do not generate g1_{pre|post}_barrier_slow_id without CardTable-enabled barrier set
Reviewed-by: XXX


1615 
1616         save_live_registers(sasm, 3);
1617 
1618         // load the pre-value
1619         f.load_argument(0, rcx);
1620         __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
1621 
1622         restore_live_registers(sasm);
1623 
1624         __ bind(done);
1625 
1626         __ pop(rdx);
1627         __ pop(rax);
1628       }
1629       break;
1630 
1631     case g1_post_barrier_slow_id:
1632       {
1633         StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
1634 







1635 
1636         // arg0: store_address
1637         Address store_addr(rbp, 2*BytesPerWord);
1638 
1639         Label done;
1640         Label enqueued;
1641         Label runtime;
1642 
1643         // At this point we know new_value is non-NULL and the new_value crosses regions.
1644         // Must check to see if card is already dirty
1645 
1646         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1647 
1648         Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1649                                              DirtyCardQueue::byte_offset_of_index()));
1650         Address buffer(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1651                                         DirtyCardQueue::byte_offset_of_buf()));
1652 
1653         __ push(rax);
1654         __ push(rcx);




1615 
1616         save_live_registers(sasm, 3);
1617 
1618         // load the pre-value
1619         f.load_argument(0, rcx);
1620         __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
1621 
1622         restore_live_registers(sasm);
1623 
1624         __ bind(done);
1625 
1626         __ pop(rdx);
1627         __ pop(rax);
1628       }
1629       break;
1630 
1631     case g1_post_barrier_slow_id:
1632       {
1633         StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
1634 
1635         BarrierSet* bs = Universe::heap()->barrier_set();
1636         if (bs->kind() != BarrierSet::G1BarrierSet) {
1637           __ movptr(rax, (int)id);
1638           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
1639           __ should_not_reach_here();
1640           break;
1641         }
1642 
1643         // arg0: store_address
1644         Address store_addr(rbp, 2*BytesPerWord);
1645 
1646         Label done;
1647         Label enqueued;
1648         Label runtime;
1649 
1650         // At this point we know new_value is non-NULL and the new_value crosses regions.
1651         // Must check to see if card is already dirty
1652 
1653         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1654 
1655         Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1656                                              DirtyCardQueue::byte_offset_of_index()));
1657         Address buffer(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1658                                         DirtyCardQueue::byte_offset_of_buf()));
1659 
1660         __ push(rax);
1661         __ push(rcx);


< prev index next >