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

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: 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: test/cctest/test-platform.cc
diff --git a/test/cctest/test-platform.cc b/test/cctest/test-platform.cc
index 3beaccea8e0021ed9c5c451893cdb577c834acc6..7e2aa4c2238142933aceb73896d1abbd6bb6a729 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