Skip to content
This repository has been archived by the owner on Sep 19, 2023. It is now read-only.
/ jdk18 Public archive

Commit

Permalink
8279045: Intrinsics missing vzeroupper instruction
Browse files Browse the repository at this point in the history
Reviewed-by: neliasso, sviswanathan, kvn
  • Loading branch information
Smita Kamath authored and Sandhya Viswanathan committed Dec 21, 2021
1 parent 84d3333 commit 9ee3ccf
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/hotspot/cpu/x86/stubGenerator_x86_64.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4138,6 +4138,7 @@ class StubGenerator: public StubCodeGenerator {
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);
__ vzeroupper();
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);
return start;
Expand All @@ -4153,6 +4154,7 @@ class StubGenerator: public StubCodeGenerator {
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);
__ vzeroupper();
__ leave(); // required for proper stackwalking of RuntimeStub frame
__ ret(0);
return start;
Expand Down Expand Up @@ -4452,6 +4454,7 @@ class StubGenerator: public StubCodeGenerator {
__ movptr(avx512_subkeyHtbl, rsp);

__ aesgcm_encrypt(in, len, ct, out, key, state, subkeyHtbl, avx512_subkeyHtbl, counter);
__ vzeroupper();

__ movq(rsp, rbp);
__ pop(rbp);
Expand Down Expand Up @@ -4571,6 +4574,7 @@ class StubGenerator: public StubCodeGenerator {
#endif
__ push(rbx);
__ aesctr_encrypt(from, to, key, counter, len_reg, used, used_addr, saved_encCounter_start);
__ vzeroupper();
// Restore state before leaving routine
__ pop(rbx);
#ifdef _WIN64
Expand Down Expand Up @@ -5191,6 +5195,7 @@ address generate_cipherBlockChaining_decryptVectorAESCrypt() {
__ evpxorq(RK14, RK14, RK14, Assembler::AVX_512bit);

__ BIND(Lcbc_exit);
__ vzeroupper();
__ pop(rbx);
#ifdef _WIN64
__ movl(rax, len_mem);
Expand Down Expand Up @@ -7066,6 +7071,7 @@ address generate_avx_ghash_processBlocks() {
__ shrdl(tmp4, tmp3);
__ movl(Address(newArr, nIdx, Address::times_4), tmp4);
__ BIND(Exit);
__ vzeroupper();
// Restore callee save registers.
__ pop(tmp5);
#ifdef _WINDOWS
Expand Down Expand Up @@ -7187,6 +7193,7 @@ address generate_avx_ghash_processBlocks() {
__ movl(Address(newArr, idx, Address::times_4), tmp3);

__ BIND(Exit);
__ vzeroupper();
// Restore callee save registers.
__ pop(tmp5);
#ifdef _WINDOWS
Expand Down

1 comment on commit 9ee3ccf

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.