Mercurial > hg > graal-jvmci-8
diff src/cpu/x86/vm/interp_masm_x86_64.cpp @ 113:ba764ed4b6f2
6420645: Create a vm that uses compressed oops for up to 32gb heapsizes
Summary: Compressed oops in instances, arrays, and headers. Code contributors are coleenp, phh, never, swamyv
Reviewed-by: jmasa, kamg, acorn, tbell, kvn, rasbold
author | coleenp |
---|---|
date | Sun, 13 Apr 2008 17:43:42 -0400 |
parents | a61af66fc99e |
children | 6d172e3548cb 37f87013dfd8 |
line wrap: on
line diff
--- a/src/cpu/x86/vm/interp_masm_x86_64.cpp Fri Apr 11 09:56:35 2008 -0400 +++ b/src/cpu/x86/vm/interp_masm_x86_64.cpp Sun Apr 13 17:43:42 2008 -0400 @@ -267,15 +267,29 @@ addq(rdi, arrayOopDesc::base_offset_in_bytes(T_OBJECT)); // Scan rcx words at [rdi] for occurance of rax // Set NZ/Z based on last compare - repne_scan(); - // Not equal? - jcc(Assembler::notEqual, not_subtype); + + // this part is kind tricky, as values in supers array could be 32 or 64 bit wide + // and we store values in objArrays always encoded, thus we need to encode value + // before repne + if (UseCompressedOops) { + encode_heap_oop(rax); + repne_scanl(); + // Not equal? + jcc(Assembler::notEqual, not_subtype); + // decode heap oop here for movq + decode_heap_oop(rax); + } else { + repne_scanq(); + jcc(Assembler::notEqual, not_subtype); + } // Must be equal but missed in cache. Update cache. movq(Address(Rsub_klass, sizeof(oopDesc) + Klass::secondary_super_cache_offset_in_bytes()), rax); jmp(ok_is_subtype); bind(not_subtype); + // decode heap oop here for miss + if (UseCompressedOops) decode_heap_oop(rax); profile_typecheck_failed(rcx); // blows rcx }