[PATCH] sha1-avx: use vmovdqa instead of movdqa
Jussi Kivilinna
jussi.kivilinna at iki.fi
Tue Mar 19 21:09:55 CET 2019
* cipher/sha1-avx-amd64.S: Replace 'movdqa' with 'vmovdqa'.
* cipher/sha1-avx-bmi2-amd64.S: Replace 'movdqa' with 'vmovdqa'.
--
Replace SSE instruction 'movdqa' with AVX instruction 'vmovdqa' as
mixing SSE and AVX instructions can lead to bad performance.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
0 files changed
diff --git a/cipher/sha1-avx-amd64.S b/cipher/sha1-avx-amd64.S
index b14603bf6..5f5b9c0e4 100644
--- a/cipher/sha1-avx-amd64.S
+++ b/cipher/sha1-avx-amd64.S
@@ -248,7 +248,7 @@ _gcry_sha1_transform_amd64_avx:
movl state_h3(RSTATE), d;
movl state_h4(RSTATE), e;
- movdqa .Lbswap_shufb_ctl RIP, BSWAP_REG;
+ vmovdqa .Lbswap_shufb_ctl RIP, BSWAP_REG;
/* Precalc 0-15. */
W_PRECALC_00_15_0(0, W0, Wtmp0);
diff --git a/cipher/sha1-avx-bmi2-amd64.S b/cipher/sha1-avx-bmi2-amd64.S
index b267693f4..8292c3afb 100644
--- a/cipher/sha1-avx-bmi2-amd64.S
+++ b/cipher/sha1-avx-bmi2-amd64.S
@@ -246,7 +246,7 @@ _gcry_sha1_transform_amd64_avx_bmi2:
movl state_h3(RSTATE), d;
movl state_h4(RSTATE), e;
- movdqa .Lbswap_shufb_ctl RIP, BSWAP_REG;
+ vmovdqa .Lbswap_shufb_ctl RIP, BSWAP_REG;
/* Precalc 0-15. */
W_PRECALC_00_15_0(0, W0, Wtmp0);
More information about the Gcrypt-devel
mailing list