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

Unified Diff: base/cpu.cc

Issue 91913002: net: boost AES-GCM ciphers if the machine has AES-NI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add new symbol to .def 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..66207a1e0b8b0539b99a72b85435936f847803bb 100644
--- a/base/cpu.cc
+++ b/base/cpu.cc
@@ -37,6 +37,7 @@ CPU::CPU()
has_sse42_(false),
has_avx_(false),
has_avx_hardware_(false),
+ has_aesni_(false),
has_non_stop_time_stamp_counter_(false),
cpu_vendor_("unknown") {
Initialize();
@@ -131,6 +132,7 @@ void CPU::Initialize() {
has_avx_hardware_ &&
(cpu_info[2] & 0x08000000) != 0 /* OSXSAVE */ &&
(_xgetbv(0) & 6) == 6 /* XSAVE enabled by kernel */;
+ has_aesni_ = (cpu_info[2] & 0x02000000) != 0;
}
// Get the brand string of the cpu.
« no previous file with comments | « base/cpu.h ('k') | net/socket/nss_ssl_util.h » ('j') | net/socket/nss_ssl_util.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698