Mercurial > hg > graal-compiler
comparison 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 |
comparison
equal
deleted
inserted
replaced
12055:d96f52012aaa | 12056:740e263c80c6 |
---|---|
557 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); | 557 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); |
558 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); | 558 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); |
559 int klass_load_size; | 559 int klass_load_size; |
560 if (UseCompressedKlassPointers) { | 560 if (UseCompressedKlassPointers) { |
561 assert(Universe::heap() != NULL, "java heap should be initialized"); | 561 assert(Universe::heap() != NULL, "java heap should be initialized"); |
562 if (Universe::narrow_klass_base() == NULL) | 562 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; |
563 klass_load_size = 2*BytesPerInstWord; // see MacroAssembler::load_klass() | |
564 else | |
565 klass_load_size = 3*BytesPerInstWord; | |
566 } else { | 563 } else { |
567 klass_load_size = 1*BytesPerInstWord; | 564 klass_load_size = 1*BytesPerInstWord; |
568 } | 565 } |
569 if (Assembler::is_simm13(v_off)) { | 566 if (Assembler::is_simm13(v_off)) { |
570 return klass_load_size + | 567 return klass_load_size + |
1661 st->print_cr("\nUEP:"); | 1658 st->print_cr("\nUEP:"); |
1662 #ifdef _LP64 | 1659 #ifdef _LP64 |
1663 if (UseCompressedKlassPointers) { | 1660 if (UseCompressedKlassPointers) { |
1664 assert(Universe::heap() != NULL, "java heap should be initialized"); | 1661 assert(Universe::heap() != NULL, "java heap should be initialized"); |
1665 st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass"); | 1662 st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass"); |
1666 st->print_cr("\tSLL R_G5,3,R_G5"); | 1663 st->print_cr("\tSET Universe::narrow_klass_base,R_G6_heap_base"); |
1667 if (Universe::narrow_klass_base() != NULL) | 1664 if (Universe::narrow_klass_shift() != 0) { |
1668 st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5"); | 1665 st->print_cr("\tSLL R_G5,3,R_G5"); |
1666 } | |
1667 st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5"); | |
1668 st->print_cr("\tSET Universe::narrow_ptrs_base,R_G6_heap_base"); | |
1669 } else { | 1669 } else { |
1670 st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check"); | 1670 st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check"); |
1671 } | 1671 } |
1672 st->print_cr("\tCMP R_G5,R_G3" ); | 1672 st->print_cr("\tCMP R_G5,R_G3" ); |
1673 st->print ("\tTne xcc,R_G0+ST_RESERVED_FOR_USER_0+2"); | 1673 st->print ("\tTne xcc,R_G0+ST_RESERVED_FOR_USER_0+2"); |
2561 int off = __ offset(); | 2561 int off = __ offset(); |
2562 __ load_klass(O0, G3_scratch); | 2562 __ load_klass(O0, G3_scratch); |
2563 int klass_load_size; | 2563 int klass_load_size; |
2564 if (UseCompressedKlassPointers) { | 2564 if (UseCompressedKlassPointers) { |
2565 assert(Universe::heap() != NULL, "java heap should be initialized"); | 2565 assert(Universe::heap() != NULL, "java heap should be initialized"); |
2566 if (Universe::narrow_klass_base() == NULL) | 2566 klass_load_size = MacroAssembler::instr_size_for_decode_klass_not_null() + 1*BytesPerInstWord; |
2567 klass_load_size = 2*BytesPerInstWord; | |
2568 else | |
2569 klass_load_size = 3*BytesPerInstWord; | |
2570 } else { | 2567 } else { |
2571 klass_load_size = 1*BytesPerInstWord; | 2568 klass_load_size = 1*BytesPerInstWord; |
2572 } | 2569 } |
2573 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); | 2570 int entry_offset = InstanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); |
2574 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); | 2571 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); |