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

Unified Diff: test/cctest/test-platform.cc

Issue 422063005: Contribution of PowerPC port. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Caught up to bleending edge (8/15) 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: test/cctest/test-platform.cc
diff --git a/test/cctest/test-platform.cc b/test/cctest/test-platform.cc
index 3beaccea8e0021ed9c5c451893cdb577c834acc6..17e047821f08583d9e51aaad8b0e48445dca01e6 100644
--- a/test/cctest/test-platform.cc
+++ b/test/cctest/test-platform.cc
@@ -65,6 +65,18 @@ using namespace ::v8::internal;
do { \
ASM("sw $sp, %0" : "=g" (sp_addr)); \
} while (0)
+#elif defined(__PPC64__) || defined(_ARCH_PPC64)
+#define GET_STACK_POINTER() \
+ static intptr_t sp_addr = 0; \
+ do { \
+ ASM("std 1, %0" : "=g" (sp_addr)); \
+ } while (0)
+#elif defined(__PPC__) || defined(_ARCH_PPC)
+#define GET_STACK_POINTER() \
+ static intptr_t sp_addr = 0; \
+ do { \
+ ASM("stw 1, %0" : "=g" (sp_addr)); \
+ } while (0)
#else
#error Host architecture was not detected as supported by v8
#endif

Powered by Google App Engine
This is Rietveld 408576698