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

Side by Side Diff: components/nacl/renderer/platform_info.cc

Issue 2458333002: Add popcnt support for pnacl (Closed)
Patch Set: Add popcnt test for clang Created 4 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 unified diff | Download patch
« no previous file with comments | « base/cpu_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "build/build_config.h"
9 #if defined(OS_WIN) 9 #if defined(OS_WIN)
10 #include "base/win/windows_version.h" 10 #include "base/win/windows_version.h"
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 // effectively always implied by SSE4.2 but has to be specified 68 // effectively always implied by SSE4.2 but has to be specified
69 // separately. 69 // separately.
70 // 70 //
71 // TODO: AVX2, AVX, SSE 4.2. 71 // TODO: AVX2, AVX, SSE 4.2.
72 if (cpu.has_sse41()) features.push_back("+sse4.1"); 72 if (cpu.has_sse41()) features.push_back("+sse4.1");
73 // TODO: SSE 4A, SSE 4. 73 // TODO: SSE 4A, SSE 4.
74 else if (cpu.has_ssse3()) features.push_back("+ssse3"); 74 else if (cpu.has_ssse3()) features.push_back("+ssse3");
75 // TODO: SSE 3 75 // TODO: SSE 3
76 else if (cpu.has_sse2()) features.push_back("+sse2"); 76 else if (cpu.has_sse2()) features.push_back("+sse2");
77 77
78 // TODO: AES, POPCNT, LZCNT, ... 78 if (cpu.has_popcnt()) features.push_back("+popcnt");
79
80 // TODO: AES, LZCNT, ...
79 return base::JoinString(features, ","); 81 return base::JoinString(features, ",");
80 } 82 }
81 83
82 } // namespace nacl 84 } // namespace nacl
OLDNEW
« no previous file with comments | « base/cpu_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698