Revision: 15873
Author: [email protected]
Date: Thu Jul 25 02:16:39 2013
Log: Don't duplicate OS::CpuFeaturesImpliedByPlatform for every POSIX
platform.
[email protected]
Review URL: https://codereview.chromium.org/20179004
http://code.google.com/p/v8/source/detail?r=15873
Modified:
/branches/bleeding_edge/src/platform-cygwin.cc
/branches/bleeding_edge/src/platform-freebsd.cc
/branches/bleeding_edge/src/platform-linux.cc
/branches/bleeding_edge/src/platform-macos.cc
/branches/bleeding_edge/src/platform-openbsd.cc
/branches/bleeding_edge/src/platform-posix.cc
/branches/bleeding_edge/src/platform-solaris.cc
=======================================
--- /branches/bleeding_edge/src/platform-cygwin.cc Thu Jul 25 01:49:52 2013
+++ /branches/bleeding_edge/src/platform-cygwin.cc Thu Jul 25 02:16:39 2013
@@ -55,11 +55,6 @@
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.
=======================================
--- /branches/bleeding_edge/src/platform-freebsd.cc Thu Jul 25 01:49:52 2013
+++ /branches/bleeding_edge/src/platform-freebsd.cc Thu Jul 25 02:16:39 2013
@@ -66,11 +66,6 @@
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;
=======================================
--- /branches/bleeding_edge/src/platform-linux.cc Thu Jul 25 01:49:52 2013
+++ /branches/bleeding_edge/src/platform-linux.cc Thu Jul 25 02:16:39 2013
@@ -79,11 +79,6 @@
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";
=======================================
--- /branches/bleeding_edge/src/platform-macos.cc Thu Jul 25 01:49:52 2013
+++ /branches/bleeding_edge/src/platform-macos.cc Thu Jul 25 02:16:39 2013
@@ -229,14 +229,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() {
=======================================
--- /branches/bleeding_edge/src/platform-openbsd.cc Thu Jul 25 01:49:52 2013
+++ /branches/bleeding_edge/src/platform-openbsd.cc Thu Jul 25 02:16:39 2013
@@ -89,11 +89,6 @@
}
return NULL;
}
-
-
-uint64_t OS::CpuFeaturesImpliedByPlatform() {
- return 0;
-}
int OS::ActivationFrameAlignment() {
=======================================
--- /branches/bleeding_edge/src/platform-posix.cc Thu Jul 25 01:49:52 2013
+++ /branches/bleeding_edge/src/platform-posix.cc Thu Jul 25 02:16:39 2013
@@ -78,6 +78,18 @@
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.
=======================================
--- /branches/bleeding_edge/src/platform-solaris.cc Thu Jul 25 01:49:52 2013
+++ /branches/bleeding_edge/src/platform-solaris.cc Thu Jul 25 02:16:39 2013
@@ -84,11 +84,6 @@
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);
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.