Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp @ 6848:8e47bac5643a
7054512: Compress class pointers after perm gen removal
Summary: support of compress class pointers in the compilers.
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Tue, 09 Oct 2012 10:11:38 +0200 |
parents | 7eca5de9e0b6 |
children | 94e9408dbf50 |
comparison
equal
deleted
inserted
replaced
6847:65d07d9ee446 | 6848:8e47bac5643a |
---|---|
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 if (offset == oopDesc::klass_offset_in_bytes()) { | |
980 __ lduw(base, offset, to_reg->as_register()); | |
981 #ifdef _LP64 | |
982 if (UseCompressedKlassPointers) { | |
983 __ decode_klass_not_null(to_reg->as_register()); | |
984 } | |
985 #endif | |
986 } else { | |
987 __ ld_ptr(base, offset, to_reg->as_register()); | |
988 } | |
989 break; | |
974 case T_ARRAY : // fall through | 990 case T_ARRAY : // fall through |
975 case T_OBJECT: | 991 case T_OBJECT: |
976 { | 992 { |
977 if (UseCompressedOops && !wide) { | 993 if (UseCompressedOops && !wide) { |
978 __ lduw(base, offset, to_reg->as_register()); | 994 __ lduw(base, offset, to_reg->as_register()); |
2342 Label known_ok, halt; | 2358 Label known_ok, halt; |
2343 metadata2reg(op->expected_type()->constant_encoding(), tmp); | 2359 metadata2reg(op->expected_type()->constant_encoding(), tmp); |
2344 if (UseCompressedKlassPointers) { | 2360 if (UseCompressedKlassPointers) { |
2345 // tmp holds the default type. It currently comes uncompressed after the | 2361 // tmp holds the default type. It currently comes uncompressed after the |
2346 // load of a constant, so encode it. | 2362 // load of a constant, so encode it. |
2347 __ encode_heap_oop(tmp); | 2363 __ encode_klass_not_null(tmp); |
2348 // load the raw value of the dst klass, since we will be comparing | 2364 // load the raw value of the dst klass, since we will be comparing |
2349 // uncompressed values directly. | 2365 // uncompressed values directly. |
2350 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2); | 2366 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2); |
2351 if (basic_type != T_OBJECT) { | 2367 if (basic_type != T_OBJECT) { |
2352 __ cmp(tmp, tmp2); | 2368 __ cmp(tmp, tmp2); |