Commit 401af139 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Don't duplicate OS::CpuFeaturesImpliedByPlatform for every POSIX platform.

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
parent e1b36b3b
......@@ -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.
......
......@@ -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;
......
......@@ -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";
......
......@@ -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".
......
......@@ -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.
......
......@@ -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.
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment