提交 0edfb9c4 编写于 作者: N never

7110489: C1: 64-bit tiered with ForceUnreachable: assert(reachable(src))...

7110489: C1: 64-bit tiered with ForceUnreachable: assert(reachable(src)) failed: Address should be reachable
Reviewed-by: kvn, iveresov, twisti
上级 315bb061
...@@ -3535,7 +3535,8 @@ bool Assembler::reachable(AddressLiteral adr) { ...@@ -3535,7 +3535,8 @@ bool Assembler::reachable(AddressLiteral adr) {
// addressing. // addressing.
bool Assembler::is_polling_page_far() { bool Assembler::is_polling_page_far() {
intptr_t addr = (intptr_t)os::get_polling_page(); intptr_t addr = (intptr_t)os::get_polling_page();
return !is_simm32(addr - (intptr_t)CodeCache::low_bound()) || return ForceUnreachable ||
!is_simm32(addr - (intptr_t)CodeCache::low_bound()) ||
!is_simm32(addr - (intptr_t)CodeCache::high_bound()); !is_simm32(addr - (intptr_t)CodeCache::high_bound());
} }
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
// Adapters // Adapters
enum /* platform_dependent_constants */ { enum /* platform_dependent_constants */ {
adapter_code_size = NOT_LP64(16000 DEBUG_ONLY(+ 15000)) LP64_ONLY(32000 DEBUG_ONLY(+ 80000)) adapter_code_size = NOT_LP64(16000 DEBUG_ONLY(+ 15000)) LP64_ONLY(32000 DEBUG_ONLY(+ 120000))
}; };
public: public:
......
...@@ -95,6 +95,7 @@ class StubGenerator: public StubCodeGenerator { ...@@ -95,6 +95,7 @@ class StubGenerator: public StubCodeGenerator {
#define inc_counter_np(counter) (0) #define inc_counter_np(counter) (0)
#else #else
void inc_counter_np_(int& counter) { void inc_counter_np_(int& counter) {
// This can destroy rscratch1 if counter is far from the code cache
__ incrementl(ExternalAddress((address)&counter)); __ incrementl(ExternalAddress((address)&counter));
} }
#define inc_counter_np(counter) \ #define inc_counter_np(counter) \
...@@ -1466,8 +1467,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1466,8 +1467,8 @@ class StubGenerator: public StubCodeGenerator {
__ movb(Address(end_to, 8), rax); __ movb(Address(end_to, 8), rax);
__ BIND(L_exit); __ BIND(L_exit);
inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1555,8 +1556,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1555,8 +1556,8 @@ class StubGenerator: public StubCodeGenerator {
__ decrement(qword_count); __ decrement(qword_count);
__ jcc(Assembler::notZero, L_copy_8_bytes); __ jcc(Assembler::notZero, L_copy_8_bytes);
inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1564,8 +1565,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1564,8 +1565,8 @@ class StubGenerator: public StubCodeGenerator {
// Copy in 32-bytes chunks // Copy in 32-bytes chunks
copy_32_bytes_backward(from, to, qword_count, rax, L_copy_32_bytes, L_copy_8_bytes); copy_32_bytes_backward(from, to, qword_count, rax, L_copy_32_bytes, L_copy_8_bytes);
inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1658,8 +1659,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1658,8 +1659,8 @@ class StubGenerator: public StubCodeGenerator {
__ movw(Address(end_to, 8), rax); __ movw(Address(end_to, 8), rax);
__ BIND(L_exit); __ BIND(L_exit);
inc_counter_np(SharedRuntime::_jshort_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jshort_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1759,8 +1760,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1759,8 +1760,8 @@ class StubGenerator: public StubCodeGenerator {
__ decrement(qword_count); __ decrement(qword_count);
__ jcc(Assembler::notZero, L_copy_8_bytes); __ jcc(Assembler::notZero, L_copy_8_bytes);
inc_counter_np(SharedRuntime::_jshort_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jshort_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1768,8 +1769,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1768,8 +1769,8 @@ class StubGenerator: public StubCodeGenerator {
// Copy in 32-bytes chunks // Copy in 32-bytes chunks
copy_32_bytes_backward(from, to, qword_count, rax, L_copy_32_bytes, L_copy_8_bytes); copy_32_bytes_backward(from, to, qword_count, rax, L_copy_32_bytes, L_copy_8_bytes);
inc_counter_np(SharedRuntime::_jshort_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jshort_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1859,8 +1860,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1859,8 +1860,8 @@ class StubGenerator: public StubCodeGenerator {
__ leaq(end_to, Address(saved_to, dword_count, Address::times_4, -4)); __ leaq(end_to, Address(saved_to, dword_count, Address::times_4, -4));
gen_write_ref_array_post_barrier(saved_to, end_to, rax); gen_write_ref_array_post_barrier(saved_to, end_to, rax);
} }
inc_counter_np(SharedRuntime::_jint_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jint_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1940,11 +1941,11 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1940,11 +1941,11 @@ class StubGenerator: public StubCodeGenerator {
__ decrement(qword_count); __ decrement(qword_count);
__ jcc(Assembler::notZero, L_copy_8_bytes); __ jcc(Assembler::notZero, L_copy_8_bytes);
inc_counter_np(SharedRuntime::_jint_array_copy_ctr);
if (is_oop) { if (is_oop) {
__ jmp(L_exit); __ jmp(L_exit);
} }
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jint_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -1952,7 +1953,6 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1952,7 +1953,6 @@ class StubGenerator: public StubCodeGenerator {
// Copy in 32-bytes chunks // Copy in 32-bytes chunks
copy_32_bytes_backward(from, to, qword_count, rax, L_copy_32_bytes, L_copy_8_bytes); copy_32_bytes_backward(from, to, qword_count, rax, L_copy_32_bytes, L_copy_8_bytes);
inc_counter_np(SharedRuntime::_jint_array_copy_ctr);
__ bind(L_exit); __ bind(L_exit);
if (is_oop) { if (is_oop) {
Register end_to = rdx; Register end_to = rdx;
...@@ -1960,6 +1960,7 @@ class StubGenerator: public StubCodeGenerator { ...@@ -1960,6 +1960,7 @@ class StubGenerator: public StubCodeGenerator {
gen_write_ref_array_post_barrier(to, end_to, rax); gen_write_ref_array_post_barrier(to, end_to, rax);
} }
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jint_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -2032,8 +2033,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -2032,8 +2033,8 @@ class StubGenerator: public StubCodeGenerator {
if (is_oop) { if (is_oop) {
__ jmp(L_exit); __ jmp(L_exit);
} else { } else {
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -2045,11 +2046,13 @@ class StubGenerator: public StubCodeGenerator { ...@@ -2045,11 +2046,13 @@ class StubGenerator: public StubCodeGenerator {
if (is_oop) { if (is_oop) {
__ BIND(L_exit); __ BIND(L_exit);
gen_write_ref_array_post_barrier(saved_to, end_to, rax); gen_write_ref_array_post_barrier(saved_to, end_to, rax);
inc_counter_np(SharedRuntime::_oop_array_copy_ctr);
} else {
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr);
} }
restore_arg_regs(); restore_arg_regs();
if (is_oop) {
inc_counter_np(SharedRuntime::_oop_array_copy_ctr); // Update counter after rscratch1 is free
} else {
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr); // Update counter after rscratch1 is free
}
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -2113,8 +2116,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -2113,8 +2116,8 @@ class StubGenerator: public StubCodeGenerator {
if (is_oop) { if (is_oop) {
__ jmp(L_exit); __ jmp(L_exit);
} else { } else {
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr); // Update counter after rscratch1 is free
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -2127,11 +2130,13 @@ class StubGenerator: public StubCodeGenerator { ...@@ -2127,11 +2130,13 @@ class StubGenerator: public StubCodeGenerator {
__ BIND(L_exit); __ BIND(L_exit);
__ lea(rcx, Address(to, saved_count, Address::times_8, -8)); __ lea(rcx, Address(to, saved_count, Address::times_8, -8));
gen_write_ref_array_post_barrier(to, rcx, rax); gen_write_ref_array_post_barrier(to, rcx, rax);
inc_counter_np(SharedRuntime::_oop_array_copy_ctr);
} else {
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr);
} }
restore_arg_regs(); restore_arg_regs();
if (is_oop) {
inc_counter_np(SharedRuntime::_oop_array_copy_ctr); // Update counter after rscratch1 is free
} else {
inc_counter_np(SharedRuntime::_jlong_array_copy_ctr); // Update counter after rscratch1 is free
}
__ xorptr(rax, rax); // return 0 __ xorptr(rax, rax); // return 0
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
...@@ -2331,8 +2336,8 @@ class StubGenerator: public StubCodeGenerator { ...@@ -2331,8 +2336,8 @@ class StubGenerator: public StubCodeGenerator {
__ BIND(L_done); __ BIND(L_done);
__ movptr(r13, Address(rsp, saved_r13_offset * wordSize)); __ movptr(r13, Address(rsp, saved_r13_offset * wordSize));
__ movptr(r14, Address(rsp, saved_r14_offset * wordSize)); __ movptr(r14, Address(rsp, saved_r14_offset * wordSize));
inc_counter_np(SharedRuntime::_checkcast_array_copy_ctr);
restore_arg_regs(); restore_arg_regs();
inc_counter_np(SharedRuntime::_checkcast_array_copy_ctr); // Update counter after rscratch1 is free
__ leave(); // required for proper stackwalking of RuntimeStub frame __ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0); __ ret(0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册