Don't duplicate OS::CpuFeaturesImpliedByPlatform for every POSIX platform.
authorbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Jul 2013 09:16:39 +0000 (09:16 +0000)
committerbmeurer@chromium.org <bmeurer@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Thu, 25 Jul 2013 09:16:39 +0000 (09:16 +0000)
R=svenpanne@chromium.org

Review URL: https://codereview.chromium.org/20179004

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15873 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

src/platform-cygwin.cc
src/platform-freebsd.cc
src/platform-linux.cc
src/platform-macos.cc
src/platform-openbsd.cc
src/platform-posix.cc
src/platform-solaris.cc

index 6be908e22454fc1f8551e253d91ca17ba8142479..59cc1a2d50e3c3e73c8132ed25c0e4635692a0ed 100644 (file)
@@ -55,11 +55,6 @@ namespace internal {
 static Mutex* limit_mutex = NULL;
 
 
-uint64_t OS::CpuFeaturesImpliedByPlatform() {
-  return 0;  // Nothing special about Cygwin.
-}
-
-
 int OS::ActivationFrameAlignment() {
   // With gcc 4.4 the tree vectorization optimizer can generate code
   // that requires 16 byte alignment such as movdqa on x86.
index e403d6d1a03ed68e249a5638cc9dbd9ccb7f5ef5..0bf23757475d31e1737499bf2c1abc6f695d4377 100644 (file)
@@ -66,11 +66,6 @@ namespace internal {
 static Mutex* limit_mutex = NULL;
 
 
-uint64_t OS::CpuFeaturesImpliedByPlatform() {
-  return 0;  // FreeBSD runs on anything.
-}
-
-
 int OS::ActivationFrameAlignment() {
   // 16 byte alignment on FreeBSD
   return 16;
index febd668f319396fdc25066eb047584fb70ad1c27..fb784d1f53d42c61cbaabd10e162b449ade5ec6e 100644 (file)
@@ -79,11 +79,6 @@ namespace internal {
 static Mutex* limit_mutex = NULL;
 
 
-uint64_t OS::CpuFeaturesImpliedByPlatform() {
-  return 0;  // Linux runs on anything.
-}
-
-
 #ifdef __arm__
 static bool CPUInfoContainsString(const char * search_string) {
   const char* file_name = "/proc/cpuinfo";
index 8ec4c510403899ee7ac39ad4cf3e7435f59ba074..10aef80d9caa7317323e4b379acdc5fe68f7ca93 100644 (file)
@@ -231,14 +231,6 @@ void OS::SignalCodeMovingGC() {
 }
 
 
-uint64_t OS::CpuFeaturesImpliedByPlatform() {
-  // MacOSX 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);
-}
-
-
 int OS::ActivationFrameAlignment() {
   // OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI
   // Function Call Guide".
index a94bfe8aa46b6a3cd117da6c5c5f8696ed5b5b56..57b6d69d73fc3d4e3b58ef5f9d9a406d499ee0a5 100644 (file)
@@ -91,11 +91,6 @@ static void* GetRandomMmapAddr() {
 }
 
 
-uint64_t OS::CpuFeaturesImpliedByPlatform() {
-  return 0;
-}
-
-
 int OS::ActivationFrameAlignment() {
   // With gcc 4.4 the tree vectorization optimizer can generate code
   // that requires 16 byte alignment such as movdqa on x86.
index 9bc3193631aab80a0b71e799259c2c35b1d19e65..cd2b9b9da4e3a34bd0cb80b5141b1258c1327ad8 100644 (file)
@@ -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.
 
index cb9ba18f97289044f5ea5d15fa531b9735e01e93..46fff60e191466e72d0cb6e899556841ef58bf01 100644 (file)
@@ -84,11 +84,6 @@ namespace internal {
 static Mutex* limit_mutex = NULL;
 
 
-uint64_t OS::CpuFeaturesImpliedByPlatform() {
-  return 0;  // Solaris runs on a lot of things.
-}
-
-
 int OS::ActivationFrameAlignment() {
   // GCC generates code that requires 16 byte alignment such as movdqa.
   return Max(STACK_ALIGN, 16);