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

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: 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..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),
wtc 2013/11/27 18:01:51 Nit: move this member initializer up.
agl 2013/11/27 20:50:57 Done.
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;
wtc 2013/11/27 18:01:51 Nit: this should ideally be set after the has_avx_
agl 2013/11/27 20:50:57 Done.
has_avx_hardware_ =
(cpu_info[2] & 0x10000000) != 0;
// AVX instructions will generate an illegal instruction exception unless

Powered by Google App Engine
This is Rietveld 408576698