< prev index next >

src/hotspot/cpu/x86/c1_LIRAssembler_x86.cpp

remove c1 runtime1 medium slowpath

*** 3055,3067 **** // these are just temporary placements until we need to reload store_parameter(src_pos, 3); store_parameter(src, 4); NOT_LP64(assert(src == rcx && src_pos == rdx, "mismatch in calling convention");) - address C_entry = CAST_FROM_FN_PTR(address, Runtime1::arraycopy); - address copyfunc_addr = StubRoutines::generic_arraycopy(); // pass arguments: may push as this is not a safepoint; SP must be fix at each safepoint #ifdef _LP64 // The arguments are in java calling convention so we can trivially shift them to C // convention --- 3055,3066 ---- // these are just temporary placements until we need to reload store_parameter(src_pos, 3); store_parameter(src, 4); NOT_LP64(assert(src == rcx && src_pos == rdx, "mismatch in calling convention");) address copyfunc_addr = StubRoutines::generic_arraycopy(); + assert(copyfunc_addr != NULL, "generic arraycopy stub required"); // pass arguments: may push as this is not a safepoint; SP must be fix at each safepoint #ifdef _LP64 // The arguments are in java calling convention so we can trivially shift them to C // convention ***************
*** 3075,3149 **** __ mov(c_rarg3, j_rarg3); #ifdef _WIN64 // Allocate abi space for args but be sure to keep stack aligned __ subptr(rsp, 6*wordSize); store_parameter(j_rarg4, 4); - if (copyfunc_addr == NULL) { // Use C version if stub was not generated - __ call(RuntimeAddress(C_entry)); - } else { #ifndef PRODUCT ! if (PrintC1Statistics) { ! __ incrementl(ExternalAddress((address)&Runtime1::_generic_arraycopystub_cnt)); ! } ! #endif ! __ call(RuntimeAddress(copyfunc_addr)); } __ addptr(rsp, 6*wordSize); #else __ mov(c_rarg4, j_rarg4); - if (copyfunc_addr == NULL) { // Use C version if stub was not generated - __ call(RuntimeAddress(C_entry)); - } else { #ifndef PRODUCT ! if (PrintC1Statistics) { ! __ incrementl(ExternalAddress((address)&Runtime1::_generic_arraycopystub_cnt)); ! } ! #endif ! __ call(RuntimeAddress(copyfunc_addr)); } #endif // _WIN64 #else __ push(length); __ push(dst_pos); __ push(dst); __ push(src_pos); __ push(src); - if (copyfunc_addr == NULL) { // Use C version if stub was not generated - __ call_VM_leaf(C_entry, 5); // removes pushed parameter from the stack - } else { #ifndef PRODUCT ! if (PrintC1Statistics) { ! __ incrementl(ExternalAddress((address)&Runtime1::_generic_arraycopystub_cnt)); ! } ! #endif ! __ call_VM_leaf(copyfunc_addr, 5); // removes pushed parameter from the stack } #endif // _LP64 __ cmpl(rax, 0); __ jcc(Assembler::equal, *stub->continuation()); ! if (copyfunc_addr != NULL) { ! __ mov(tmp, rax); ! __ xorl(tmp, -1); ! } // Reload values from the stack so they are where the stub // expects them. __ movptr (dst, Address(rsp, 0*BytesPerWord)); __ movptr (dst_pos, Address(rsp, 1*BytesPerWord)); __ movptr (length, Address(rsp, 2*BytesPerWord)); __ movptr (src_pos, Address(rsp, 3*BytesPerWord)); __ movptr (src, Address(rsp, 4*BytesPerWord)); ! if (copyfunc_addr != NULL) { ! __ subl(length, tmp); ! __ addl(src_pos, tmp); ! __ addl(dst_pos, tmp); ! } __ jmp(*stub->entry()); __ bind(*stub->continuation()); return; } --- 3074,3132 ---- __ mov(c_rarg3, j_rarg3); #ifdef _WIN64 // Allocate abi space for args but be sure to keep stack aligned __ subptr(rsp, 6*wordSize); store_parameter(j_rarg4, 4); #ifndef PRODUCT ! if (PrintC1Statistics) { ! __ incrementl(ExternalAddress((address)&Runtime1::_generic_arraycopystub_cnt)); } + #endif + __ call(RuntimeAddress(copyfunc_addr)); __ addptr(rsp, 6*wordSize); #else __ mov(c_rarg4, j_rarg4); #ifndef PRODUCT ! if (PrintC1Statistics) { ! __ incrementl(ExternalAddress((address)&Runtime1::_generic_arraycopystub_cnt)); } + #endif + __ call(RuntimeAddress(copyfunc_addr)); #endif // _WIN64 #else __ push(length); __ push(dst_pos); __ push(dst); __ push(src_pos); __ push(src); #ifndef PRODUCT ! if (PrintC1Statistics) { ! __ incrementl(ExternalAddress((address)&Runtime1::_generic_arraycopystub_cnt)); } + #endif + __ call_VM_leaf(copyfunc_addr, 5); // removes pushed parameter from the stack #endif // _LP64 __ cmpl(rax, 0); __ jcc(Assembler::equal, *stub->continuation()); ! __ mov(tmp, rax); ! __ xorl(tmp, -1); // Reload values from the stack so they are where the stub // expects them. __ movptr (dst, Address(rsp, 0*BytesPerWord)); __ movptr (dst_pos, Address(rsp, 1*BytesPerWord)); __ movptr (length, Address(rsp, 2*BytesPerWord)); __ movptr (src_pos, Address(rsp, 3*BytesPerWord)); __ movptr (src, Address(rsp, 4*BytesPerWord)); ! __ subl(length, tmp); ! __ addl(src_pos, tmp); ! __ addl(dst_pos, tmp); __ jmp(*stub->entry()); __ bind(*stub->continuation()); return; }
< prev index next >