< prev index next >

src/cpu/x86/vm/c1_Runtime1_x86.cpp

Print this page




1598 #else
1599         __ xorptr(rax, rax);
1600 #endif // _LP64
1601 
1602         __ bind(do_return);
1603         __ addptr(rsp, 32);
1604         LP64_ONLY(__ pop(rdx);)
1605         __ pop(rcx);
1606         __ pop(rsi);
1607         __ ret(0);
1608       }
1609       break;
1610 
1611 #if INCLUDE_ALL_GCS
1612     case g1_pre_barrier_slow_id:
1613       {
1614         StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
1615         // arg0 : previous value of memory
1616 
1617         BarrierSet* bs = Universe::heap()->barrier_set();
1618         if (bs->kind() != BarrierSet::G1SATBCTLogging) {
1619           __ movptr(rax, (int)id);
1620           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
1621           __ should_not_reach_here();
1622           break;
1623         }
1624         __ push(rax);
1625         __ push(rdx);
1626 
1627         const Register pre_val = rax;
1628         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1629         const Register tmp = rdx;
1630 
1631         NOT_LP64(__ get_thread(thread);)
1632 
1633         Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1634                                              PtrQueue::byte_offset_of_active()));
1635 
1636         Address queue_index(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1637                                              PtrQueue::byte_offset_of_index()));
1638         Address buffer(thread, in_bytes(JavaThread::satb_mark_queue_offset() +


1675         __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
1676 
1677         restore_live_registers(sasm);
1678 
1679         __ bind(done);
1680 
1681         __ pop(rdx);
1682         __ pop(rax);
1683       }
1684       break;
1685 
1686     case g1_post_barrier_slow_id:
1687       {
1688         StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
1689 
1690 
1691         // arg0: store_address
1692         Address store_addr(rbp, 2*BytesPerWord);
1693 
1694         BarrierSet* bs = Universe::heap()->barrier_set();






1695         CardTableModRefBS* ct = (CardTableModRefBS*)bs;
1696         assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
1697 
1698         Label done;
1699         Label runtime;
1700 
1701         // At this point we know new_value is non-NULL and the new_value crosses regions.
1702         // Must check to see if card is already dirty
1703 
1704         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1705 
1706         Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1707                                              PtrQueue::byte_offset_of_index()));
1708         Address buffer(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1709                                         PtrQueue::byte_offset_of_buf()));
1710 
1711         __ push(rax);
1712         __ push(rcx);
1713 
1714         const Register cardtable = rax;




1598 #else
1599         __ xorptr(rax, rax);
1600 #endif // _LP64
1601 
1602         __ bind(do_return);
1603         __ addptr(rsp, 32);
1604         LP64_ONLY(__ pop(rdx);)
1605         __ pop(rcx);
1606         __ pop(rsi);
1607         __ ret(0);
1608       }
1609       break;
1610 
1611 #if INCLUDE_ALL_GCS
1612     case g1_pre_barrier_slow_id:
1613       {
1614         StubFrame f(sasm, "g1_pre_barrier", dont_gc_arguments);
1615         // arg0 : previous value of memory
1616 
1617         BarrierSet* bs = Universe::heap()->barrier_set();
1618         if (bs->kind() != BarrierSet::G1SATBCTLogging && bs->kind() != BarrierSet::ShenandoahBarrierSet) {
1619           __ movptr(rax, (int)id);
1620           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
1621           __ should_not_reach_here();
1622           break;
1623         }
1624         __ push(rax);
1625         __ push(rdx);
1626 
1627         const Register pre_val = rax;
1628         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1629         const Register tmp = rdx;
1630 
1631         NOT_LP64(__ get_thread(thread);)
1632 
1633         Address in_progress(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1634                                              PtrQueue::byte_offset_of_active()));
1635 
1636         Address queue_index(thread, in_bytes(JavaThread::satb_mark_queue_offset() +
1637                                              PtrQueue::byte_offset_of_index()));
1638         Address buffer(thread, in_bytes(JavaThread::satb_mark_queue_offset() +


1675         __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
1676 
1677         restore_live_registers(sasm);
1678 
1679         __ bind(done);
1680 
1681         __ pop(rdx);
1682         __ pop(rax);
1683       }
1684       break;
1685 
1686     case g1_post_barrier_slow_id:
1687       {
1688         StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
1689 
1690 
1691         // arg0: store_address
1692         Address store_addr(rbp, 2*BytesPerWord);
1693 
1694         BarrierSet* bs = Universe::heap()->barrier_set();
1695         if (bs->kind() == BarrierSet::ShenandoahBarrierSet) {
1696           __ movptr(rax, (int)id);
1697           __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), rax);
1698           __ should_not_reach_here();
1699           break;
1700         }
1701         CardTableModRefBS* ct = (CardTableModRefBS*)bs;
1702         assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
1703 
1704         Label done;
1705         Label runtime;
1706 
1707         // At this point we know new_value is non-NULL and the new_value crosses regions.
1708         // Must check to see if card is already dirty
1709 
1710         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1711 
1712         Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1713                                              PtrQueue::byte_offset_of_index()));
1714         Address buffer(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1715                                         PtrQueue::byte_offset_of_buf()));
1716 
1717         __ push(rax);
1718         __ push(rcx);
1719 
1720         const Register cardtable = rax;


< prev index next >