Index: src/base/platform/platform-posix.cc |
diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc |
index c2fa26a9ea9364b8009e7b5d4b2a0b290e06a64b..aa87e7560c68e71432eb582a72fccc7e3492245a 100644 |
--- a/src/base/platform/platform-posix.cc |
+++ b/src/base/platform/platform-posix.cc |
@@ -85,8 +85,8 @@ int OS::ActivationFrameAlignment() { |
// 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" |
+ // - Mac OS X, PPC and Solaris (64-bit) activation frames must |
+ // be 16 byte-aligned; see "Mac OS X ABI Function Call Guide" |
Sven Panne
2015/01/08 10:13:53
Micro-nit: Indentation.
michael_dawson
2015/01/08 23:51:11
Will do
|
return 16; |
#endif |
} |
@@ -171,6 +171,14 @@ void* OS::GetRandomMmapAddr() { |
// the hint address to 46 bits to give the kernel a fighting chance of |
// fulfilling our placement request. |
raw_addr &= V8_UINT64_C(0x3ffffffff000); |
+#elif V8_TARGET_ARCH_PPC64 |
+#if V8_TARGET_BIG_ENDIAN |
+ // Big-endian Linux: 44 bits of virtual addressing. |
+ raw_addr &= V8_UINT64_C(0x03fffffff000); |
+#else |
+ // Little-endian Linux: 48 bits of virtual addressing. |
+ raw_addr &= V8_UINT64_C(0x3ffffffff000); |
+#endif |
#else |
raw_addr &= 0x3ffff000; |
@@ -225,6 +233,8 @@ void OS::DebugBreak() { |
asm("break"); |
#elif V8_HOST_ARCH_MIPS64 |
asm("break"); |
+#elif V8_HOST_ARCH_PPC |
+ asm("twge 2,2"); |
#elif V8_HOST_ARCH_IA32 |
#if V8_OS_NACL |
asm("hlt"); |
@@ -242,6 +252,7 @@ void OS::DebugBreak() { |
// ---------------------------------------------------------------------------- |
// Math functions |
+ |
double OS::nan_value() { |
// NAN from math.h is defined in C99 and not in POSIX. |
return NAN; |