< prev index next >

src/cpu/x86/vm/stubGenerator_x86_32.cpp

Print this page

        

*** 36,45 **** --- 36,46 ---- #include "runtime/handles.inline.hpp" #include "runtime/sharedRuntime.hpp" #include "runtime/stubCodeGenerator.hpp" #include "runtime/stubRoutines.hpp" #include "runtime/thread.inline.hpp" + #include "utilities/macros.hpp" #include "utilities/top.hpp" #ifdef COMPILER2 #include "opto/runtime.hpp" #endif
*** 706,715 **** --- 707,717 ---- assert_different_registers(start, count); BarrierSet* bs = Universe::heap()->barrier_set(); switch (bs->kind()) { case BarrierSet::G1SATBCT: case BarrierSet::G1SATBCTLogging: + case BarrierSet::ShenandoahBarrierSet: // With G1, don't generate the call if we statically know that the target in uninitialized if (!uninitialized_target) { __ pusha(); // push registers __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre), start, count);
*** 739,748 **** --- 741,751 ---- BarrierSet* bs = Universe::heap()->barrier_set(); assert_different_registers(start, count); switch (bs->kind()) { case BarrierSet::G1SATBCT: case BarrierSet::G1SATBCTLogging: + case BarrierSet::ShenandoahBarrierSet: { __ pusha(); // push registers __ call_VM_leaf(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post), start, count); __ popa();
*** 1482,1497 **** --- 1485,1518 ---- __ align(OptoLoopAlignment); __ BIND(L_store_element); __ movptr(to_element_addr, elem); // store the oop __ increment(count); // increment the count toward zero + #if INCLUDE_ALL_GCS + if (UseShenandoahGC) { + // Shenandoah barrier is too big for 8-bit offsets to work + __ jcc(Assembler::zero, L_do_card_marks); + } else + #endif __ jccb(Assembler::zero, L_do_card_marks); // ======== loop entry is here ======== __ BIND(L_load_element); + #if INCLUDE_ALL_GCS + if (UseShenandoahGC) { + // Needs GC barriers + __ load_heap_oop(elem, from_element_addr); + } else + #endif __ movptr(elem, from_element_addr); // load the oop __ testptr(elem, elem); + #if INCLUDE_ALL_GCS + if (UseShenandoahGC) { + // Shenandoah barrier is too big for 8-bit offsets to work + __ jcc(Assembler::zero, L_store_element); + } else + #endif __ jccb(Assembler::zero, L_store_element); // (Could do a trick here: Remember last successful non-null // element stored and make a quick oop equality check on it.)
< prev index next >