Revision: 15876
Author: [email protected]
Date: Thu Jul 25 02:49:28 2013
Log: Don't duplicate OS::ActivationFrameAlignment() for every POSIX
platform.
[email protected]
Review URL: https://codereview.chromium.org/20283002
http://code.google.com/p/v8/source/detail?r=15876
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 02:16:39 2013
+++ /branches/bleeding_edge/src/platform-cygwin.cc Thu Jul 25 02:49:28 2013
@@ -55,13 +55,6 @@
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));
=======================================
--- /branches/bleeding_edge/src/platform-freebsd.cc Thu Jul 25 02:16:39 2013
+++ /branches/bleeding_edge/src/platform-freebsd.cc Thu Jul 25 02:49:28 2013
@@ -66,12 +66,6 @@
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));
=======================================
--- /branches/bleeding_edge/src/platform-linux.cc Thu Jul 25 02:16:39 2013
+++ /branches/bleeding_edge/src/platform-linux.cc Thu Jul 25 02:49:28 2013
@@ -308,20 +308,6 @@
#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));
=======================================
--- /branches/bleeding_edge/src/platform-macos.cc Thu Jul 25 02:16:39 2013
+++ /branches/bleeding_edge/src/platform-macos.cc Thu Jul 25 02:49:28 2013
@@ -229,13 +229,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) {
=======================================
--- /branches/bleeding_edge/src/platform-openbsd.cc Thu Jul 25 02:28:21 2013
+++ /branches/bleeding_edge/src/platform-openbsd.cc Thu Jul 25 02:49:28 2013
@@ -64,13 +64,6 @@
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));
=======================================
--- /branches/bleeding_edge/src/platform-posix.cc Thu Jul 25 02:16:39 2013
+++ /branches/bleeding_edge/src/platform-posix.cc Thu Jul 25 02:49:28 2013
@@ -99,6 +99,24 @@
if (result != 0) return 0;
return limit.rlim_cur;
}
+
+
+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() {
=======================================
--- /branches/bleeding_edge/src/platform-solaris.cc Thu Jul 25 02:16:39 2013
+++ /branches/bleeding_edge/src/platform-solaris.cc Thu Jul 25 02:49:28 2013
@@ -84,12 +84,6 @@
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));
--
--
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.