Mercurial > hg > truffle
comparison src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp @ 12355:cefad50507d8
Merge with hs25-b53
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Fri, 11 Oct 2013 10:38:03 +0200 |
parents | 7944aba7ba41 |
children | d13d7aba8c12 |
comparison
equal
deleted
inserted
replaced
12058:ccb4f2af2319 | 12355:cefad50507d8 |
---|---|
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) { | 108 if (UseCompressedClassPointers) { |
109 if (src->is_address() && !src->is_stack() && src->type() == T_ADDRESS && | 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; | 110 src->as_address_ptr()->disp() == oopDesc::klass_offset_in_bytes()) return false; |
111 } | 111 } |
112 | 112 |
113 if (dst->is_register()) { | 113 if (dst->is_register()) { |
518 | 518 |
519 | 519 |
520 void LIR_Assembler::jobject2reg_with_patching(Register reg, CodeEmitInfo *info) { | 520 void LIR_Assembler::jobject2reg_with_patching(Register reg, CodeEmitInfo *info) { |
521 // Allocate a new index in table to hold the object once it's been patched | 521 // Allocate a new index in table to hold the object once it's been patched |
522 int oop_index = __ oop_recorder()->allocate_oop_index(NULL); | 522 int oop_index = __ oop_recorder()->allocate_oop_index(NULL); |
523 PatchingStub* patch = new PatchingStub(_masm, PatchingStub::load_mirror_id, oop_index); | 523 PatchingStub* patch = new PatchingStub(_masm, patching_id(info), oop_index); |
524 | 524 |
525 AddressLiteral addrlit(NULL, oop_Relocation::spec(oop_index)); | 525 AddressLiteral addrlit(NULL, oop_Relocation::spec(oop_index)); |
526 assert(addrlit.rspec().type() == relocInfo::oop_type, "must be an oop reloc"); | 526 assert(addrlit.rspec().type() == relocInfo::oop_type, "must be an oop reloc"); |
527 // It may not seem necessary to use a sethi/add pair to load a NULL into dest, but the | 527 // It may not seem necessary to use a sethi/add pair to load a NULL into dest, but the |
528 // NULL will be dynamically patched later and the patched value may be large. We must | 528 // NULL will be dynamically patched later and the patched value may be large. We must |
961 } | 961 } |
962 break; | 962 break; |
963 case T_METADATA: __ ld_ptr(base, offset, to_reg->as_register()); break; | 963 case T_METADATA: __ ld_ptr(base, offset, to_reg->as_register()); break; |
964 case T_ADDRESS: | 964 case T_ADDRESS: |
965 #ifdef _LP64 | 965 #ifdef _LP64 |
966 if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedKlassPointers) { | 966 if (offset == oopDesc::klass_offset_in_bytes() && UseCompressedClassPointers) { |
967 __ lduw(base, offset, to_reg->as_register()); | 967 __ lduw(base, offset, to_reg->as_register()); |
968 __ decode_klass_not_null(to_reg->as_register()); | 968 __ decode_klass_not_null(to_reg->as_register()); |
969 } else | 969 } else |
970 #endif | 970 #endif |
971 { | 971 { |
2206 | 2206 |
2207 if (flags & LIR_OpArrayCopy::type_check) { | 2207 if (flags & LIR_OpArrayCopy::type_check) { |
2208 // We don't know the array types are compatible | 2208 // We don't know the array types are compatible |
2209 if (basic_type != T_OBJECT) { | 2209 if (basic_type != T_OBJECT) { |
2210 // Simple test for basic type arrays | 2210 // Simple test for basic type arrays |
2211 if (UseCompressedKlassPointers) { | 2211 if (UseCompressedClassPointers) { |
2212 // We don't need decode because we just need to compare | 2212 // We don't need decode because we just need to compare |
2213 __ lduw(src, oopDesc::klass_offset_in_bytes(), tmp); | 2213 __ lduw(src, oopDesc::klass_offset_in_bytes(), tmp); |
2214 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2); | 2214 __ lduw(dst, oopDesc::klass_offset_in_bytes(), tmp2); |
2215 __ cmp(tmp, tmp2); | 2215 __ cmp(tmp, tmp2); |
2216 __ br(Assembler::notEqual, false, Assembler::pt, *stub->entry()); | 2216 __ br(Assembler::notEqual, false, Assembler::pt, *stub->entry()); |
2340 // dst type is exactly the expected type and the src type is a | 2340 // dst type is exactly the expected type and the src type is a |
2341 // subtype which we can't check or src is the same array as dst | 2341 // subtype which we can't check or src is the same array as dst |
2342 // but not necessarily exactly of type default_type. | 2342 // but not necessarily exactly of type default_type. |
2343 Label known_ok, halt; | 2343 Label known_ok, halt; |
2344 metadata2reg(op->expected_type()->constant_encoding(), tmp); | 2344 metadata2reg(op->expected_type()->constant_encoding(), tmp); |
2345 if (UseCompressedKlassPointers) { | 2345 if (UseCompressedClassPointers) { |
2346 // tmp holds the default type. It currently comes uncompressed after the | 2346 // tmp holds the default type. It currently comes uncompressed after the |
2347 // load of a constant, so encode it. | 2347 // load of a constant, so encode it. |
2348 __ encode_klass_not_null(tmp); | 2348 __ encode_klass_not_null(tmp); |
2349 // load the raw value of the dst klass, since we will be comparing | 2349 // load the raw value of the dst klass, since we will be comparing |
2350 // uncompressed values directly. | 2350 // uncompressed values directly. |