view ppc_patches/0002_PPC_defines.patch @ 4803:2a6fd169b0b7

ppc_patches: recent changes, especially to 0005_rt-use_stubs_to_implement_safefetch_.patch
author goetz
date Thu, 20 Jun 2013 14:01:01 +0200
parents df79d76c17ab
children
line wrap: on
line source
# HG changeset patch
# Parent 00aacc97690f93b1ebe017125e95ce4beaed7dc7
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.
diff -r 00aacc97690f make/linux/platform_ppc
--- a/make/linux/platform_ppc	Thu Jun 13 11:49:32 2013 +0200
+++ b/make/linux/platform_ppc	Thu Jun 13 22:16:42 2013 +0200
@@ -14,4 +14,4 @@
 
 gnu_dis_arch = ppc
 
-sysdefs = -DLINUX -D_GNU_SOURCE -DPPC
+sysdefs = -DLINUX -D_GNU_SOURCE -DPPC32
diff -r 00aacc97690f src/os/bsd/vm/os_bsd.cpp
--- a/src/os/bsd/vm/os_bsd.cpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/os/bsd/vm/os_bsd.cpp	Thu Jun 13 22:16:42 2013 +0200
@@ -205,7 +205,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
diff -r 00aacc97690f src/os/linux/vm/os_linux.cpp
--- a/src/os/linux/vm/os_linux.cpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/os/linux/vm/os_linux.cpp	Thu Jun 13 22:16:42 2013 +0200
@@ -247,7 +247,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
diff -r 00aacc97690f src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp
--- a/src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp	Thu Jun 13 22:16:42 2013 +0200
@@ -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"
diff -r 00aacc97690f src/os_cpu/linux_zero/vm/os_linux_zero.hpp
--- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp	Thu Jun 13 22:16:42 2013 +0200
@@ -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"
diff -r 00aacc97690f src/share/vm/runtime/frame.cpp
--- a/src/share/vm/runtime/frame.cpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/share/vm/runtime/frame.cpp	Thu Jun 13 22:16:42 2013 +0200
@@ -918,7 +918,7 @@
     cld_f->do_cld(m->method_holder()->class_loader_data());
   }
 
-#if !defined(PPC) || defined(ZERO)
+#if !defined(PPC32) || defined(ZERO)
   if (m->is_native()) {
 #ifdef CC_INTERP
     interpreterState istate = get_interpreterState();
@@ -927,11 +927,11 @@
     f->do_oop((oop*)( fp() + interpreter_frame_oop_temp_offset ));
 #endif /* CC_INTERP */
   }
-#else // PPC
+#else // PPC32
   if (m->is_native() && m->is_static()) {
     f->do_oop(interpreter_frame_mirror_addr());
   }
-#endif // PPC
+#endif // PPC32
 
   int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals();
 
diff -r 00aacc97690f src/share/vm/runtime/frame.hpp
--- a/src/share/vm/runtime/frame.hpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/share/vm/runtime/frame.hpp	Thu Jun 13 22:16:42 2013 +0200
@@ -346,7 +346,7 @@
   void interpreter_frame_set_method(Method* method);
   Method** interpreter_frame_method_addr() const;
   ConstantPoolCache** interpreter_frame_cache_addr() const;
-#ifdef PPC
+#ifdef PPC32
   oop* interpreter_frame_mirror_addr() const;
 #endif
 
diff -r 00aacc97690f src/share/vm/runtime/sharedRuntime.cpp
--- a/src/share/vm/runtime/sharedRuntime.cpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/share/vm/runtime/sharedRuntime.cpp	Thu Jun 13 22:16:42 2013 +0200
@@ -406,7 +406,7 @@
 
 #endif
 
-#if defined(__SOFTFP__) || defined(PPC)
+#if defined(__SOFTFP__) || defined(PPC32)
 double SharedRuntime::dsqrt(double f) {
   return sqrt(f);
 }
diff -r 00aacc97690f src/share/vm/runtime/sharedRuntime.hpp
--- a/src/share/vm/runtime/sharedRuntime.hpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/share/vm/runtime/sharedRuntime.hpp	Thu Jun 13 22:16:42 2013 +0200
@@ -140,7 +140,7 @@
   static double dabs(double f);
 #endif
 
-#if defined(__SOFTFP__) || defined(PPC)
+#if defined(__SOFTFP__) || defined(PPC32)
   static double dsqrt(double f);
 #endif
 
diff -r 00aacc97690f src/share/vm/runtime/vm_version.cpp
--- a/src/share/vm/runtime/vm_version.cpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/share/vm/runtime/vm_version.cpp	Thu Jun 13 22:16:42 2013 +0200
@@ -186,7 +186,7 @@
                  IA64_ONLY("ia64")               \
                  AMD64_ONLY("amd64")             \
                  ARM_ONLY("arm")                 \
-                 PPC_ONLY("ppc")                 \
+                 PPC32_ONLY("ppc")               \
                  SPARC_ONLY("sparc")
 #endif // ZERO
 
@@ -248,7 +248,7 @@
       #define FLOAT_ARCH_STR "-e500v2"
     #elif defined(ARM)
       #define FLOAT_ARCH_STR "-vfp"
-    #elif defined(PPC)
+    #elif defined(PPC32)
       #define FLOAT_ARCH_STR "-hflt"
     #else
       #define FLOAT_ARCH_STR ""
diff -r 00aacc97690f src/share/vm/utilities/macros.hpp
--- a/src/share/vm/utilities/macros.hpp	Thu Jun 13 11:49:32 2013 +0200
+++ b/src/share/vm/utilities/macros.hpp	Thu Jun 13 22:16:42 2013 +0200
@@ -340,14 +340,34 @@
 #define NOT_SPARC(code) code
 #endif
 
-#ifdef PPC
+#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
 
+#ifdef PPC32
+#define PPC32_ONLY(code) code
+#define NOT_PPC32(code)
+#else
+#define PPC32_ONLY(code)
+#define NOT_PPC32(code) code
+#endif
+
+#ifdef PPC64
+#define PPC64_ONLY(code) code
+#define NOT_PPC64(code)
+#else
+#define PPC64_ONLY(code)
+#define NOT_PPC64(code) code
+#endif
+
 #ifdef E500V2
 #define E500V2_ONLY(code) code
 #define NOT_E500V2(code)