diff options
author | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-04-22 20:29:05 +0300 |
---|---|---|
committer | Jussi Kivilinna <jussi.kivilinna@iki.fi> | 2015-04-26 13:43:24 +0300 |
commit | f88266c0f868d7bf51a215d5531bb9f2b4dad19e (patch) | |
tree | 42e916141425016d6887a6992e09d18269f35aa4 /cipher/rijndael-ssse3-amd64.c | |
parent | 305cc878d395475c46b4ef52f4764bd0c85bf8ac (diff) | |
download | libgcrypt-f88266c0f868d7bf51a215d5531bb9f2b4dad19e.tar.gz |
Disallow compiler from generating SSE instructions in mixed C+asm source
* cipher/cipher-gcm-intel-pclmul.c [gcc-version >= 4.4]: Add GCC target
pragma to disable compiler use of SSE.
* cipher/rijndael-aesni.c [gcc-version >= 4.4]: Ditto.
* cipher/rijndael-ssse3-amd64.c [gcc-version >= 4.4]: Ditto.
--
These implementations assume that compiler does not use XMM registers
between assembly blocks.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher/rijndael-ssse3-amd64.c')
-rw-r--r-- | cipher/rijndael-ssse3-amd64.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cipher/rijndael-ssse3-amd64.c b/cipher/rijndael-ssse3-amd64.c index d72ec317..3f1b352c 100644 --- a/cipher/rijndael-ssse3-amd64.c +++ b/cipher/rijndael-ssse3-amd64.c @@ -50,6 +50,12 @@ #ifdef USE_SSSE3 +#if _GCRY_GCC_VERSION >= 40400 /* 4.4 */ +/* Prevent compiler from issuing SSE instructions between asm blocks. */ +# pragma GCC target("no-sse") +#endif + + /* Two macros to be called prior and after the use of SSSE3 instructions. There should be no external function calls between the use of these macros. There purpose is to make sure that the |