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
This commit is contained in:
bmeurer@chromium.org 2013-07-25 09:49:28 +00:00
parent 5dd517ff3b
commit 69fe1ff281
7 changed files with 18 additions and 47 deletions

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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));

View File

@ -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;

View File

@ -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));