< prev index next >

src/hotspot/cpu/x86/stubGenerator_x86_64.cpp

Print this page

        

@@ -1431,10 +1431,11 @@
     }
     __ addptr(qword_count, 4);
     __ jcc(Assembler::greater, L_copy_8_bytes); // Copy trailing qwords
   }
 
+
   // Arguments:
   //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary
   //             ignored
   //   name    - stub name string
   //

@@ -1479,72 +1480,66 @@
     }
 
     setup_arg_regs(); // from => rdi, to => rsi, count => rdx
                       // r9 and r10 may be used to save non-volatile registers
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !aligned, true);
-      // 'from', 'to' and 'count' are now valid
-      __ movptr(byte_count, count);
-      __ shrptr(count, 3); // count => qword_count
-
-      // Copy from low to high addresses.  Use 'to' as scratch.
-      __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
-      __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
-      __ negptr(qword_count); // make the count negative
-      __ jmp(L_copy_bytes);
-
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
-      __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
-      __ increment(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-
-      // Check for and copy trailing dword
-    __ BIND(L_copy_4_bytes);
-      __ testl(byte_count, 4);
-      __ jccb(Assembler::zero, L_copy_2_bytes);
-      __ movl(rax, Address(end_from, 8));
-      __ movl(Address(end_to, 8), rax);
-
-      __ addptr(end_from, 4);
-      __ addptr(end_to, 4);
-
-      // Check for and copy trailing word
-    __ BIND(L_copy_2_bytes);
-      __ testl(byte_count, 2);
-      __ jccb(Assembler::zero, L_copy_byte);
-      __ movw(rax, Address(end_from, 8));
-      __ movw(Address(end_to, 8), rax);
-
-      __ addptr(end_from, 2);
-      __ addptr(end_to, 2);
-
-      // Check for and copy trailing byte
-    __ BIND(L_copy_byte);
-      __ testl(byte_count, 1);
-      __ jccb(Assembler::zero, L_exit);
-      __ movb(rax, Address(end_from, 8));
-      __ movb(Address(end_to, 8), rax);
-    }
+    // 'from', 'to' and 'count' are now valid
+    __ movptr(byte_count, count);
+    __ shrptr(count, 3); // count => qword_count
+
+    // Copy from low to high addresses.  Use 'to' as scratch.
+    __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
+    __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
+    __ negptr(qword_count); // make the count negative
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
+    __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
+    __ increment(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
+
+    // Check for and copy trailing dword
+  __ BIND(L_copy_4_bytes);
+    __ testl(byte_count, 4);
+    __ jccb(Assembler::zero, L_copy_2_bytes);
+    __ movl(rax, Address(end_from, 8));
+    __ movl(Address(end_to, 8), rax);
+
+    __ addptr(end_from, 4);
+    __ addptr(end_to, 4);
+
+    // Check for and copy trailing word
+  __ BIND(L_copy_2_bytes);
+    __ testl(byte_count, 2);
+    __ jccb(Assembler::zero, L_copy_byte);
+    __ movw(rax, Address(end_from, 8));
+    __ movw(Address(end_to, 8), rax);
+
+    __ addptr(end_from, 2);
+    __ addptr(end_to, 2);
+
+    // Check for and copy trailing byte
+  __ BIND(L_copy_byte);
+    __ testl(byte_count, 1);
+    __ jccb(Assembler::zero, L_exit);
+    __ movb(rax, Address(end_from, 8));
+    __ movb(Address(end_to, 8), rax);
+
   __ BIND(L_exit);
-    address ucme_exit_pc = __ pc();
     restore_arg_regs();
     inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr); // Update counter after rscratch1 is free
     __ xorptr(rax, rax); // return 0
     __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
-    {
-      UnsafeCopyMemoryMark ucmm(this, !aligned, false, ucme_exit_pc);
-      // Copy in multi-bytes chunks
-      copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-      __ jmp(L_copy_4_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
+    __ jmp(L_copy_4_bytes);
+
     return start;
   }
 
   // Arguments:
   //   aligned - true => Input and output aligned on a HeapWord == 8-byte boundary

@@ -1585,61 +1580,55 @@
 
     array_overlap_test(nooverlap_target, Address::times_1);
     setup_arg_regs(); // from => rdi, to => rsi, count => rdx
                       // r9 and r10 may be used to save non-volatile registers
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !aligned, true);
-      // 'from', 'to' and 'count' are now valid
-      __ movptr(byte_count, count);
-      __ shrptr(count, 3);   // count => qword_count
-
-      // Copy from high to low addresses.
-
-      // Check for and copy trailing byte
-      __ testl(byte_count, 1);
-      __ jcc(Assembler::zero, L_copy_2_bytes);
-      __ movb(rax, Address(from, byte_count, Address::times_1, -1));
-      __ movb(Address(to, byte_count, Address::times_1, -1), rax);
-      __ decrement(byte_count); // Adjust for possible trailing word
-
-      // Check for and copy trailing word
-    __ BIND(L_copy_2_bytes);
-      __ testl(byte_count, 2);
-      __ jcc(Assembler::zero, L_copy_4_bytes);
-      __ movw(rax, Address(from, byte_count, Address::times_1, -2));
-      __ movw(Address(to, byte_count, Address::times_1, -2), rax);
-
-      // Check for and copy trailing dword
-    __ BIND(L_copy_4_bytes);
-      __ testl(byte_count, 4);
-      __ jcc(Assembler::zero, L_copy_bytes);
-      __ movl(rax, Address(from, qword_count, Address::times_8));
-      __ movl(Address(to, qword_count, Address::times_8), rax);
-      __ jmp(L_copy_bytes);
-
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(from, qword_count, Address::times_8, -8));
-      __ movq(Address(to, qword_count, Address::times_8, -8), rax);
-      __ decrement(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-    }
+    // 'from', 'to' and 'count' are now valid
+    __ movptr(byte_count, count);
+    __ shrptr(count, 3);   // count => qword_count
+
+    // Copy from high to low addresses.
+
+    // Check for and copy trailing byte
+    __ testl(byte_count, 1);
+    __ jcc(Assembler::zero, L_copy_2_bytes);
+    __ movb(rax, Address(from, byte_count, Address::times_1, -1));
+    __ movb(Address(to, byte_count, Address::times_1, -1), rax);
+    __ decrement(byte_count); // Adjust for possible trailing word
+
+    // Check for and copy trailing word
+  __ BIND(L_copy_2_bytes);
+    __ testl(byte_count, 2);
+    __ jcc(Assembler::zero, L_copy_4_bytes);
+    __ movw(rax, Address(from, byte_count, Address::times_1, -2));
+    __ movw(Address(to, byte_count, Address::times_1, -2), rax);
+
+    // Check for and copy trailing dword
+  __ BIND(L_copy_4_bytes);
+    __ testl(byte_count, 4);
+    __ jcc(Assembler::zero, L_copy_bytes);
+    __ movl(rax, Address(from, qword_count, Address::times_8));
+    __ movl(Address(to, qword_count, Address::times_8), rax);
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(from, qword_count, Address::times_8, -8));
+    __ movq(Address(to, qword_count, Address::times_8, -8), rax);
+    __ decrement(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
+
     restore_arg_regs();
     inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr); // Update counter after rscratch1 is free
     __ xorptr(rax, rax); // return 0
     __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !aligned, true);
-      // Copy in multi-bytes chunks
-      copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
+
     restore_arg_regs();
     inc_counter_np(SharedRuntime::_jbyte_array_copy_ctr); // Update counter after rscratch1 is free
     __ xorptr(rax, rax); // return 0
     __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame

@@ -1693,65 +1682,58 @@
     }
 
     setup_arg_regs(); // from => rdi, to => rsi, count => rdx
                       // r9 and r10 may be used to save non-volatile registers
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !aligned, true);
-      // 'from', 'to' and 'count' are now valid
-      __ movptr(word_count, count);
-      __ shrptr(count, 2); // count => qword_count
-
-      // Copy from low to high addresses.  Use 'to' as scratch.
-      __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
-      __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
-      __ negptr(qword_count);
-      __ jmp(L_copy_bytes);
-
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
-      __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
-      __ increment(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-
-      // Original 'dest' is trashed, so we can't use it as a
-      // base register for a possible trailing word copy
-
-      // Check for and copy trailing dword
-    __ BIND(L_copy_4_bytes);
-      __ testl(word_count, 2);
-      __ jccb(Assembler::zero, L_copy_2_bytes);
-      __ movl(rax, Address(end_from, 8));
-      __ movl(Address(end_to, 8), rax);
-
-      __ addptr(end_from, 4);
-      __ addptr(end_to, 4);
-
-      // Check for and copy trailing word
-    __ BIND(L_copy_2_bytes);
-      __ testl(word_count, 1);
-      __ jccb(Assembler::zero, L_exit);
-      __ movw(rax, Address(end_from, 8));
-      __ movw(Address(end_to, 8), rax);
-    }
+    // 'from', 'to' and 'count' are now valid
+    __ movptr(word_count, count);
+    __ shrptr(count, 2); // count => qword_count
+
+    // Copy from low to high addresses.  Use 'to' as scratch.
+    __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
+    __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
+    __ negptr(qword_count);
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
+    __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
+    __ increment(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
+
+    // Original 'dest' is trashed, so we can't use it as a
+    // base register for a possible trailing word copy
+
+    // Check for and copy trailing dword
+  __ BIND(L_copy_4_bytes);
+    __ testl(word_count, 2);
+    __ jccb(Assembler::zero, L_copy_2_bytes);
+    __ movl(rax, Address(end_from, 8));
+    __ movl(Address(end_to, 8), rax);
+
+    __ addptr(end_from, 4);
+    __ addptr(end_to, 4);
+
+    // Check for and copy trailing word
+  __ BIND(L_copy_2_bytes);
+    __ testl(word_count, 1);
+    __ jccb(Assembler::zero, L_exit);
+    __ movw(rax, Address(end_from, 8));
+    __ movw(Address(end_to, 8), rax);
+
   __ BIND(L_exit);
-    address ucme_exit_pc = __ pc();
     restore_arg_regs();
     inc_counter_np(SharedRuntime::_jshort_array_copy_ctr); // Update counter after rscratch1 is free
     __ xorptr(rax, rax); // return 0
     __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
-    {
-      UnsafeCopyMemoryMark ucmm(this, !aligned, false, ucme_exit_pc);
-      // Copy in multi-bytes chunks
-      copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-      __ jmp(L_copy_4_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
+    __ jmp(L_copy_4_bytes);
 
     return start;
   }
 
   address generate_fill(BasicType t, bool aligned, const char *name) {

@@ -1814,53 +1796,47 @@
 
     array_overlap_test(nooverlap_target, Address::times_2);
     setup_arg_regs(); // from => rdi, to => rsi, count => rdx
                       // r9 and r10 may be used to save non-volatile registers
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !aligned, true);
-      // 'from', 'to' and 'count' are now valid
-      __ movptr(word_count, count);
-      __ shrptr(count, 2); // count => qword_count
-
-      // Copy from high to low addresses.  Use 'to' as scratch.
-
-      // Check for and copy trailing word
-      __ testl(word_count, 1);
-      __ jccb(Assembler::zero, L_copy_4_bytes);
-      __ movw(rax, Address(from, word_count, Address::times_2, -2));
-      __ movw(Address(to, word_count, Address::times_2, -2), rax);
-
-     // Check for and copy trailing dword
-    __ BIND(L_copy_4_bytes);
-      __ testl(word_count, 2);
-      __ jcc(Assembler::zero, L_copy_bytes);
-      __ movl(rax, Address(from, qword_count, Address::times_8));
-      __ movl(Address(to, qword_count, Address::times_8), rax);
-      __ jmp(L_copy_bytes);
-
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(from, qword_count, Address::times_8, -8));
-      __ movq(Address(to, qword_count, Address::times_8, -8), rax);
-      __ decrement(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-    }
+    // 'from', 'to' and 'count' are now valid
+    __ movptr(word_count, count);
+    __ shrptr(count, 2); // count => qword_count
+
+    // Copy from high to low addresses.  Use 'to' as scratch.
+
+    // Check for and copy trailing word
+    __ testl(word_count, 1);
+    __ jccb(Assembler::zero, L_copy_4_bytes);
+    __ movw(rax, Address(from, word_count, Address::times_2, -2));
+    __ movw(Address(to, word_count, Address::times_2, -2), rax);
+
+    // Check for and copy trailing dword
+  __ BIND(L_copy_4_bytes);
+    __ testl(word_count, 2);
+    __ jcc(Assembler::zero, L_copy_bytes);
+    __ movl(rax, Address(from, qword_count, Address::times_8));
+    __ movl(Address(to, qword_count, Address::times_8), rax);
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(from, qword_count, Address::times_8, -8));
+    __ movq(Address(to, qword_count, Address::times_8, -8), rax);
+    __ decrement(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
+
     restore_arg_regs();
     inc_counter_np(SharedRuntime::_jshort_array_copy_ctr); // Update counter after rscratch1 is free
     __ xorptr(rax, rax); // return 0
     __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !aligned, true);
-      // Copy in multi-bytes chunks
-      copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
+
     restore_arg_regs();
     inc_counter_np(SharedRuntime::_jshort_array_copy_ctr); // Update counter after rscratch1 is free
     __ xorptr(rax, rax); // return 0
     __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame

@@ -1927,53 +1903,46 @@
 
     BasicType type = is_oop ? T_OBJECT : T_INT;
     BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
     bs->arraycopy_prologue(_masm, decorators, type, from, to, count);
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, true);
-      // 'from', 'to' and 'count' are now valid
-      __ movptr(dword_count, count);
-      __ shrptr(count, 1); // count => qword_count
-
-      // Copy from low to high addresses.  Use 'to' as scratch.
-      __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
-      __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
-      __ negptr(qword_count);
-      __ jmp(L_copy_bytes);
-
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
-      __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
-      __ increment(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-
-      // Check for and copy trailing dword
-    __ BIND(L_copy_4_bytes);
-      __ testl(dword_count, 1); // Only byte test since the value is 0 or 1
-      __ jccb(Assembler::zero, L_exit);
-      __ movl(rax, Address(end_from, 8));
-      __ movl(Address(end_to, 8), rax);
-    }
+    // 'from', 'to' and 'count' are now valid
+    __ movptr(dword_count, count);
+    __ shrptr(count, 1); // count => qword_count
+
+    // Copy from low to high addresses.  Use 'to' as scratch.
+    __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
+    __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
+    __ negptr(qword_count);
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
+    __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
+    __ increment(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
+
+    // Check for and copy trailing dword
+  __ BIND(L_copy_4_bytes);
+    __ testl(dword_count, 1); // Only byte test since the value is 0 or 1
+    __ jccb(Assembler::zero, L_exit);
+    __ movl(rax, Address(end_from, 8));
+    __ movl(Address(end_to, 8), rax);
+
   __ BIND(L_exit);
-    address ucme_exit_pc = __ pc();
     bs->arraycopy_epilogue(_masm, decorators, type, from, to, dword_count);
     restore_arg_regs_using_thread();
     inc_counter_np(SharedRuntime::_jint_array_copy_ctr); // Update counter after rscratch1 is free
     __ vzeroupper();
     __ xorptr(rax, rax); // return 0
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
-    {
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, false, ucme_exit_pc);
-      // Copy in multi-bytes chunks
-      copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-      __ jmp(L_copy_4_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
+    __ jmp(L_copy_4_bytes);
 
     return start;
   }
 
   // Arguments:

@@ -2030,49 +1999,42 @@
     BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
     // no registers are destroyed by this call
     bs->arraycopy_prologue(_masm, decorators, type, from, to, count);
 
     assert_clean_int(count, rax); // Make sure 'count' is clean int.
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, true);
-      // 'from', 'to' and 'count' are now valid
-      __ movptr(dword_count, count);
-      __ shrptr(count, 1); // count => qword_count
-
-      // Copy from high to low addresses.  Use 'to' as scratch.
-
-      // Check for and copy trailing dword
-      __ testl(dword_count, 1);
-      __ jcc(Assembler::zero, L_copy_bytes);
-      __ movl(rax, Address(from, dword_count, Address::times_4, -4));
-      __ movl(Address(to, dword_count, Address::times_4, -4), rax);
-      __ jmp(L_copy_bytes);
-
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(from, qword_count, Address::times_8, -8));
-      __ movq(Address(to, qword_count, Address::times_8, -8), rax);
-      __ decrement(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-    }
+    // 'from', 'to' and 'count' are now valid
+    __ movptr(dword_count, count);
+    __ shrptr(count, 1); // count => qword_count
+
+    // Copy from high to low addresses.  Use 'to' as scratch.
+
+    // Check for and copy trailing dword
+    __ testl(dword_count, 1);
+    __ jcc(Assembler::zero, L_copy_bytes);
+    __ movl(rax, Address(from, dword_count, Address::times_4, -4));
+    __ movl(Address(to, dword_count, Address::times_4, -4), rax);
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(from, qword_count, Address::times_8, -8));
+    __ movq(Address(to, qword_count, Address::times_8, -8), rax);
+    __ decrement(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
+
     if (is_oop) {
       __ jmp(L_exit);
     }
     restore_arg_regs_using_thread();
     inc_counter_np(SharedRuntime::_jint_array_copy_ctr); // Update counter after rscratch1 is free
     __ xorptr(rax, rax); // return 0
     __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, true);
-      // Copy in multi-bytes chunks
-      copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
 
   __ BIND(L_exit);
     bs->arraycopy_epilogue(_masm, decorators, type, from, to, dword_count);
     restore_arg_regs_using_thread();
     inc_counter_np(SharedRuntime::_jint_array_copy_ctr); // Update counter after rscratch1 is free

@@ -2138,27 +2100,24 @@
     }
 
     BasicType type = is_oop ? T_OBJECT : T_LONG;
     BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
     bs->arraycopy_prologue(_masm, decorators, type, from, to, qword_count);
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, true);
 
-      // Copy from low to high addresses.  Use 'to' as scratch.
-      __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
-      __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
-      __ negptr(qword_count);
-      __ jmp(L_copy_bytes);
-
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
-      __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
-      __ increment(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-    }
+    // Copy from low to high addresses.  Use 'to' as scratch.
+    __ lea(end_from, Address(from, qword_count, Address::times_8, -8));
+    __ lea(end_to,   Address(to,   qword_count, Address::times_8, -8));
+    __ negptr(qword_count);
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(end_from, qword_count, Address::times_8, 8));
+    __ movq(Address(end_to, qword_count, Address::times_8, 8), rax);
+    __ increment(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
+
     if (is_oop) {
       __ jmp(L_exit);
     } else {
       restore_arg_regs_using_thread();
       inc_counter_np(SharedRuntime::_jlong_array_copy_ctr); // Update counter after rscratch1 is free

@@ -2166,16 +2125,12 @@
       __ vzeroupper();
       __ leave(); // required for proper stackwalking of RuntimeStub frame
       __ ret(0);
     }
 
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, true);
-      // Copy in multi-bytes chunks
-      copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
 
     __ BIND(L_exit);
     bs->arraycopy_epilogue(_masm, decorators, type, from, to, qword_count);
     restore_arg_regs_using_thread();
     if (is_oop) {

@@ -2238,40 +2193,34 @@
     }
 
     BasicType type = is_oop ? T_OBJECT : T_LONG;
     BarrierSetAssembler *bs = BarrierSet::barrier_set()->barrier_set_assembler();
     bs->arraycopy_prologue(_masm, decorators, type, from, to, qword_count);
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, true);
 
-      __ jmp(L_copy_bytes);
+    __ jmp(L_copy_bytes);
+
+    // Copy trailing qwords
+  __ BIND(L_copy_8_bytes);
+    __ movq(rax, Address(from, qword_count, Address::times_8, -8));
+    __ movq(Address(to, qword_count, Address::times_8, -8), rax);
+    __ decrement(qword_count);
+    __ jcc(Assembler::notZero, L_copy_8_bytes);
 
-      // Copy trailing qwords
-    __ BIND(L_copy_8_bytes);
-      __ movq(rax, Address(from, qword_count, Address::times_8, -8));
-      __ movq(Address(to, qword_count, Address::times_8, -8), rax);
-      __ decrement(qword_count);
-      __ jcc(Assembler::notZero, L_copy_8_bytes);
-    }
     if (is_oop) {
       __ jmp(L_exit);
     } else {
       restore_arg_regs_using_thread();
       inc_counter_np(SharedRuntime::_jlong_array_copy_ctr); // Update counter after rscratch1 is free
       __ xorptr(rax, rax); // return 0
       __ vzeroupper();
       __ leave(); // required for proper stackwalking of RuntimeStub frame
       __ ret(0);
     }
-    {
-      // UnsafeCopyMemory page error: continue after ucm
-      UnsafeCopyMemoryMark ucmm(this, !is_oop && !aligned, true);
 
-      // Copy in multi-bytes chunks
-      copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
-    }
+    // Copy in multi-bytes chunks
+    copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);
+
     __ BIND(L_exit);
     bs->arraycopy_epilogue(_masm, decorators, type, from, to, qword_count);
     restore_arg_regs_using_thread();
     if (is_oop) {
       inc_counter_np(SharedRuntime::_oop_array_copy_ctr); // Update counter after rscratch1 is free

@@ -2907,49 +2856,10 @@
     __ ret(0);
 
     return start;
   }
 
-  address generate_data_cache_writeback() {
-    const Register src        = c_rarg0;  // source address
-
-    __ align(CodeEntryAlignment);
-
-    StubCodeMark mark(this, "StubRoutines", "_data_cache_writeback");
-
-    address start = __ pc();
-    __ enter();
-    __ cache_wb(Address(src, 0));
-    __ leave();
-    __ ret(0);
-
-    return start;
-  }
-
-  address generate_data_cache_writeback_sync() {
-    const Register is_pre    = c_rarg0;  // pre or post sync
-
-    __ align(CodeEntryAlignment);
-
-    StubCodeMark mark(this, "StubRoutines", "_data_cache_writeback_sync");
-
-    // pre wbsync is a no-op
-    // post wbsync translates to an sfence
-
-    Label skip;
-    address start = __ pc();
-    __ enter();
-    __ cmpl(is_pre, 0);
-    __ jcc(Assembler::notEqual, skip);
-    __ cache_wbsync(false);
-    __ bind(skip);
-    __ leave();
-    __ ret(0);
-
-    return start;
-  }
-
   void generate_arraycopy_stubs() {
     address entry;
     address entry_jbyte_arraycopy;
     address entry_jshort_arraycopy;
     address entry_jint_arraycopy;

@@ -3722,40 +3632,10 @@
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
     return start;
 }
 
-  address generate_electronicCodeBook_encryptAESCrypt() {
-    __ align(CodeEntryAlignment);
-    StubCodeMark mark(this, "StubRoutines", "electronicCodeBook_encryptAESCrypt");
-    address start = __ pc();
-    const Register from = c_rarg0;  // source array address
-    const Register to = c_rarg1;  // destination array address
-    const Register key = c_rarg2;  // key array address
-    const Register len = c_rarg3;  // src len (must be multiple of blocksize 16)
-    __ enter(); // required for proper stackwalking of RuntimeStub frame
-    __ aesecb_encrypt(from, to, key, len);
-    __ leave(); // required for proper stackwalking of RuntimeStub frame
-    __ ret(0);
-    return start;
- }
-
-  address generate_electronicCodeBook_decryptAESCrypt() {
-    __ align(CodeEntryAlignment);
-    StubCodeMark mark(this, "StubRoutines", "electronicCodeBook_decryptAESCrypt");
-    address start = __ pc();
-    const Register from = c_rarg0;  // source array address
-    const Register to = c_rarg1;  // destination array address
-    const Register key = c_rarg2;  // key array address
-    const Register len = c_rarg3;  // src len (must be multiple of blocksize 16)
-    __ enter(); // required for proper stackwalking of RuntimeStub frame
-    __ aesecb_decrypt(from, to, key, len);
-    __ leave(); // required for proper stackwalking of RuntimeStub frame
-    __ ret(0);
-    return start;
-  }
-
   address generate_upper_word_mask() {
     __ align(64);
     StubCodeMark mark(this, "StubRoutines", "upper_word_mask");
     address start = __ pc();
     __ emit_data64(0x0000000000000000, relocInfo::none);

@@ -6035,14 +5915,10 @@
     StubRoutines::x86::_vector_long_sign_mask = generate_vector_mask("vector_long_sign_mask", 0x8000000000000000);
 
     // support for verify_oop (must happen after universe_init)
     StubRoutines::_verify_oop_subroutine_entry = generate_verify_oop();
 
-    // data cache line writeback
-    StubRoutines::_data_cache_writeback = generate_data_cache_writeback();
-    StubRoutines::_data_cache_writeback_sync = generate_data_cache_writeback_sync();
-
     // arraycopy stubs used by compilers
     generate_arraycopy_stubs();
 
     // don't bother generating these AES intrinsic stubs unless global flag is set
     if (UseAESIntrinsics) {

@@ -6050,12 +5926,10 @@
       StubRoutines::_aescrypt_encryptBlock = generate_aescrypt_encryptBlock();
       StubRoutines::_aescrypt_decryptBlock = generate_aescrypt_decryptBlock();
       StubRoutines::_cipherBlockChaining_encryptAESCrypt = generate_cipherBlockChaining_encryptAESCrypt();
       if (VM_Version::supports_vaes() &&  VM_Version::supports_avx512vl() && VM_Version::supports_avx512dq() ) {
         StubRoutines::_cipherBlockChaining_decryptAESCrypt = generate_cipherBlockChaining_decryptVectorAESCrypt();
-        StubRoutines::_electronicCodeBook_encryptAESCrypt = generate_electronicCodeBook_encryptAESCrypt();
-        StubRoutines::_electronicCodeBook_decryptAESCrypt = generate_electronicCodeBook_decryptAESCrypt();
       } else {
         StubRoutines::_cipherBlockChaining_decryptAESCrypt = generate_cipherBlockChaining_decryptAESCrypt_Parallel();
       }
     }
     if (UseAESCTRIntrinsics){

@@ -6160,12 +6034,8 @@
       generate_initial();
     }
   }
 }; // end class declaration
 
-#define UCM_TABLE_MAX_ENTRIES 16
 void StubGenerator_generate(CodeBuffer* code, bool all) {
-  if (UnsafeCopyMemory::_table == NULL) {
-    UnsafeCopyMemory::create_table(UCM_TABLE_MAX_ENTRIES);
-  }
   StubGenerator g(code, all);
 }
< prev index next >