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 |