src/cpu/x86/vm/stubGenerator_x86_32.cpp

changeset 797
f8199438385b
parent 739
dc7f315e41f7
parent 791
1ee8caae33af
child 815
eb28cf662f56
child 840
2649e5276dd7
     1.1 --- a/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Thu Sep 04 18:40:43 2008 -0700
     1.2 +++ b/src/cpu/x86/vm/stubGenerator_x86_32.cpp	Wed Sep 17 16:49:18 2008 +0400
     1.3 @@ -712,7 +712,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 @@ -721,8 +720,8 @@
    1.12            __ pusha();                      // push registers
    1.13            __ push(count);
    1.14            __ push(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 +          __ addptr(rsp, 2*wordSize);
    1.19            __ popa();
    1.20          }
    1.21          break;
    1.22 @@ -734,7 +733,6 @@
    1.23          ShouldNotReachHere();
    1.24  
    1.25      }
    1.26 -#endif // 0 - G1 only
    1.27    }
    1.28  
    1.29  
    1.30 @@ -750,20 +748,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            __ pusha();                      // push registers
    1.39            __ push(count);
    1.40            __ push(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 +          __ addptr(rsp, 2*wordSize);
    1.45            __ popa();
    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 @@ -1378,9 +1374,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      __ lea(end_from, end_from_addr);
    1.59      __ lea(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      __ negptr(count);                   // negate and test the length
    1.63      __ jccb(Assembler::notZero, L_load_element);

mercurial