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

Unified Diff: src/platform-posix.cc

Issue 20179004: Don't duplicate OS::CpuFeaturesImpliedByPlatform for every POSIX platform. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 months 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/platform-openbsd.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index 9bc3193631aab80a0b71e799259c2c35b1d19e65..cd2b9b9da4e3a34bd0cb80b5141b1258c1327ad8 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -78,6 +78,18 @@ namespace internal {
static const pthread_t kNoThread = (pthread_t) 0;
+uint64_t OS::CpuFeaturesImpliedByPlatform() {
+#if defined(__APPLE__)
+ // Mac OS X requires all these to install so we can assume they are present.
+ // These constants are defined by the CPUid instructions.
+ const uint64_t one = 1;
+ return (one << SSE2) | (one << CMOV) | (one << RDTSC) | (one << CPUID);
+#else
+ return 0; // Nothing special about the other systems.
+#endif
+}
+
+
// Maximum size of the virtual memory. 0 means there is no artificial
// limit.
« no previous file with comments | « src/platform-openbsd.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698