OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "base/logging.h" | 6 #include "base/logging.h" |
7 #include "base/strings/string_util.h" | 7 #include "base/strings/string_util.h" |
| 8 #include "build/build_config.h" |
8 #if defined(OS_WIN) | 9 #if defined(OS_WIN) |
9 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
10 #endif | 11 #endif |
11 | 12 |
12 namespace nacl { | 13 namespace nacl { |
13 | 14 |
14 const char* GetSandboxArch() { | 15 const char* GetSandboxArch() { |
15 #if defined(ARCH_CPU_ARM_FAMILY) | 16 #if defined(ARCH_CPU_ARM_FAMILY) |
16 return "arm"; | 17 return "arm"; |
17 #elif defined(ARCH_CPU_MIPS_FAMILY) | 18 #elif defined(ARCH_CPU_MIPS_FAMILY) |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
72 // TODO: SSE 4A, SSE 4. | 73 // TODO: SSE 4A, SSE 4. |
73 else if (cpu.has_ssse3()) features.push_back("+ssse3"); | 74 else if (cpu.has_ssse3()) features.push_back("+ssse3"); |
74 // TODO: SSE 3 | 75 // TODO: SSE 3 |
75 else if (cpu.has_sse2()) features.push_back("+sse2"); | 76 else if (cpu.has_sse2()) features.push_back("+sse2"); |
76 | 77 |
77 // TODO: AES, POPCNT, LZCNT, ... | 78 // TODO: AES, POPCNT, LZCNT, ... |
78 return base::JoinString(features, ","); | 79 return base::JoinString(features, ","); |
79 } | 80 } |
80 | 81 |
81 } // namespace nacl | 82 } // namespace nacl |
OLD | NEW |