Mercurial > hg > truffle
diff src/cpu/sparc/vm/sparc.ad @ 12056:740e263c80c6
8003424: Enable Class Data Sharing for CompressedOops
8016729: ObjectAlignmentInBytes=16 now forces the use of heap based compressed oops
8005933: The -Xshare:auto option is ignored for -server
Summary: Move klass metaspace above the heap and support CDS with compressed klass ptrs.
Reviewed-by: coleenp, kvn, mgerdin, tschatzl, stefank
author | hseigel |
---|---|
date | Thu, 15 Aug 2013 20:04:10 -0400 |
parents | 46c544b8fbfc |
children | 7944aba7ba41 6a936747b569 |
line wrap: on
line diff
--- a/src/cpu/sparc/vm/sparc.ad Wed Aug 14 15:12:00 2013 -0700 +++ b/src/cpu/sparc/vm/sparc.ad Thu Aug 15 20:04:10 2013 -0400 @@ -559,10 +559,7 @@ int klass_load_size; if (UseCompressedKlassPointers) { assert(Universe::heap() != NULL, "java heap should be initialized"); - if (Universe::narrow_klass_base() == NULL) - klass_load_size = 2*BytesPerInstWord; // see MacroAssembler::load_klass() - else - klass_load_size = 3*BytesPerInstWord; + klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; } else { klass_load_size = 1*BytesPerInstWord; } @@ -1663,9 +1660,12 @@ if (UseCompressedKlassPointers) { assert(Universe::heap() != NULL, "java heap should be initialized"); st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass"); - st->print_cr("\tSLL R_G5,3,R_G5"); - if (Universe::narrow_klass_base() != NULL) - st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5"); + st->print_cr("\tSET Universe::narrow_klass_base,R_G6_heap_base"); + if (Universe::narrow_klass_shift() != 0) { + st->print_cr("\tSLL R_G5,3,R_G5"); + } + st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5"); + st->print_cr("\tSET Universe::narrow_ptrs_base,R_G6_heap_base"); } else { st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check"); } @@ -2563,10 +2563,7 @@ int klass_load_size; if (UseCompressedKlassPointers) { assert(Universe::heap() != NULL, "java heap should be initialized"); - if (Universe::narrow_klass_base() == NULL) - klass_load_size = 2*BytesPerInstWord; - else - klass_load_size = 3*BytesPerInstWord; + klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; } else { klass_load_size = 1*BytesPerInstWord; }