< prev index next >

src/cpu/x86/vm/c1_Runtime1_x86.cpp

Print this page
rev 12854 : [mq]: gcinterface.patch


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


1665         __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
1666 
1667         restore_live_registers(sasm);
1668 
1669         __ bind(done);
1670 
1671         __ pop(rdx);
1672         __ pop(rax);
1673       }
1674       break;
1675 
1676     case g1_post_barrier_slow_id:
1677       {
1678         StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
1679 
1680 
1681         // arg0: store_address
1682         Address store_addr(rbp, 2*BytesPerWord);
1683 
1684         CardTableModRefBS* ct =
1685           barrier_set_cast<CardTableModRefBS>(Universe::heap()->barrier_set());
1686         assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
1687 
1688         Label done;
1689         Label enqueued;
1690         Label runtime;
1691 
1692         // At this point we know new_value is non-NULL and the new_value crosses regions.
1693         // Must check to see if card is already dirty
1694 
1695         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1696 
1697         Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1698                                              DirtyCardQueue::byte_offset_of_index()));
1699         Address buffer(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1700                                         DirtyCardQueue::byte_offset_of_buf()));
1701 
1702         __ push(rax);
1703         __ push(rcx);
1704 
1705         const Register cardtable = rax;




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


1665         __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread);
1666 
1667         restore_live_registers(sasm);
1668 
1669         __ bind(done);
1670 
1671         __ pop(rdx);
1672         __ pop(rax);
1673       }
1674       break;
1675 
1676     case g1_post_barrier_slow_id:
1677       {
1678         StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments);
1679 
1680 
1681         // arg0: store_address
1682         Address store_addr(rbp, 2*BytesPerWord);
1683 
1684         CardTableModRefBS* ct =
1685           barrier_set_cast<CardTableModRefBS>(GC::gc()->heap()->barrier_set());
1686         assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code");
1687 
1688         Label done;
1689         Label enqueued;
1690         Label runtime;
1691 
1692         // At this point we know new_value is non-NULL and the new_value crosses regions.
1693         // Must check to see if card is already dirty
1694 
1695         const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread);
1696 
1697         Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1698                                              DirtyCardQueue::byte_offset_of_index()));
1699         Address buffer(thread, in_bytes(JavaThread::dirty_card_queue_offset() +
1700                                         DirtyCardQueue::byte_offset_of_buf()));
1701 
1702         __ push(rax);
1703         __ push(rcx);
1704 
1705         const Register cardtable = rax;


< prev index next >