< prev index next >

src/cpu/x86/vm/stubGenerator_x86_64.cpp

Print this page

        

@@ -400,10 +400,11 @@
 
     // restore rsp
     __ addptr(rsp, -rsp_after_call_off * wordSize);
 
     // return
+    __ vzeroupper();
     __ pop(rbp);
     __ ret(0);
 
     // handle return types different from T_INT
     __ BIND(is_long);

@@ -1552,10 +1553,11 @@
 
   __ BIND(L_exit);
     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);
 
     // Copy in multi-bytes chunks
     copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);

@@ -1641,19 +1643,21 @@
     __ 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);
 
     // 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
     __ ret(0);
 
     return start;
   }

@@ -1744,10 +1748,11 @@
 
   __ BIND(L_exit);
     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);
 
     // Copy in multi-bytes chunks
     copy_bytes_forward(end_from, end_to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);

@@ -1769,10 +1774,11 @@
 
     __ enter(); // required for proper stackwalking of RuntimeStub frame
 
     __ generate_fill(t, aligned, to, value, count, rax, xmm0);
 
+    __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
     return start;
   }
 

@@ -1845,19 +1851,21 @@
     __ 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);
 
     // 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
     __ ret(0);
 
     return start;
   }

@@ -1943,10 +1951,11 @@
     if (is_oop) {
       gen_write_ref_array_post_barrier(saved_to, dword_count, rax);
     }
     restore_arg_regs();
     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);
 
     // Copy in multi-bytes chunks

@@ -2028,10 +2037,11 @@
       __ jmp(L_exit);
     }
     restore_arg_regs();
     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);
 
     // Copy in multi-bytes chunks
     copy_bytes_backward(from, to, qword_count, rax, L_copy_bytes, L_copy_8_bytes);

@@ -2041,10 +2051,11 @@
       gen_write_ref_array_post_barrier(to, dword_count, rax);
     }
     restore_arg_regs();
     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);
 
     return start;
   }

@@ -2118,10 +2129,11 @@
       __ jmp(L_exit);
     } else {
       restore_arg_regs();
       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);
     }
 
     // Copy in multi-bytes chunks

@@ -2135,10 +2147,11 @@
     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
     }
+    __ vzeroupper();
     __ xorptr(rax, rax); // return 0
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
     return start;

@@ -2201,10 +2214,11 @@
       __ jmp(L_exit);
     } else {
       restore_arg_regs();
       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);
     }
 
     // Copy in multi-bytes chunks

@@ -2218,10 +2232,11 @@
     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
     }
+    __ vzeroupper();
     __ xorptr(rax, rax); // return 0
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
     return start;

@@ -3772,11 +3787,11 @@
     } else if (VM_Version::supports_avx2()) {
       __ sha256_AVX2(msg, state0, state1, msgtmp0, msgtmp1, msgtmp2, msgtmp3, msgtmp4,
         buf, state, ofs, limit, rsp, multi_block, shuf_mask);
     }
     __ addptr(rsp, 4 * wordSize);
-
+    __ vzeroupper();
     __ leave();
     __ ret(0);
     return start;
   }
 

@@ -3806,10 +3821,11 @@
     __ enter();
 
     __ sha512_AVX2(msg, state0, state1, msgtmp0, msgtmp1, msgtmp2, msgtmp3, msgtmp4,
     buf, state, ofs, limit, rsp, multi_block, shuf_mask);
 
+    __ vzeroupper();
     __ leave();
     __ ret(0);
     return start;
   }
 

@@ -4279,11 +4295,10 @@
     __ jmp(L_ghash_loop);
 
     __ BIND(L_exit);
     __ pshufb(xmm_temp6, xmm_temp10);          // Byte swap 16-byte result
     __ movdqu(Address(state, 0), xmm_temp6);   // store the result
-
     __ leave();
     __ ret(0);
     return start;
   }
 

@@ -4319,10 +4334,11 @@
     __ enter(); // required for proper stackwalking of RuntimeStub frame
 
     __ kernel_crc32(crc, buf, len, table, tmp);
 
     __ movl(rax, crc);
+    __ vzeroupper();
     __ leave(); // required for proper stackwalking of RuntimeStub frame
     __ ret(0);
 
     return start;
   }

@@ -4378,10 +4394,11 @@
       __ movl(rax, crc);
 #ifdef _WIN64
       __ pop(z);
       __ pop(y);
 #endif
+      __ vzeroupper();
       __ leave(); // required for proper stackwalking of RuntimeStub frame
       __ ret(0);
 
       return start;
   }

@@ -4492,10 +4509,11 @@
     const XMMRegister vec1 = xmm1;
     const XMMRegister vec2 = xmm2;
 
     __ vectorized_mismatch(obja, objb, length, scale, result, tmp1, tmp2, vec0, vec1, vec2);
 
+    __ vzeroupper();
     __ leave();
     __ ret(0);
 
     return start;
   }
< prev index next >