diff --git a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp index 28870a0..310bbb2 100644 --- a/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp +++ b/src/hotspot/cpu/arm/c1_LIRAssembler_arm.cpp @@ -2777,17 +2777,14 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) { #endif // AARCH64 address copyfunc_addr = StubRoutines::generic_arraycopy(); - if (copyfunc_addr == NULL) { // Use C version if stub was not generated - __ call(CAST_FROM_FN_PTR(address, Runtime1::arraycopy)); - } else { + assert(copyfunc_addr != NULL, "generic arraycopy stub required"); #ifndef PRODUCT - if (PrintC1Statistics) { - __ inc_counter((address)&Runtime1::_generic_arraycopystub_cnt, tmp, tmp2); - } -#endif // !PRODUCT - // the stub is in the code cache so close enough - __ call(copyfunc_addr, relocInfo::runtime_call_type); + if (PrintC1Statistics) { + __ inc_counter((address)&Runtime1::_generic_arraycopystub_cnt, tmp, tmp2); } +#endif // !PRODUCT + // the stub is in the code cache so close enough + __ call(copyfunc_addr, relocInfo::runtime_call_type); #ifdef AARCH64 __ raw_pop(length, ZR); @@ -2797,15 +2794,11 @@ void LIR_Assembler::emit_arraycopy(LIR_OpArrayCopy* op) { __ cbz_32(R0, *stub->continuation()); - if (copyfunc_addr != NULL) { - __ mvn_32(tmp, R0); - restore_from_reserved_area(R0, R1, R2, R3); // load saved arguments in slow case only - __ sub_32(length, length, tmp); - __ add_32(src_pos, src_pos, tmp); - __ add_32(dst_pos, dst_pos, tmp); - } else { - restore_from_reserved_area(R0, R1, R2, R3); // load saved arguments in slow case only - } + __ mvn_32(tmp, R0); + restore_from_reserved_area(R0, R1, R2, R3); // load saved arguments in slow case only + __ sub_32(length, length, tmp); + __ add_32(src_pos, src_pos, tmp); + __ add_32(dst_pos, dst_pos, tmp); __ b(*stub->entry());