src/cpu/x86/vm/assembler_x86_64.cpp

changeset 602
feeb96a45707
parent 599
c436414a719e
child 614
1f809e010142
child 617
44abbb0d4c18
     1.1 --- a/src/cpu/x86/vm/assembler_x86_64.cpp	Wed May 28 12:42:34 2008 -0700
     1.2 +++ b/src/cpu/x86/vm/assembler_x86_64.cpp	Wed May 28 21:06:24 2008 -0700
     1.3 @@ -4935,6 +4935,8 @@
     1.4    movq(Address(top, arrayOopDesc::length_offset_in_bytes()), t1);
     1.5    // set klass to intArrayKlass
     1.6    movptr(t1, ExternalAddress((address) Universe::intArrayKlassObj_addr()));
     1.7 +  // store klass last.  concurrent gcs assumes klass length is valid if
     1.8 +  // klass field is not null.
     1.9    store_klass(top, t1);
    1.10  
    1.11    // refill the tlab with an eden allocation
    1.12 @@ -5159,9 +5161,17 @@
    1.13  void MacroAssembler::store_klass(Register dst, Register src) {
    1.14    if (UseCompressedOops) {
    1.15      encode_heap_oop_not_null(src);
    1.16 -    // Store to the wide klass field to zero the gap.
    1.17 +    movl(Address(dst, oopDesc::klass_offset_in_bytes()), src);
    1.18 +  } else {
    1.19 +    movq(Address(dst, oopDesc::klass_offset_in_bytes()), src);
    1.20    }
    1.21 -  movq(Address(dst, oopDesc::klass_offset_in_bytes()), src);
    1.22 +}
    1.23 +
    1.24 +void MacroAssembler::store_klass_gap(Register dst, Register src) {
    1.25 +  if (UseCompressedOops) {
    1.26 +    // Store to klass gap in destination
    1.27 +    movl(Address(dst, oopDesc::klass_gap_offset_in_bytes()), src);
    1.28 +  }
    1.29  }
    1.30  
    1.31  void MacroAssembler::load_heap_oop(Register dst, Address src) {

mercurial