changeset 5936:ccb68f77d07a

8016491: PPC64 (part 2): Clean up PPC defines. Summary: Distinguish PPC, PPC64 and PPC32. PPC should guard code needed on any PPC system. PPC32 and PPC64 should guard code needed in a port for the ppc64 or ppc32 instruction set. Reviewed-by: andrew
author goetz
date Fri, 07 Feb 2014 14:57:01 +0100
parents de5e8c8a9b87
children ccc95eb5ca55
files make/linux/platform_ppc src/os/bsd/vm/os_bsd.cpp src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp src/os_cpu/linux_zero/vm/os_linux_zero.hpp src/share/vm/utilities/macros.hpp
diffstat 5 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/make/linux/platform_ppc	Sat Sep 10 21:36:58 2016 +0100
+++ b/make/linux/platform_ppc	Fri Feb 07 14:57:01 2014 +0100
@@ -14,4 +14,4 @@
 
 gnu_dis_arch = ppc
 
-sysdefs = -DLINUX -D_GNU_SOURCE -DPPC
+sysdefs = -DLINUX -D_GNU_SOURCE -DPPC32
--- a/src/os/bsd/vm/os_bsd.cpp	Sat Sep 10 21:36:58 2016 +0100
+++ b/src/os/bsd/vm/os_bsd.cpp	Fri Feb 07 14:57:01 2014 +0100
@@ -284,7 +284,7 @@
 static char cpu_arch[] = "amd64";
 #elif defined(ARM)
 static char cpu_arch[] = "arm";
-#elif defined(PPC)
+#elif defined(PPC32)
 static char cpu_arch[] = "ppc";
 #elif defined(SPARC)
 #  ifdef _LP64
--- a/src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp	Sat Sep 10 21:36:58 2016 +0100
+++ b/src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp	Fri Feb 07 14:57:01 2014 +0100
@@ -36,7 +36,7 @@
 
   // Atomically copy 64 bits of data
   static void atomic_copy64(volatile void *src, volatile void *dst) {
-#if defined(PPC) && !defined(_LP64)
+#if defined(PPC32)
     double tmp;
     asm volatile ("lfd  %0, 0(%1)\n"
                   "stfd %0, 0(%2)\n"
--- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp	Sat Sep 10 21:36:58 2016 +0100
+++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp	Fri Feb 07 14:57:01 2014 +0100
@@ -36,7 +36,7 @@
 
   // Atomically copy 64 bits of data
   static void atomic_copy64(volatile void *src, volatile void *dst) {
-#if defined(PPC) && !defined(_LP64)
+#if defined(PPC32)
     double tmp;
     asm volatile ("lfd  %0, 0(%1)\n"
                   "stfd %0, 0(%2)\n"
--- a/src/share/vm/utilities/macros.hpp	Sat Sep 10 21:36:58 2016 +0100
+++ b/src/share/vm/utilities/macros.hpp	Fri Feb 07 14:57:01 2014 +0100
@@ -228,10 +228,13 @@
 #endif
 
 #if defined(PPC32) || defined(PPC64)
+#ifndef PPC
 #define PPC
+#endif
 #define PPC_ONLY(code) code
 #define NOT_PPC(code)
 #else
+#undef PPC
 #define PPC_ONLY(code)
 #define NOT_PPC(code) code
 #endif