comparison src/cpu/sparc/vm/sparc.ad @ 647:bd441136a5ce

Merge
author kvn
date Thu, 19 Mar 2009 09:13:24 -0700
parents 7bb995fbd3c0 c771b7f43bbf
children fbde8ec322d0
comparison
equal deleted inserted replaced
640:ba50942c8138 647:bd441136a5ce
545 assert(!UseInlineCaches, "expect vtable calls only if not using ICs"); 545 assert(!UseInlineCaches, "expect vtable calls only if not using ICs");
546 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); 546 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size();
547 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); 547 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes();
548 int klass_load_size; 548 int klass_load_size;
549 if (UseCompressedOops) { 549 if (UseCompressedOops) {
550 klass_load_size = 3*BytesPerInstWord; // see MacroAssembler::load_klass() 550 assert(Universe::heap() != NULL, "java heap should be initialized");
551 if (Universe::narrow_oop_base() == NULL)
552 klass_load_size = 2*BytesPerInstWord; // see MacroAssembler::load_klass()
553 else
554 klass_load_size = 3*BytesPerInstWord;
551 } else { 555 } else {
552 klass_load_size = 1*BytesPerInstWord; 556 klass_load_size = 1*BytesPerInstWord;
553 } 557 }
554 if( Assembler::is_simm13(v_off) ) { 558 if( Assembler::is_simm13(v_off) ) {
555 return klass_load_size + 559 return klass_load_size +
1599 #ifndef PRODUCT 1603 #ifndef PRODUCT
1600 void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const { 1604 void MachUEPNode::format( PhaseRegAlloc *ra_, outputStream *st ) const {
1601 st->print_cr("\nUEP:"); 1605 st->print_cr("\nUEP:");
1602 #ifdef _LP64 1606 #ifdef _LP64
1603 if (UseCompressedOops) { 1607 if (UseCompressedOops) {
1608 assert(Universe::heap() != NULL, "java heap should be initialized");
1604 st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass"); 1609 st->print_cr("\tLDUW [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check - compressed klass");
1605 st->print_cr("\tSLL R_G5,3,R_G5"); 1610 st->print_cr("\tSLL R_G5,3,R_G5");
1606 st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5"); 1611 if (Universe::narrow_oop_base() != NULL)
1612 st->print_cr("\tADD R_G5,R_G6_heap_base,R_G5");
1607 } else { 1613 } else {
1608 st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check"); 1614 st->print_cr("\tLDX [R_O0 + oopDesc::klass_offset_in_bytes],R_G5\t! Inline cache check");
1609 } 1615 }
1610 st->print_cr("\tCMP R_G5,R_G3" ); 1616 st->print_cr("\tCMP R_G5,R_G3" );
1611 st->print ("\tTne xcc,R_G0+ST_RESERVED_FOR_USER_0+2"); 1617 st->print ("\tTne xcc,R_G0+ST_RESERVED_FOR_USER_0+2");
2500 // If we end up going thru a c2i adapter interpreter expects method in G5 2506 // If we end up going thru a c2i adapter interpreter expects method in G5
2501 int off = __ offset(); 2507 int off = __ offset();
2502 __ load_klass(O0, G3_scratch); 2508 __ load_klass(O0, G3_scratch);
2503 int klass_load_size; 2509 int klass_load_size;
2504 if (UseCompressedOops) { 2510 if (UseCompressedOops) {
2505 klass_load_size = 3*BytesPerInstWord; 2511 assert(Universe::heap() != NULL, "java heap should be initialized");
2512 if (Universe::narrow_oop_base() == NULL)
2513 klass_load_size = 2*BytesPerInstWord;
2514 else
2515 klass_load_size = 3*BytesPerInstWord;
2506 } else { 2516 } else {
2507 klass_load_size = 1*BytesPerInstWord; 2517 klass_load_size = 1*BytesPerInstWord;
2508 } 2518 }
2509 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size(); 2519 int entry_offset = instanceKlass::vtable_start_offset() + vtable_index*vtableEntry::size();
2510 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes(); 2520 int v_off = entry_offset*wordSize + vtableEntry::method_offset_in_bytes();
9002 ins_cost(300); 9012 ins_cost(300);
9003 format %{ "String Compare $str1,$str2 -> $result" %} 9013 format %{ "String Compare $str1,$str2 -> $result" %}
9004 ins_encode( enc_String_Compare(str1, str2, tmp1, tmp2, result) ); 9014 ins_encode( enc_String_Compare(str1, str2, tmp1, tmp2, result) );
9005 ins_pipe(long_memory_op); 9015 ins_pipe(long_memory_op);
9006 %} 9016 %}
9017
9018
9019 //---------- Population Count Instructions -------------------------------------
9020
9021 instruct popCountI(iRegI dst, iRegI src) %{
9022 predicate(UsePopCountInstruction);
9023 match(Set dst (PopCountI src));
9024
9025 format %{ "POPC $src, $dst" %}
9026 ins_encode %{
9027 __ popc($src$$Register, $dst$$Register);
9028 %}
9029 ins_pipe(ialu_reg);
9030 %}
9031
9032 // Note: Long.bitCount(long) returns an int.
9033 instruct popCountL(iRegI dst, iRegL src) %{
9034 predicate(UsePopCountInstruction);
9035 match(Set dst (PopCountL src));
9036
9037 format %{ "POPC $src, $dst" %}
9038 ins_encode %{
9039 __ popc($src$$Register, $dst$$Register);
9040 %}
9041 ins_pipe(ialu_reg);
9042 %}
9043
9007 9044
9008 // ============================================================================ 9045 // ============================================================================
9009 //------------Bytes reverse-------------------------------------------------- 9046 //------------Bytes reverse--------------------------------------------------
9010 9047
9011 instruct bytes_reverse_int(iRegI dst, stackSlotI src) %{ 9048 instruct bytes_reverse_int(iRegI dst, stackSlotI src) %{