Mercurial > hg > graal-jvmci-8
comparison src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp @ 14422:2b8e28fdf503
Merge
author | kvn |
---|---|
date | Tue, 05 Nov 2013 17:38:04 -0800 |
parents | 252d541466ea |
children | 8085ce95b6f5 8cdf3f43f63e |
comparison
equal
deleted
inserted
replaced
14421:3068270ba476 | 14422:2b8e28fdf503 |
---|---|
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. |
2563 Label next_test; | 2563 Label next_test; |
2564 // See if the receiver is receiver[n]. | 2564 // See if the receiver is receiver[n]. |
2565 Address receiver_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)) - | 2565 Address receiver_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_offset(i)) - |
2566 mdo_offset_bias); | 2566 mdo_offset_bias); |
2567 __ ld_ptr(receiver_addr, tmp1); | 2567 __ ld_ptr(receiver_addr, tmp1); |
2568 __ verify_oop(tmp1); | 2568 __ verify_klass_ptr(tmp1); |
2569 __ cmp_and_brx_short(recv, tmp1, Assembler::notEqual, Assembler::pt, next_test); | 2569 __ cmp_and_brx_short(recv, tmp1, Assembler::notEqual, Assembler::pt, next_test); |
2570 Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)) - | 2570 Address data_addr(mdo, md->byte_offset_of_slot(data, ReceiverTypeData::receiver_count_offset(i)) - |
2571 mdo_offset_bias); | 2571 mdo_offset_bias); |
2572 __ ld_ptr(data_addr, tmp1); | 2572 __ ld_ptr(data_addr, tmp1); |
2573 __ add(tmp1, DataLayout::counter_increment, tmp1); | 2573 __ add(tmp1, DataLayout::counter_increment, tmp1); |
3098 __ add(tmp1, DataLayout::counter_increment, tmp1); | 3098 __ add(tmp1, DataLayout::counter_increment, tmp1); |
3099 __ st_ptr(tmp1, counter_addr); | 3099 __ st_ptr(tmp1, counter_addr); |
3100 } | 3100 } |
3101 } | 3101 } |
3102 | 3102 |
3103 void LIR_Assembler::emit_profile_type(LIR_OpProfileType* op) { | |
3104 fatal("Type profiling not implemented on this platform"); | |
3105 } | |
3106 | |
3103 void LIR_Assembler::align_backward_branch_target() { | 3107 void LIR_Assembler::align_backward_branch_target() { |
3104 __ align(OptoLoopAlignment); | 3108 __ align(OptoLoopAlignment); |
3105 } | 3109 } |
3106 | 3110 |
3107 | 3111 |