Index: base/cpu.h |
diff --git a/base/cpu.h b/base/cpu.h |
index 509763e170f4c666089f65db1b5b81097de452a9..aec24d2f89c3eb435cc5f2f800f04f0f69330bad 100644 |
--- a/base/cpu.h |
+++ b/base/cpu.h |
@@ -46,6 +46,12 @@ class BASE_EXPORT CPU { |
bool has_sse41() const { return has_sse41_; } |
bool has_sse42() const { return has_sse42_; } |
bool has_avx() const { return has_avx_; } |
+ // has_avx_hardware returns true when AVX is present in the CPU. This might |
+ // differ from the value of |has_avx()| because |has_avx()| also tests for |
+ // operating system support needed to actually call AVX instuctions. |
+ // Note: you should never need to call this function. It was added in order |
+ // to workaround a bug in NSS but |has_avx()| is what you want. |
+ bool has_avx_hardware() const { return has_avx_hardware_; } |
bool has_non_stop_time_stamp_counter() const { |
return has_non_stop_time_stamp_counter_; |
} |
@@ -71,6 +77,7 @@ class BASE_EXPORT CPU { |
bool has_sse41_; |
bool has_sse42_; |
bool has_avx_; |
+ bool has_avx_hardware_; |
bool has_non_stop_time_stamp_counter_; |
std::string cpu_vendor_; |
std::string cpu_brand_; |