gnutls-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU gnutls branch, master, updated. gnutls_2_99_0-62-g7a62421


From: Nikos Mavrogiannopoulos
Subject: [SCM] GNU gnutls branch, master, updated. gnutls_2_99_0-62-g7a62421
Date: Sat, 16 Apr 2011 18:13:12 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU gnutls".

http://git.savannah.gnu.org/cgit/gnutls.git/commit/?id=7a62421e8e162e3f9f660ea08cc19284fb64cd20

The branch, master has been updated
       via  7a62421e8e162e3f9f660ea08cc19284fb64cd20 (commit)
      from  065927be43c1aef5771c0b18b28b8ef9ccdc6eae (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 7a62421e8e162e3f9f660ea08cc19284fb64cd20
Author: Nikos Mavrogiannopoulos <address@hidden>
Date:   Sat Apr 16 20:10:34 2011 +0200

    Try to detect AES-NI on Intel and AMD machines only.

-----------------------------------------------------------------------

Summary of changes:
 lib/accelerated/intel/aes-x86.c |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/lib/accelerated/intel/aes-x86.c b/lib/accelerated/intel/aes-x86.c
index f1a24aa..1015695 100644
--- a/lib/accelerated/intel/aes-x86.c
+++ b/lib/accelerated/intel/aes-x86.c
@@ -155,10 +155,33 @@ check_optimized_aes (void)
   return (c & 0x2000000);
 }
 
+static unsigned
+check_intel_or_amd (void)
+{
+  unsigned int a, b, c, d;
+  cpuid (0, a, b, c, d);
+
+  if ((memcmp(&b, "Genu", 4) == 0 &&
+               memcmp(&d, "ineI", 4) == 0 &&
+               memcmp(&c, "ntel", 4) == 0) ||
+     (memcmp(&b, "Auth", 4) == 0 &&
+               memcmp(&d, "enti", 4) == 0 &&
+               memcmp(&c, "cAMD", 4) == 0))
+    {
+      return 1;
+    }
+
+  return 0;
+}
+
 void
 register_x86_crypto (void)
 {
   int ret;
+
+  if (check_intel_or_amd() == 0)
+    return;
+
   if (check_optimized_aes ())
     {
       fprintf (stderr, "Intel AES accelerator was detected\n");


hooks/post-receive
-- 
GNU gnutls



reply via email to

[Prev in Thread] Current Thread [Next in Thread]