< prev index next >

src/cpu/ppc/vm/stubGenerator_ppc.cpp

Print this page
rev 8396 : imported patch epsilon-base


 631           __ save_LR_CR(R0);
 632           __ push_frame_reg_args(spill_slots, R0);
 633           __ std(from,  frame_size - 1 * wordSize, R1_SP);
 634           __ std(to,    frame_size - 2 * wordSize, R1_SP);
 635           __ std(count, frame_size - 3 * wordSize, R1_SP);
 636 
 637           __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), to, count);
 638 
 639           __ ld(from,  frame_size - 1 * wordSize, R1_SP);
 640           __ ld(to,    frame_size - 2 * wordSize, R1_SP);
 641           __ ld(count, frame_size - 3 * wordSize, R1_SP);
 642           __ pop_frame();
 643           __ restore_LR_CR(R0);
 644 
 645           __ bind(filtered);
 646         }
 647         break;
 648       case BarrierSet::CardTableModRef:
 649       case BarrierSet::CardTableExtension:
 650       case BarrierSet::ModRef:

 651         break;
 652       default:
 653         ShouldNotReachHere();
 654     }
 655   }
 656 
 657   //  Generate CMS/G1 post-write barrier for array.
 658   //
 659   //  Input:
 660   //     addr     - register containing starting address
 661   //     count    - register containing element count
 662   //     tmp      - scratch register
 663   //
 664   //  The input registers and R0 are overwritten.
 665   //
 666   void gen_write_ref_array_post_barrier(Register addr, Register count, Register tmp, bool branchToEnd) {
 667     BarrierSet* const bs = Universe::heap()->barrier_set();
 668 
 669     switch (bs->kind()) {
 670       case BarrierSet::G1SATBCT:


 707           __ srdi(addr, addr, CardTableModRefBS::card_shift);
 708           __ srdi(count, count, CardTableModRefBS::card_shift);
 709           __ subf(count, addr, count);
 710           assert_different_registers(R0, addr, count, tmp);
 711           __ load_const(tmp, (address)ct->byte_map_base);
 712           __ addic_(count, count, 1);
 713           __ beq(CCR0, Lskip_loop);
 714           __ li(R0, 0);
 715           __ mtctr(count);
 716           // Byte store loop
 717           __ bind(Lstore_loop);
 718           __ stbx(R0, tmp, addr);
 719           __ addi(addr, addr, 1);
 720           __ bdnz(Lstore_loop);
 721           __ bind(Lskip_loop);
 722 
 723           if (!branchToEnd) __ blr();
 724         }
 725       break;
 726       case BarrierSet::ModRef:

 727         if (!branchToEnd) __ blr();
 728         break;
 729       default:
 730         ShouldNotReachHere();
 731     }
 732   }
 733 
 734   // Support for void zero_words_aligned8(HeapWord* to, size_t count)
 735   //
 736   // Arguments:
 737   //   to:
 738   //   count:
 739   //
 740   // Destroys:
 741   //
 742   address generate_zero_words_aligned8() {
 743     StubCodeMark mark(this, "StubRoutines", "zero_words_aligned8");
 744 
 745     // Implemented as in ClearArray.
 746     address start = __ function_entry();




 631           __ save_LR_CR(R0);
 632           __ push_frame_reg_args(spill_slots, R0);
 633           __ std(from,  frame_size - 1 * wordSize, R1_SP);
 634           __ std(to,    frame_size - 2 * wordSize, R1_SP);
 635           __ std(count, frame_size - 3 * wordSize, R1_SP);
 636 
 637           __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), to, count);
 638 
 639           __ ld(from,  frame_size - 1 * wordSize, R1_SP);
 640           __ ld(to,    frame_size - 2 * wordSize, R1_SP);
 641           __ ld(count, frame_size - 3 * wordSize, R1_SP);
 642           __ pop_frame();
 643           __ restore_LR_CR(R0);
 644 
 645           __ bind(filtered);
 646         }
 647         break;
 648       case BarrierSet::CardTableModRef:
 649       case BarrierSet::CardTableExtension:
 650       case BarrierSet::ModRef:
 651       case BarrierSet::Epsilon:
 652         break;
 653       default:
 654         ShouldNotReachHere();
 655     }
 656   }
 657 
 658   //  Generate CMS/G1 post-write barrier for array.
 659   //
 660   //  Input:
 661   //     addr     - register containing starting address
 662   //     count    - register containing element count
 663   //     tmp      - scratch register
 664   //
 665   //  The input registers and R0 are overwritten.
 666   //
 667   void gen_write_ref_array_post_barrier(Register addr, Register count, Register tmp, bool branchToEnd) {
 668     BarrierSet* const bs = Universe::heap()->barrier_set();
 669 
 670     switch (bs->kind()) {
 671       case BarrierSet::G1SATBCT:


 708           __ srdi(addr, addr, CardTableModRefBS::card_shift);
 709           __ srdi(count, count, CardTableModRefBS::card_shift);
 710           __ subf(count, addr, count);
 711           assert_different_registers(R0, addr, count, tmp);
 712           __ load_const(tmp, (address)ct->byte_map_base);
 713           __ addic_(count, count, 1);
 714           __ beq(CCR0, Lskip_loop);
 715           __ li(R0, 0);
 716           __ mtctr(count);
 717           // Byte store loop
 718           __ bind(Lstore_loop);
 719           __ stbx(R0, tmp, addr);
 720           __ addi(addr, addr, 1);
 721           __ bdnz(Lstore_loop);
 722           __ bind(Lskip_loop);
 723 
 724           if (!branchToEnd) __ blr();
 725         }
 726       break;
 727       case BarrierSet::ModRef:
 728       case BarrierSet::Epsilon:
 729         if (!branchToEnd) __ blr();
 730         break;
 731       default:
 732         ShouldNotReachHere();
 733     }
 734   }
 735 
 736   // Support for void zero_words_aligned8(HeapWord* to, size_t count)
 737   //
 738   // Arguments:
 739   //   to:
 740   //   count:
 741   //
 742   // Destroys:
 743   //
 744   address generate_zero_words_aligned8() {
 745     StubCodeMark mark(this, "StubRoutines", "zero_words_aligned8");
 746 
 747     // Implemented as in ClearArray.
 748     address start = __ function_entry();


< prev index next >