Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(321)

Unified Diff: base/cpu.cc

Issue 75663004: net: boost AES-GCM ciphers if the machine has AES-NI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: codereview is broken. Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/cpu.h ('k') | net/socket/nss_ssl_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/cpu.cc
diff --git a/base/cpu.cc b/base/cpu.cc
index dec98bd7a1e82b5e8162a163200de415a513dfde..3f704e3c41de6d83348af609a0aec487da2dc928 100644
--- a/base/cpu.cc
+++ b/base/cpu.cc
@@ -38,6 +38,7 @@ CPU::CPU()
has_avx_(false),
has_avx_hardware_(false),
has_non_stop_time_stamp_counter_(false),
+ has_aesni_(false),
cpu_vendor_("unknown") {
Initialize();
}
@@ -120,6 +121,7 @@ void CPU::Initialize() {
has_ssse3_ = (cpu_info[2] & 0x00000200) != 0;
has_sse41_ = (cpu_info[2] & 0x00080000) != 0;
has_sse42_ = (cpu_info[2] & 0x00100000) != 0;
+ has_aesni_ = (cpu_info[2] & 0x02000000) != 0;
has_avx_hardware_ =
(cpu_info[2] & 0x10000000) != 0;
// AVX instructions will generate an illegal instruction exception unless
« no previous file with comments | « base/cpu.h ('k') | net/socket/nss_ssl_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698