Mercurial > hg > truffle
diff src/cpu/sparc/vm/assembler_sparc.cpp @ 167:feeb96a45707
6696264: assert("narrow oop can never be zero") for GCBasher & ParNewGC
Summary: decouple set_klass() with zeroing the gap when compressed.
Reviewed-by: kvn, ysr, jrose
author | coleenp |
---|---|
date | Wed, 28 May 2008 21:06:24 -0700 |
parents | c436414a719e |
children | 1f809e010142 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/assembler_sparc.cpp Wed May 28 12:42:34 2008 -0700 +++ b/src/cpu/sparc/vm/assembler_sparc.cpp Wed May 28 21:06:24 2008 -0700 @@ -3421,13 +3421,15 @@ set((intptr_t)markOopDesc::prototype()->copy_set_hash(0x2), t2); st_ptr(t2, top, oopDesc::mark_offset_in_bytes()); // set up the mark word // set klass to intArrayKlass - set((intptr_t)Universe::intArrayKlassObj_addr(), t2); - ld_ptr(t2, 0, t2); - store_klass(t2, top); sub(t1, typeArrayOopDesc::header_size(T_INT), t1); add(t1, ThreadLocalAllocBuffer::alignment_reserve(), t1); sll_ptr(t1, log2_intptr(HeapWordSize/sizeof(jint)), t1); st(t1, top, arrayOopDesc::length_offset_in_bytes()); + set((intptr_t)Universe::intArrayKlassObj_addr(), t2); + ld_ptr(t2, 0, t2); + // store klass last. concurrent gcs assumes klass length is valid if + // klass field is not null. + store_klass(t2, top); verify_oop(top); // refill the tlab with an eden allocation @@ -3568,13 +3570,19 @@ if (UseCompressedOops) { assert(dst_oop != klass, "not enough registers"); encode_heap_oop_not_null(klass); - sllx(klass, BitsPerInt, klass); - stx(klass, dst_oop, oopDesc::klass_offset_in_bytes()); + st(klass, dst_oop, oopDesc::klass_offset_in_bytes()); } else { st_ptr(klass, dst_oop, oopDesc::klass_offset_in_bytes()); } } +void MacroAssembler::store_klass_gap(Register s, Register d) { + if (UseCompressedOops) { + assert(s != d, "not enough registers"); + st(s, d, oopDesc::klass_gap_offset_in_bytes()); + } +} + void MacroAssembler::load_heap_oop(const Address& s, Register d, int offset) { if (UseCompressedOops) { lduw(s, d, offset);