hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
changeset 13974 791cba24758f
parent 13952 e3cf184080bc
parent 13972 115bfa87d77a
child 16611 6807a703dd6b
equal deleted inserted replaced
13963:e5b53c306fb5 13974:791cba24758f
   103       if (UseCompressedOops) {
   103       if (UseCompressedOops) {
   104         if (dst->is_address() && !dst->is_stack() && (dst->type() == T_OBJECT || dst->type() == T_ARRAY)) return false;
   104         if (dst->is_address() && !dst->is_stack() && (dst->type() == T_OBJECT || dst->type() == T_ARRAY)) return false;
   105         if (src->is_address() && !src->is_stack() && (src->type() == T_OBJECT || src->type() == T_ARRAY)) return false;
   105         if (src->is_address() && !src->is_stack() && (src->type() == T_OBJECT || src->type() == T_ARRAY)) return false;
   106       }
   106       }
   107 
   107 
       
   108       if (UseCompressedKlassPointers) {
       
   109         if (src->is_address() && !src->is_stack() && src->type() == T_ADDRESS &&
       
   110             src->as_address_ptr()->disp() == oopDesc::klass_offset_in_bytes()) return false;
       
   111       }
       
   112 
   108       if (dst->is_register()) {
   113       if (dst->is_register()) {
   109         if (src->is_address() && Assembler::is_simm13(src->as_address_ptr()->disp())) {
   114         if (src->is_address() && Assembler::is_simm13(src->as_address_ptr()->disp())) {
   110           return !PatchALot;
   115           return !PatchALot;
   111         } else if (src->is_single_stack()) {
   116         } else if (src->is_single_stack()) {
   112           return true;
   117           return true;
   967             __ ld(base, offset + hi_word_offset_in_bytes, to_reg->as_register_hi());
   972             __ ld(base, offset + hi_word_offset_in_bytes, to_reg->as_register_hi());
   968           }
   973           }
   969 #endif
   974 #endif
   970         }
   975         }
   971         break;
   976         break;
   972       case T_METADATA:
   977       case T_METADATA:  __ ld_ptr(base, offset, to_reg->as_register()); break;
   973       case T_ADDRESS:  __ ld_ptr(base, offset, to_reg->as_register()); break;
   978       case T_ADDRESS:
       
   979 #ifdef _LP64
       
   980         if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedKlassPointers) {
       
   981           __ lduw(base, offset, to_reg->as_register());
       
   982           __ decode_klass_not_null(to_reg->as_register());
       
   983         } else
       
   984 #endif
       
   985         {
       
   986           __ ld_ptr(base, offset, to_reg->as_register());
       
   987         }
       
   988         break;
   974       case T_ARRAY : // fall through
   989       case T_ARRAY : // fall through
   975       case T_OBJECT:
   990       case T_OBJECT:
   976         {
   991         {
   977           if (UseCompressedOops && !wide) {
   992           if (UseCompressedOops && !wide) {
   978             __ lduw(base, offset, to_reg->as_register());
   993             __ lduw(base, offset, to_reg->as_register());
  2342     Label known_ok, halt;
  2357     Label known_ok, halt;
  2343     metadata2reg(op->expected_type()->constant_encoding(), tmp);
  2358     metadata2reg(op->expected_type()->constant_encoding(), tmp);
  2344     if (UseCompressedKlassPointers) {
  2359     if (UseCompressedKlassPointers) {
  2345       // tmp holds the default type. It currently comes uncompressed after the
  2360       // tmp holds the default type. It currently comes uncompressed after the
  2346       // load of a constant, so encode it.
  2361       // load of a constant, so encode it.
  2347       __ encode_heap_oop(tmp);
  2362       __ encode_klass_not_null(tmp);
  2348       // load the raw value of the dst klass, since we will be comparing
  2363       // load the raw value of the dst klass, since we will be comparing
  2349       // uncompressed values directly.
  2364       // uncompressed values directly.
  2350       __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2);
  2365       __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2);
  2351       if (basic_type != T_OBJECT) {
  2366       if (basic_type != T_OBJECT) {
  2352         __ cmp(tmp, tmp2);
  2367         __ cmp(tmp, tmp2);