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

Unified Diff: src/base/cpu.cc

Issue 757503002: [x64] Introduce FMA3 instructions on scalar data elements. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: remove avx_os_support Created 6 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
« no previous file with comments | « src/base/cpu.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/base/cpu.h ('k') | src/flag-definitions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698