Index: src/base/cpu.cc |
diff --git a/src/base/cpu.cc b/src/base/cpu.cc |
index 5bc8b13a97ba2fb9ca2094e32b43d288cf3b0157..db733e4dbdf94cbc34c503fff6ce9660f7bb076a 100644 |
--- a/src/base/cpu.cc |
+++ b/src/base/cpu.cc |
@@ -291,32 +291,35 @@ static bool HasListItem(const char* list, const char* item) { |
#endif // V8_HOST_ARCH_IA32 || V8_HOST_ARCH_X64 |
-CPU::CPU() : stepping_(0), |
- model_(0), |
- ext_model_(0), |
- family_(0), |
- ext_family_(0), |
- type_(0), |
- implementer_(0), |
- architecture_(0), |
- part_(0), |
- has_fpu_(false), |
- has_cmov_(false), |
- has_sahf_(false), |
- has_mmx_(false), |
- has_sse_(false), |
- has_sse2_(false), |
- has_sse3_(false), |
- has_ssse3_(false), |
- has_sse41_(false), |
- has_sse42_(false), |
- has_idiva_(false), |
- has_neon_(false), |
- has_thumb2_(false), |
- has_vfp_(false), |
- has_vfp3_(false), |
- has_vfp3_d32_(false), |
- is_fp64_mode_(false) { |
+CPU::CPU() |
+ : stepping_(0), |
+ model_(0), |
+ ext_model_(0), |
+ family_(0), |
+ ext_family_(0), |
+ type_(0), |
+ implementer_(0), |
+ architecture_(0), |
+ part_(0), |
+ has_fpu_(false), |
+ has_cmov_(false), |
+ has_sahf_(false), |
+ has_mmx_(false), |
+ has_sse_(false), |
+ has_sse2_(false), |
+ has_sse3_(false), |
+ has_ssse3_(false), |
+ has_sse41_(false), |
+ has_sse42_(false), |
+ has_avx_(false), |
+ has_fma3_(false), |
+ has_idiva_(false), |
+ has_neon_(false), |
+ has_thumb2_(false), |
+ has_vfp_(false), |
+ has_vfp3_(false), |
+ has_vfp3_d32_(false), |
+ is_fp64_mode_(false) { |
memcpy(vendor_, "Unknown", 8); |
#if V8_OS_NACL |
// Portable host shouldn't do feature detection. |
@@ -356,6 +359,8 @@ CPU::CPU() : stepping_(0), |
has_ssse3_ = (cpu_info[2] & 0x00000200) != 0; |
has_sse41_ = (cpu_info[2] & 0x00080000) != 0; |
has_sse42_ = (cpu_info[2] & 0x00100000) != 0; |
+ has_avx_ = (cpu_info[2] & 0x18000000) != 0; |
+ if (has_avx_) has_fma3_ = (cpu_info[2] & 0x00001000) != 0; |
} |
#if V8_HOST_ARCH_IA32 |