summaryrefslogtreecommitdiff
path: root/src/hwfeatures.c
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2011-02-17 11:00:25 +0100
committerWerner Koch <wk@gnupg.org>2011-02-17 11:00:25 +0100
commitc873f36d73712466fa37d0ff5efc39553ef41f3d (patch)
treed8d7cd5fb137b81833f6c1ce5557efa8bcda7b6e /src/hwfeatures.c
parent364799200d1fa8bfa159b6941cb74156bbfa7ec1 (diff)
downloadlibgcrypt-c873f36d73712466fa37d0ff5efc39553ef41f3d.tar.gz
Fix AES-NI detection.
Really a kind of bown paper bag bug: Use AND and not SUB for bit testing. I should have known that, given that 30 years ago I wrote almost everything in asm.
Diffstat (limited to 'src/hwfeatures.c')
-rw-r--r--src/hwfeatures.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hwfeatures.c b/src/hwfeatures.c
index 2b3bb2cb..c3567989 100644
--- a/src/hwfeatures.c
+++ b/src/hwfeatures.c
@@ -149,7 +149,7 @@ detect_ia32_gnuc (void)
"movl $1, %%eax\n\t" /* Get CPU info and feature flags. */
"cpuid\n"
"popl %%ebx\n\t" /* Restore GOT register. */
- "cmpl $0x02000000, %%ecx\n\t" /* Test bit 25. */
+ "testl $0x02000000, %%ecx\n\t" /* Test bit 25. */
"jz .Lno_aes%=\n\t" /* No AES support. */
"orl $256, %0\n" /* Set our HWF_INTEL_AES bit. */