Mercurial > hg > graal-compiler
comparison src/cpu/x86/vm/assembler_x86_64.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 44abbb0d4c18 |
comparison
equal
deleted
inserted
replaced
166:aaa1137c5ef4 | 167:feeb96a45707 |
---|---|
4933 addq(t1, (int)ThreadLocalAllocBuffer::alignment_reserve()); | 4933 addq(t1, (int)ThreadLocalAllocBuffer::alignment_reserve()); |
4934 shlq(t1, log2_intptr(HeapWordSize / sizeof(jint))); | 4934 shlq(t1, log2_intptr(HeapWordSize / sizeof(jint))); |
4935 movq(Address(top, arrayOopDesc::length_offset_in_bytes()), t1); | 4935 movq(Address(top, arrayOopDesc::length_offset_in_bytes()), t1); |
4936 // set klass to intArrayKlass | 4936 // set klass to intArrayKlass |
4937 movptr(t1, ExternalAddress((address) Universe::intArrayKlassObj_addr())); | 4937 movptr(t1, ExternalAddress((address) Universe::intArrayKlassObj_addr())); |
4938 // store klass last. concurrent gcs assumes klass length is valid if | |
4939 // klass field is not null. | |
4938 store_klass(top, t1); | 4940 store_klass(top, t1); |
4939 | 4941 |
4940 // refill the tlab with an eden allocation | 4942 // refill the tlab with an eden allocation |
4941 bind(do_refill); | 4943 bind(do_refill); |
4942 movq(t1, Address(thread_reg, in_bytes(JavaThread::tlab_size_offset()))); | 4944 movq(t1, Address(thread_reg, in_bytes(JavaThread::tlab_size_offset()))); |
5157 } | 5159 } |
5158 | 5160 |
5159 void MacroAssembler::store_klass(Register dst, Register src) { | 5161 void MacroAssembler::store_klass(Register dst, Register src) { |
5160 if (UseCompressedOops) { | 5162 if (UseCompressedOops) { |
5161 encode_heap_oop_not_null(src); | 5163 encode_heap_oop_not_null(src); |
5162 // Store to the wide klass field to zero the gap. | 5164 movl(Address(dst, oopDesc::klass_offset_in_bytes()), src); |
5163 } | 5165 } else { |
5164 movq(Address(dst, oopDesc::klass_offset_in_bytes()), src); | 5166 movq(Address(dst, oopDesc::klass_offset_in_bytes()), src); |
5167 } | |
5168 } | |
5169 | |
5170 void MacroAssembler::store_klass_gap(Register dst, Register src) { | |
5171 if (UseCompressedOops) { | |
5172 // Store to klass gap in destination | |
5173 movl(Address(dst, oopDesc::klass_gap_offset_in_bytes()), src); | |
5174 } | |
5165 } | 5175 } |
5166 | 5176 |
5167 void MacroAssembler::load_heap_oop(Register dst, Address src) { | 5177 void MacroAssembler::load_heap_oop(Register dst, Address src) { |
5168 if (UseCompressedOops) { | 5178 if (UseCompressedOops) { |
5169 movl(dst, src); | 5179 movl(dst, src); |