Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Unified Diff: src/base/platform/platform-posix.cc

Issue 422063005: Contribution of PowerPC port. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: re-upload - catch up to 8/19 level Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/base/platform/platform-posix.cc
diff --git a/src/base/platform/platform-posix.cc b/src/base/platform/platform-posix.cc
index 252d213755299756dfec51a8a47fe7f48130b1a5..cb3f2bc60eeac8290cca8692900eb04b2ea60c55 100644
--- a/src/base/platform/platform-posix.cc
+++ b/src/base/platform/platform-posix.cc
@@ -148,6 +148,8 @@ int OS::ActivationFrameAlignment() {
return 8;
#elif V8_TARGET_ARCH_MIPS
return 8;
+#elif V8_TARGET_ARCH_PPC
Sven Panne 2014/09/01 07:55:17 No need for a separate case here, just extend the
+ return 16;
#else
// Otherwise we just assume 16 byte alignment, i.e.:
// - With gcc 4.4 the tree vectorization optimizer can generate code
@@ -238,6 +240,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_ARCH_PPC_BE
Sven Panne 2014/09/01 07:55:17 Please don't mix up the architecture and the endia
+ // 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;
@@ -292,6 +302,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 defined(__native_client__)
asm("hlt");
@@ -604,9 +616,13 @@ void Thread::Join() {
void Thread::YieldCPU() {
+#if V8_TARGET_ARCH_PPC
Sven Panne 2014/09/01 07:55:17 Huh? How is this related to the *architecture*? Do
+ OS::Sleep(0);
+#else
int result = sched_yield();
DCHECK_EQ(0, result);
USE(result);
+#endif
}

Powered by Google App Engine
This is Rietveld 408576698