| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/cpu.h" | 5 #include "base/cpu.h" |
| 6 | 6 |
| 7 #include <string.h> |
| 8 |
| 9 #include "build/build_config.h" |
| 10 |
| 7 #if defined(ARCH_CPU_X86_FAMILY) | 11 #if defined(ARCH_CPU_X86_FAMILY) |
| 8 #if defined(_MSC_VER) | 12 #if defined(_MSC_VER) |
| 9 #include <intrin.h> | 13 #include <intrin.h> |
| 10 #endif | 14 #endif |
| 11 #endif | 15 #endif |
| 12 | 16 |
| 13 #include <string.h> | |
| 14 | |
| 15 namespace base { | 17 namespace base { |
| 16 | 18 |
| 17 CPU::CPU() | 19 CPU::CPU() |
| 18 : type_(0), | 20 : type_(0), |
| 19 family_(0), | 21 family_(0), |
| 20 model_(0), | 22 model_(0), |
| 21 stepping_(0), | 23 stepping_(0), |
| 22 ext_model_(0), | 24 ext_model_(0), |
| 23 ext_family_(0), | 25 ext_family_(0), |
| 24 has_mmx_(false), | 26 has_mmx_(false), |
| (...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 has_sse2_ = (cpu_info[3] & 0x04000000) != 0; | 116 has_sse2_ = (cpu_info[3] & 0x04000000) != 0; |
| 115 has_sse3_ = (cpu_info[2] & 0x00000001) != 0; | 117 has_sse3_ = (cpu_info[2] & 0x00000001) != 0; |
| 116 has_ssse3_ = (cpu_info[2] & 0x00000200) != 0; | 118 has_ssse3_ = (cpu_info[2] & 0x00000200) != 0; |
| 117 has_sse41_ = (cpu_info[2] & 0x00080000) != 0; | 119 has_sse41_ = (cpu_info[2] & 0x00080000) != 0; |
| 118 has_sse42_ = (cpu_info[2] & 0x00100000) != 0; | 120 has_sse42_ = (cpu_info[2] & 0x00100000) != 0; |
| 119 } | 121 } |
| 120 #endif | 122 #endif |
| 121 } | 123 } |
| 122 | 124 |
| 123 } // namespace base | 125 } // namespace base |
| OLD | NEW |