src/cpu/x86/vm/stubGenerator_x86_32.cpp

changeset 777
37f87013dfd8
parent 454
a73cc31728fe
child 791
1ee8caae33af
     1.1 --- a/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Wed Jun 04 13:51:09 2008 -0700
     1.2 +++ b/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Thu Jun 05 15:57:56 2008 -0700
     1.3 @@ -711,7 +711,6 @@
     1.4    //     end     -  element count
     1.5    void  gen_write_ref_array_pre_barrier(Register start, Register count) {
     1.6      assert_different_registers(start, count);
     1.7 -#if 0 // G1 only
     1.8      BarrierSet* bs = Universe::heap()->barrier_set();
     1.9      switch (bs->kind()) {
    1.10        case BarrierSet::G1SATBCT:
    1.11 @@ -720,8 +719,8 @@
    1.12            __ pushad();                      // push registers
    1.13            __ pushl(count);
    1.14            __ pushl(start);
    1.15 -          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre));
    1.16 -          __ addl(esp, wordSize * 2);
    1.17 +          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_pre)));
    1.18 +          __ addl(rsp, wordSize * 2);
    1.19            __ popad();
    1.20          }
    1.21          break;
    1.22 @@ -733,7 +732,6 @@
    1.23          ShouldNotReachHere();
    1.24  
    1.25      }
    1.26 -#endif // 0 - G1 only
    1.27    }
    1.28  
    1.29  
    1.30 @@ -749,20 +747,18 @@
    1.31      BarrierSet* bs = Universe::heap()->barrier_set();
    1.32      assert_different_registers(start, count);
    1.33      switch (bs->kind()) {
    1.34 -#if 0 // G1 only
    1.35        case BarrierSet::G1SATBCT:
    1.36        case BarrierSet::G1SATBCTLogging:
    1.37          {
    1.38            __ pushad();                      // push registers
    1.39            __ pushl(count);
    1.40            __ pushl(start);
    1.41 -          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post));
    1.42 -          __ addl(esp, wordSize * 2);
    1.43 +          __ call(RuntimeAddress(CAST_FROM_FN_PTR(address, BarrierSet::static_write_ref_array_post)));
    1.44 +          __ addl(rsp, wordSize * 2);
    1.45            __ popad();
    1.46  
    1.47          }
    1.48          break;
    1.49 -#endif // 0 G1 only
    1.50  
    1.51        case BarrierSet::CardTableModRef:
    1.52        case BarrierSet::CardTableExtension:
    1.53 @@ -1377,9 +1373,9 @@
    1.54      Address elem_klass_addr(elem, oopDesc::klass_offset_in_bytes());
    1.55  
    1.56      // Copy from low to high addresses, indexed from the end of each array.
    1.57 +    gen_write_ref_array_pre_barrier(to, count);
    1.58      __ leal(end_from, end_from_addr);
    1.59      __ leal(end_to,   end_to_addr);
    1.60 -    gen_write_ref_array_pre_barrier(to, count);
    1.61      assert(length == count, "");        // else fix next line:
    1.62      __ negl(count);                     // negate and test the length
    1.63      __ jccb(Assembler::notZero, L_load_element);

mercurial