Mercurial > hg > truffle
diff src/cpu/x86/vm/assembler_x86.cpp @ 845:df6caf649ff7
6700789: G1: Enable use of compressed oops with G1 heaps
Summary: Modifications to G1 so as to allow the use of compressed oops.
Reviewed-by: apetrusenko, coleenp, jmasa, kvn, never, phh, tonyp
author | ysr |
---|---|
date | Tue, 14 Jul 2009 15:40:39 -0700 |
parents | 93c14e5562c4 |
children | 60fea60a6db5 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/assembler_x86.cpp Fri Jul 10 16:01:20 2009 -0700 +++ b/src/cpu/x86/vm/assembler_x86.cpp Tue Jul 14 15:40:39 2009 -0700 @@ -6805,14 +6805,18 @@ jcc(Assembler::equal, done); // if (x.f == NULL) goto done; - cmpptr(Address(obj, 0), NULL_WORD); +#ifdef _LP64 + load_heap_oop(tmp2, Address(obj, 0)); +#else + movptr(tmp2, Address(obj, 0)); +#endif + cmpptr(tmp2, (int32_t) NULL_WORD); jcc(Assembler::equal, done); // Can we store original value in the thread's buffer? - LP64_ONLY(movslq(tmp, index);) - movptr(tmp2, Address(obj, 0)); #ifdef _LP64 + movslq(tmp, index); cmpq(tmp, 0); #else cmpl(index, 0); @@ -6834,8 +6838,7 @@ if(tosca_live) push(rax); push(obj); #ifdef _LP64 - movq(c_rarg0, Address(obj, 0)); - call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), c_rarg0, r15_thread); + call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), tmp2, r15_thread); #else push(thread); call_VM_leaf(CAST_FROM_FN_PTR(address, SharedRuntime::g1_wb_pre), tmp2, thread);