1647 1648 __ bind(runtime); 1649 1650 save_live_registers(sasm, 3); 1651 1652 // load the pre-value 1653 f.load_argument(0, rcx); 1654 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread); 1655 1656 restore_live_registers(sasm); 1657 1658 __ bind(done); 1659 1660 __ pop(rdx); 1661 __ pop(rax); 1662 } 1663 break; 1664 1665 case g1_post_barrier_slow_id: 1666 { 1667 StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments); 1668 1669 1670 // arg0: store_address 1671 Address store_addr(rbp, 2*BytesPerWord); 1672 1673 CardTableModRefBS* ct = 1674 barrier_set_cast<CardTableModRefBS>(Universe::heap()->barrier_set()); 1675 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); 1676 1677 Label done; 1678 Label enqueued; 1679 Label runtime; 1680 1681 // At this point we know new_value is non-NULL and the new_value crosses regions. 1682 // Must check to see if card is already dirty 1683 1684 const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread); 1685 1686 Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() + | 1647 1648 __ bind(runtime); 1649 1650 save_live_registers(sasm, 3); 1651 1652 // load the pre-value 1653 f.load_argument(0, rcx); 1654 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), rcx, thread); 1655 1656 restore_live_registers(sasm); 1657 1658 __ bind(done); 1659 1660 __ pop(rdx); 1661 __ pop(rax); 1662 } 1663 break; 1664 1665 case g1_post_barrier_slow_id: 1666 { 1667 // avoid touching CardTableModRefBS if not G1 1668 // FIXME: This looks like an upstream bug. 1669 if (!UseG1GC) break; 1670 1671 StubFrame f(sasm, "g1_post_barrier", dont_gc_arguments); 1672 1673 1674 // arg0: store_address 1675 Address store_addr(rbp, 2*BytesPerWord); 1676 1677 CardTableModRefBS* ct = 1678 barrier_set_cast<CardTableModRefBS>(Universe::heap()->barrier_set()); 1679 assert(sizeof(*ct->byte_map_base) == sizeof(jbyte), "adjust this code"); 1680 1681 Label done; 1682 Label enqueued; 1683 Label runtime; 1684 1685 // At this point we know new_value is non-NULL and the new_value crosses regions. 1686 // Must check to see if card is already dirty 1687 1688 const Register thread = NOT_LP64(rax) LP64_ONLY(r15_thread); 1689 1690 Address queue_index(thread, in_bytes(JavaThread::dirty_card_queue_offset() + |