< prev index next >

src/hotspot/cpu/s390/gc/g1/g1BarrierSetAssembler_s390.cpp

Print this page




 503   __ z_ltg(tmp, satb_q_index_byte_offset, Z_R0, Z_thread);
 504 
 505   // index == 0?
 506   __ z_brz(refill);
 507 
 508   __ z_lg(tmp2, satb_q_buf_byte_offset, Z_thread);
 509   __ add2reg(tmp, -oopSize);
 510 
 511   __ z_stg(pre_val, 0, tmp, tmp2); // [_buf + index] := <address_of_card>
 512   __ z_stg(tmp, satb_q_index_byte_offset, Z_thread);
 513 
 514   __ bind(marking_not_active);
 515   // Restore tmp registers (see assertion in G1PreBarrierStub::emit_code()).
 516   __ z_lg(tmp,  0*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
 517   __ z_lg(tmp2, 1*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
 518   __ z_br(Z_R14);
 519 
 520   __ bind(refill);
 521   save_volatile_registers(sasm);
 522   __ z_lgr(tmp, pre_val); // save pre_val
 523   __ call_VM_leaf(CAST_FROM_FN_PTR(address, SATBMarkQueueSet::handle_zero_index_for_thread),
 524                   Z_thread);
 525   __ z_lgr(pre_val, tmp); // restore pre_val
 526   restore_volatile_registers(sasm);
 527   __ z_bru(restart);
 528 }
 529 
 530 void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler* sasm) {
 531   // Z_R1_scratch: oop address, address of updated memory slot
 532 
 533   BarrierSet* bs = BarrierSet::barrier_set();
 534   __ set_info("g1_post_barrier_slow_id", false);
 535 
 536   Register addr_oop  = Z_R1_scratch;
 537   Register addr_card = Z_R1_scratch;
 538   Register r1        = Z_R6; // Must be saved/restored.
 539   Register r2        = Z_R7; // Must be saved/restored.
 540   Register cardtable = r1;   // Must be non-volatile, because it is used to save addr_card.
 541   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
 542   CardTable* ct = ctbs->card_table();
 543   jbyte* byte_map_base = ct->byte_map_base();




 503   __ z_ltg(tmp, satb_q_index_byte_offset, Z_R0, Z_thread);
 504 
 505   // index == 0?
 506   __ z_brz(refill);
 507 
 508   __ z_lg(tmp2, satb_q_buf_byte_offset, Z_thread);
 509   __ add2reg(tmp, -oopSize);
 510 
 511   __ z_stg(pre_val, 0, tmp, tmp2); // [_buf + index] := <address_of_card>
 512   __ z_stg(tmp, satb_q_index_byte_offset, Z_thread);
 513 
 514   __ bind(marking_not_active);
 515   // Restore tmp registers (see assertion in G1PreBarrierStub::emit_code()).
 516   __ z_lg(tmp,  0*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
 517   __ z_lg(tmp2, 1*BytesPerWord + FrameMap::first_available_sp_in_frame, Z_SP);
 518   __ z_br(Z_R14);
 519 
 520   __ bind(refill);
 521   save_volatile_registers(sasm);
 522   __ z_lgr(tmp, pre_val); // save pre_val
 523   __ call_VM_leaf(CAST_FROM_FN_PTR(address, G1SATBMarkQueueSet::handle_zero_index_for_thread),
 524                   Z_thread);
 525   __ z_lgr(pre_val, tmp); // restore pre_val
 526   restore_volatile_registers(sasm);
 527   __ z_bru(restart);
 528 }
 529 
 530 void G1BarrierSetAssembler::generate_c1_post_barrier_runtime_stub(StubAssembler* sasm) {
 531   // Z_R1_scratch: oop address, address of updated memory slot
 532 
 533   BarrierSet* bs = BarrierSet::barrier_set();
 534   __ set_info("g1_post_barrier_slow_id", false);
 535 
 536   Register addr_oop  = Z_R1_scratch;
 537   Register addr_card = Z_R1_scratch;
 538   Register r1        = Z_R6; // Must be saved/restored.
 539   Register r2        = Z_R7; // Must be saved/restored.
 540   Register cardtable = r1;   // Must be non-volatile, because it is used to save addr_card.
 541   CardTableBarrierSet* ctbs = barrier_set_cast<CardTableBarrierSet>(bs);
 542   CardTable* ct = ctbs->card_table();
 543   jbyte* byte_map_base = ct->byte_map_base();


< prev index next >