summaryrefslogtreecommitdiff
path: root/deps/v8/src/platform-linux.cc
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/platform-linux.cc')
-rw-r--r--deps/v8/src/platform-linux.cc19
1 files changed, 17 insertions, 2 deletions
diff --git a/deps/v8/src/platform-linux.cc b/deps/v8/src/platform-linux.cc
index c02eebc3b..79ffe8149 100644
--- a/deps/v8/src/platform-linux.cc
+++ b/deps/v8/src/platform-linux.cc
@@ -58,7 +58,8 @@
#include "platform.h"
-namespace v8 { namespace internal {
+namespace v8 {
+namespace internal {
// 0 is never a valid thread id on Linux since tids and pids share a
// name space and pid 0 is reserved (see man 2 kill).
@@ -87,8 +88,15 @@ double OS::nan_value() {
int OS::ActivationFrameAlignment() {
- // Floating point code runs faster if the stack is 8-byte aligned.
+#ifdef V8_TARGET_ARCH_ARM
+ // On EABI ARM targets this is required for fp correctness in the
+ // runtime system.
return 8;
+#else
+ // With gcc 4.4 the tree vectorization optimiser can generate code
+ // that requires 16 byte alignment such as movdqa on x86.
+ return 16;
+#endif
}
@@ -609,9 +617,16 @@ static void ProfilerSignalHandler(int signal, siginfo_t* info, void* context) {
sample.sp = mcontext.gregs[REG_RSP];
sample.fp = mcontext.gregs[REG_RBP];
#elif V8_HOST_ARCH_ARM
+// An undefined macro evaluates to 0, so this applies to Android's Bionic also.
+#if (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 3))
sample.pc = mcontext.gregs[R15];
sample.sp = mcontext.gregs[R13];
sample.fp = mcontext.gregs[R11];
+#else
+ sample.pc = mcontext.arm_pc;
+ sample.sp = mcontext.arm_sp;
+ sample.fp = mcontext.arm_fp;
+#endif
#endif
}