Commit 69fe1ff2 authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Don't duplicate OS::ActivationFrameAlignment() for every POSIX platform.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15876 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 5dd517ff
......@@ -55,13 +55,6 @@ namespace internal {
static Mutex* limit_mutex = NULL;
int OS::ActivationFrameAlignment() {
// With gcc 4.4 the tree vectorization optimizer can generate code
// that requires 16 byte alignment such as movdqa on x86.
return 16;
}
const char* OS::LocalTimezone(double time) {
if (std::isnan(time)) return "";
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
......
......@@ -66,12 +66,6 @@ namespace internal {
static Mutex* limit_mutex = NULL;
int OS::ActivationFrameAlignment() {
// 16 byte alignment on FreeBSD
return 16;
}
const char* OS::LocalTimezone(double time) {
if (std::isnan(time)) return "";
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
......
......@@ -308,20 +308,6 @@ bool OS::MipsCpuHasFeature(CpuFeature feature) {
#endif // def __mips__
int OS::ActivationFrameAlignment() {
#if V8_TARGET_ARCH_ARM
// On EABI ARM targets this is required for fp correctness in the
// runtime system.
return 8;
#elif V8_TARGET_ARCH_MIPS
return 8;
#endif
// With gcc 4.4 the tree vectorization optimizer can generate code
// that requires 16 byte alignment such as movdqa on x86.
return 16;
}
const char* OS::LocalTimezone(double time) {
if (std::isnan(time)) return "";
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
......
......@@ -231,13 +231,6 @@ void OS::SignalCodeMovingGC() {
}
int OS::ActivationFrameAlignment() {
// OS X activation frames must be 16 byte-aligned; see "Mac OS X ABI
// Function Call Guide".
return 16;
}
const char* OS::LocalTimezone(double time) {
if (std::isnan(time)) return "";
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
......
......@@ -64,13 +64,6 @@ namespace internal {
static Mutex* limit_mutex = NULL;
int OS::ActivationFrameAlignment() {
// With gcc 4.4 the tree vectorization optimizer can generate code
// that requires 16 byte alignment such as movdqa on x86.
return 16;
}
const char* OS::LocalTimezone(double time) {
if (std::isnan(time)) return "";
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
......
......@@ -101,6 +101,24 @@ intptr_t OS::MaxVirtualMemory() {
}
int OS::ActivationFrameAlignment() {
#if V8_TARGET_ARCH_ARM
// On EABI ARM targets this is required for fp correctness in the
// runtime system.
return 8;
#elif V8_TARGET_ARCH_MIPS
return 8;
#else
// Otherwise we just assume 16 byte alignment, i.e.:
// - With gcc 4.4 the tree vectorization optimizer can generate code
// that requires 16 byte alignment such as movdqa on x86.
// - Mac OS X and Solaris (64-bit) activation frames must be 16 byte-aligned;
// see "Mac OS X ABI Function Call Guide"
return 16;
#endif
}
intptr_t OS::CommitPageSize() {
static intptr_t page_size = getpagesize();
return page_size;
......
......@@ -84,12 +84,6 @@ namespace internal {
static Mutex* limit_mutex = NULL;
int OS::ActivationFrameAlignment() {
// GCC generates code that requires 16 byte alignment such as movdqa.
return Max(STACK_ALIGN, 16);
}
const char* OS::LocalTimezone(double time) {
if (std::isnan(time)) return "";
time_t tv = static_cast<time_t>(floor(time/msPerSecond));
......
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