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

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: Merge with master 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
Index: base/cpu.cc
diff --git a/base/cpu.cc b/base/cpu.cc
index dec98bd7a1e82b5e8162a163200de415a513dfde..f04b2b023217150183db0fd662b9597330e28808 100644
--- a/base/cpu.cc
+++ b/base/cpu.cc
@@ -35,6 +35,7 @@ CPU::CPU()
has_ssse3_(false),
has_sse41_(false),
has_sse42_(false),
+ has_aesni_(false),
has_avx_(false),
has_avx_hardware_(false),
has_non_stop_time_stamp_counter_(false),
@@ -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') | net/socket/nss_ssl_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698