1658 1659 __ bind(runtime); 1660 1661 save_live_registers(sasm, 3); 1662 1663 // load the pre-value 1664 f.load_argument(0, rcx); 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() + | 1658 1659 __ bind(runtime); 1660 1661 save_live_registers(sasm, 3); 1662 1663 // load the pre-value 1664 f.load_argument(0, rcx); 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 // avoid touching CardTableModRefBS if not G1 1679 // FIXME: This looks like an upstream bug. 1680 if (!UseG1GC) break; 1681 1682 StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments); 1683 1684 1685 // arg0: store_address 1686 Address store_addr(rbp, 2*BytesPerWord); 1687 1688 CardTableModRefBS* ct = 1689 barrier_set_cast<CardTableModRefBS>(Universe::heap()->barrier_set()); 1690 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); 1691 1692 Label done; 1693 Label enqueued; 1694 Label runtime; 1695 1696 // At this point we know new_value is non-NULL and the new_value crosses regions. 1697 // Must check to see if card is already dirty 1698 1699 const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread); 1700 1701 Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() + |