< prev index next >

src/hotspot/cpu/aarch64/c1_Runtime1_aarch64.cpp

Print this page
rev 54670 : Port of valuetypes to aarch64

*** 770,800 **** } break; case new_type_array_id: case new_object_array_id: { Register length = r19; // Incoming Register klass = r3; // Incoming Register obj = r0; // Result if (id == new_type_array_id) { __ set_info("new_type_array", dont_gc_arguments); ! } else { __ set_info("new_object_array", dont_gc_arguments); } #ifdef ASSERT // assert object type is really an array of the proper kind { Label ok; Register t0 = obj; __ ldrw(t0, Address(klass, Klass::layout_helper_offset())); __ asrw(t0, t0, Klass::_lh_array_tag_shift); ! int tag = ((id == new_type_array_id) ! ? Klass::_lh_array_tag_type_value ! : Klass::_lh_array_tag_obj_value); __ mov(rscratch1, tag); __ cmpw(t0, rscratch1); __ br(Assembler::EQ, ok); __ stop("assert(is an array klass)"); __ should_not_reach_here(); --- 770,810 ---- } break; case new_type_array_id: case new_object_array_id: + case new_value_array_id: { Register length = r19; // Incoming Register klass = r3; // Incoming Register obj = r0; // Result if (id == new_type_array_id) { __ set_info("new_type_array", dont_gc_arguments); ! } ! else if (id == new_object_array_id) { __ set_info("new_object_array", dont_gc_arguments); } + else { + __ set_info("new_value_array", dont_gc_arguments); + } #ifdef ASSERT // assert object type is really an array of the proper kind { Label ok; Register t0 = obj; __ ldrw(t0, Address(klass, Klass::layout_helper_offset())); __ asrw(t0, t0, Klass::_lh_array_tag_shift); ! ! int tag = 0; ! switch (id) { ! case new_type_array_id: tag = Klass::_lh_array_tag_type_value; break; ! case new_object_array_id: tag = Klass::_lh_array_tag_obj_value; break; ! case new_value_array_id: tag = Klass::_lh_array_tag_vt_value; break; ! default: ShouldNotReachHere(); ! } __ mov(rscratch1, tag); __ cmpw(t0, rscratch1); __ br(Assembler::EQ, ok); __ stop("assert(is an array klass)"); __ should_not_reach_here();
*** 850,859 **** --- 860,870 ---- OopMap* map = save_live_registers(sasm); int call_offset; if (id == new_type_array_id) { call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_type_array), klass, length); } else { + // Runtime1::new_object_array handles both object and value arrays call_offset = __ call_RT(obj, noreg, CAST_FROM_FN_PTR(address, new_object_array), klass, length); } oop_maps = new OopMapSet(); oop_maps->add_gc_map(call_offset, map);
*** 885,894 **** --- 896,944 ---- // r0,: new multi array __ verify_oop(r0); } break; + case load_flattened_array_id: // DMS CHECK + { + StubFrame f(sasm, "load_flattened_array", dont_gc_arguments); + OopMap* map = save_live_registers(sasm, 3); + + // Called with store_parameter and not C abi + + f.load_argument(1, r0); // rax,: array + f.load_argument(0, r1); // rbx,: index + int call_offset = __ call_RT(r0, noreg, CAST_FROM_FN_PTR(address, load_flattened_array), r0, r1); + + oop_maps = new OopMapSet(); + oop_maps->add_gc_map(call_offset, map); + restore_live_registers_except_r0(sasm); + + // rax,: loaded element at array[index] + __ verify_oop(r0); + } + break; + + case store_flattened_array_id: // DMS CHECK + { + StubFrame f(sasm, "store_flattened_array", dont_gc_arguments); + OopMap* map = save_live_registers(sasm, 4); + + // Called with store_parameter and not C abi + + f.load_argument(2, r0); // rax,: array + f.load_argument(1, r1); // rbx,: index + f.load_argument(0, r2); // rcx,: value + int call_offset = __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, store_flattened_array), r0, r1, r2); + + oop_maps = new OopMapSet(); + oop_maps->add_gc_map(call_offset, map); + restore_live_registers_except_r0(sasm); + } + break; + + case register_finalizer_id: { __ set_info("register_finalizer", dont_gc_arguments); // This is called via call_runtime so the arguments
*** 924,938 **** oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_class_cast_exception), true); } break; case throw_incompatible_class_change_error_id: ! { StubFrame f(sasm, "throw_incompatible_class_cast_exception", dont_gc_arguments); oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_incompatible_class_change_error), false); } break; case slow_subtype_check_id: { // Typical calling sequence: // __ push(klass_RInfo); // object klass or other subclass // __ push(sup_k_RInfo); // array element klass or other superclass --- 974,994 ---- oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_class_cast_exception), true); } break; case throw_incompatible_class_change_error_id: ! { StubFrame f(sasm, "throw_incompatible_class_change_exception", dont_gc_arguments); oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_incompatible_class_change_error), false); } break; + case throw_illegal_monitor_state_exception_id: + { StubFrame f(sasm, "throw_illegal_monitor_state_exception", dont_gc_arguments); + oop_maps = generate_exception_throw(sasm, CAST_FROM_FN_PTR(address, throw_illegal_monitor_state_exception), false); + } + break; + case slow_subtype_check_id: { // Typical calling sequence: // __ push(klass_RInfo); // object klass or other subclass // __ push(sup_k_RInfo); // array element klass or other superclass
*** 1120,1139 **** __ far_jump(RuntimeAddress(deopt_blob->unpack_with_reexecution())); } break; - default: { StubFrame f(sasm, "unimplemented entry", dont_gc_arguments); __ mov(r0, (int)id); __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), r0); __ should_not_reach_here(); } break; } } return oop_maps; } #undef __ --- 1176,1198 ---- __ far_jump(RuntimeAddress(deopt_blob->unpack_with_reexecution())); } break; + default: // DMS CHECK: we come here with id:0 and id:32 during VM intialization, should it be fixed? + // tty->print_cr("DMS id %d not handled", id); { StubFrame f(sasm, "unimplemented entry", dont_gc_arguments); __ mov(r0, (int)id); __ call_RT(noreg, noreg, CAST_FROM_FN_PTR(address, unimplemented_entry), r0); __ should_not_reach_here(); } break; } } + + return oop_maps; } #undef __
< prev index next >