25 |
25 |
26 #include "precompiled.hpp" |
26 #include "precompiled.hpp" |
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/g1CardTable.hpp" |
31 #include "gc/g1/g1CardTable.hpp" |
31 #include "gc/g1/g1ThreadLocalData.hpp" |
32 #include "gc/g1/g1ThreadLocalData.hpp" |
32 #include "gc/g1/heapRegion.hpp" |
33 #include "gc/g1/heapRegion.hpp" |
33 #include "interpreter/interp_masm.hpp" |
34 #include "interpreter/interp_masm.hpp" |
34 #include "runtime/sharedRuntime.hpp" |
35 #include "runtime/sharedRuntime.hpp" |
70 __ std(count, frame_size - (++slot_nr) * wordSize, R1_SP); |
71 __ std(count, frame_size - (++slot_nr) * wordSize, R1_SP); |
71 if (preserve1 != noreg) { __ std(preserve1, frame_size - (++slot_nr) * wordSize, R1_SP); } |
72 if (preserve1 != noreg) { __ std(preserve1, frame_size - (++slot_nr) * wordSize, R1_SP); } |
72 if (preserve2 != noreg) { __ std(preserve2, frame_size - (++slot_nr) * wordSize, R1_SP); } |
73 if (preserve2 != noreg) { __ std(preserve2, frame_size - (++slot_nr) * wordSize, R1_SP); } |
73 |
74 |
74 if (UseCompressedOops) { |
75 if (UseCompressedOops) { |
75 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSet::write_ref_array_pre_narrow_oop_entry), to, count); |
76 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_array_pre_narrow_oop_entry), to, count); |
76 } else { |
77 } else { |
77 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSet::write_ref_array_pre_oop_entry), to, count); |
78 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_array_pre_oop_entry), to, count); |
78 } |
79 } |
79 |
80 |
80 slot_nr = 0; |
81 slot_nr = 0; |
81 __ ld(from, frame_size - (++slot_nr) * wordSize, R1_SP); |
82 __ ld(from, frame_size - (++slot_nr) * wordSize, R1_SP); |
82 __ ld(to, frame_size - (++slot_nr) * wordSize, R1_SP); |
83 __ ld(to, frame_size - (++slot_nr) * wordSize, R1_SP); |
96 const int frame_size = align_up(frame::abi_reg_args_size + spill_slots * BytesPerWord, frame::alignment_in_bytes); |
97 const int frame_size = align_up(frame::abi_reg_args_size + spill_slots * BytesPerWord, frame::alignment_in_bytes); |
97 |
98 |
98 __ save_LR_CR(R0); |
99 __ save_LR_CR(R0); |
99 __ push_frame(frame_size, R0); |
100 __ push_frame(frame_size, R0); |
100 if (preserve != noreg) { __ std(preserve, frame_size - 1 * wordSize, R1_SP); } |
101 if (preserve != noreg) { __ std(preserve, frame_size - 1 * wordSize, R1_SP); } |
101 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSet::write_ref_array_post_entry), addr, count); |
102 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_array_post_entry), addr, count); |
102 if (preserve != noreg) { __ ld(preserve, frame_size - 1 * wordSize, R1_SP); } |
103 if (preserve != noreg) { __ ld(preserve, frame_size - 1 * wordSize, R1_SP); } |
103 __ addi(R1_SP, R1_SP, frame_size); // pop_frame(); |
104 __ addi(R1_SP, R1_SP, frame_size); // pop_frame(); |
104 __ restore_LR_CR(R0); |
105 __ restore_LR_CR(R0); |
105 } |
106 } |
106 |
107 |
189 __ save_LR_CR(tmp1); |
190 __ save_LR_CR(tmp1); |
190 __ push_frame_reg_args(0, tmp2); |
191 __ push_frame_reg_args(0, tmp2); |
191 } |
192 } |
192 |
193 |
193 if (pre_val->is_volatile() && preloaded) { __ mr(nv_save, pre_val); } // Save pre_val across C call if it was preloaded. |
194 if (pre_val->is_volatile() && preloaded) { __ mr(nv_save, pre_val); } // Save pre_val across C call if it was preloaded. |
194 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), pre_val, R16_thread); |
195 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_pre_entry), pre_val, R16_thread); |
195 if (pre_val->is_volatile() && preloaded) { __ mr(pre_val, nv_save); } // restore |
196 if (pre_val->is_volatile() && preloaded) { __ mr(pre_val, nv_save); } // restore |
196 |
197 |
197 if (needs_frame) { |
198 if (needs_frame) { |
198 __ pop_frame(); |
199 __ pop_frame(); |
199 __ restore_LR_CR(tmp1); |
200 __ restore_LR_CR(tmp1); |
270 __ b(filtered); |
271 __ b(filtered); |
271 |
272 |
272 __ bind(runtime); |
273 __ bind(runtime); |
273 |
274 |
274 // Save the live input values. |
275 // Save the live input values. |
275 __ call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_post), Rcard_addr, R16_thread); |
276 __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1BarrierSetRuntime::write_ref_field_post_entry), Rcard_addr, R16_thread); |
276 |
277 |
277 __ bind(filtered); |
278 __ bind(filtered); |
278 } |
279 } |
279 |
280 |
280 void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type, |
281 void G1BarrierSetAssembler::oop_store_at(MacroAssembler* masm, DecoratorSet decorators, BasicType type, |