equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2018, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * Copyright (c) 2018, SAP SE. All rights reserved. |
3 * Copyright (c) 2018, SAP SE. All rights reserved. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
5 * |
5 * |
6 * This code is free software; you can redistribute it and/or modify it |
6 * This code is free software; you can redistribute it and/or modify it |
7 * under the terms of the GNU General Public License version 2 only, as |
7 * under the terms of the GNU General Public License version 2 only, as |
27 #include "asm/macroAssembler.inline.hpp" |
27 #include "asm/macroAssembler.inline.hpp" |
28 #include "gc/g1/g1BarrierSet.hpp" |
28 #include "gc/g1/g1BarrierSet.hpp" |
29 #include "gc/g1/g1BarrierSetAssembler.hpp" |
29 #include "gc/g1/g1BarrierSetAssembler.hpp" |
30 #include "gc/g1/g1BarrierSetRuntime.hpp" |
30 #include "gc/g1/g1BarrierSetRuntime.hpp" |
31 #include "gc/g1/g1CardTable.hpp" |
31 #include "gc/g1/g1CardTable.hpp" |
|
32 #include "gc/g1/g1DirtyCardQueue.hpp" |
32 #include "gc/g1/g1SATBMarkQueueSet.hpp" |
33 #include "gc/g1/g1SATBMarkQueueSet.hpp" |
33 #include "gc/g1/g1ThreadLocalData.hpp" |
34 #include "gc/g1/g1ThreadLocalData.hpp" |
34 #include "gc/g1/heapRegion.hpp" |
35 #include "gc/g1/heapRegion.hpp" |
35 #include "interpreter/interp_masm.hpp" |
36 #include "interpreter/interp_masm.hpp" |
36 #include "runtime/sharedRuntime.hpp" |
37 #include "runtime/sharedRuntime.hpp" |
510 int dirty_card_q_index_byte_offset = in_bytes(G1ThreadLocalData::dirty_card_queue_index_offset()); |
511 int dirty_card_q_index_byte_offset = in_bytes(G1ThreadLocalData::dirty_card_queue_index_offset()); |
511 int dirty_card_q_buf_byte_offset = in_bytes(G1ThreadLocalData::dirty_card_queue_buffer_offset()); |
512 int dirty_card_q_buf_byte_offset = in_bytes(G1ThreadLocalData::dirty_card_queue_buffer_offset()); |
512 |
513 |
513 __ bind(restart); |
514 __ bind(restart); |
514 |
515 |
515 // Get the index into the update buffer. DirtyCardQueue::_index is |
516 // Get the index into the update buffer. G1DirtyCardQueue::_index is |
516 // a size_t so ld_ptr is appropriate here. |
517 // a size_t so ld_ptr is appropriate here. |
517 __ ld(tmp2, dirty_card_q_index_byte_offset, R16_thread); |
518 __ ld(tmp2, dirty_card_q_index_byte_offset, R16_thread); |
518 |
519 |
519 // index == 0? |
520 // index == 0? |
520 __ cmpdi(CCR0, tmp2, 0); |
521 __ cmpdi(CCR0, tmp2, 0); |
537 const int nbytes_save = (MacroAssembler::num_volatile_regs + stack_slots) * BytesPerWord; |
538 const int nbytes_save = (MacroAssembler::num_volatile_regs + stack_slots) * BytesPerWord; |
538 __ save_volatile_gprs(R1_SP, -nbytes_save); // except R0 |
539 __ save_volatile_gprs(R1_SP, -nbytes_save); // except R0 |
539 __ mflr(R0); |
540 __ mflr(R0); |
540 __ std(R0, _abi(lr), R1_SP); |
541 __ std(R0, _abi(lr), R1_SP); |
541 __ push_frame_reg_args(nbytes_save, R0); // dummy frame for C call |
542 __ push_frame_reg_args(nbytes_save, R0); // dummy frame for C call |
542 __ call_VM_leaf(CAST_FROM_FN_PTR(address, DirtyCardQueueSet::handle_zero_index_for_thread), R16_thread); |
543 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1DirtyCardQueueSet::handle_zero_index_for_thread), R16_thread); |
543 __ pop_frame(); |
544 __ pop_frame(); |
544 __ ld(R0, _abi(lr), R1_SP); |
545 __ ld(R0, _abi(lr), R1_SP); |
545 __ mtlr(R0); |
546 __ mtlr(R0); |
546 __ restore_volatile_gprs(R1_SP, -nbytes_save); // except R0 |
547 __ restore_volatile_gprs(R1_SP, -nbytes_save); // except R0 |
547 __ b(restart); |
548 __ b(restart); |