annotate ppc_patches/0002_PPC_defines.patch @ 4798:df79d76c17ab

Patch queue containing the ppc port. Applying this to the staging repository at tag hs25-b34 leads to the code contained in this repository. We will update the patches so that with the staging repo and the patches always a working hotspot for ppc can be built.
author Goetz
date Wed, 12 Jun 2013 15:55:20 +0200
parents
children 2a6fd169b0b7
rev   line source
Goetz@4798 1 # HG changeset patch
Goetz@4798 2 # Parent 06bfb810994ad0a0511d16386a4b5c20b705e6d6
Goetz@4798 3 Clean up PPC defines.
Goetz@4798 4
Goetz@4798 5 Reorganize PPC defines. Distinguish PPC, PPC64 and PPC32.
Goetz@4798 6 PPC should guard code needed on PPC regardless of word size.
Goetz@4798 7 PPC32 and PPC64 should guard code needed in the 64-bit or
Goetz@4798 8 the 32-bit port.
Goetz@4798 9
Goetz@4798 10 diff -r 06bfb810994a src/os/bsd/vm/os_bsd.cpp
Goetz@4798 11 --- a/src/os/bsd/vm/os_bsd.cpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 12 +++ b/src/os/bsd/vm/os_bsd.cpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 13 @@ -219,7 +219,7 @@
Goetz@4798 14 static char cpu_arch[] = "amd64";
Goetz@4798 15 #elif defined(ARM)
Goetz@4798 16 static char cpu_arch[] = "arm";
Goetz@4798 17 -#elif defined(PPC)
Goetz@4798 18 +#elif defined(PPC32)
Goetz@4798 19 static char cpu_arch[] = "ppc";
Goetz@4798 20 #elif defined(SPARC)
Goetz@4798 21 # ifdef _LP64
Goetz@4798 22 diff -r 06bfb810994a src/os/linux/vm/os_linux.cpp
Goetz@4798 23 --- a/src/os/linux/vm/os_linux.cpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 24 +++ b/src/os/linux/vm/os_linux.cpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 25 @@ -258,7 +258,7 @@
Goetz@4798 26 static char cpu_arch[] = "amd64";
Goetz@4798 27 #elif defined(ARM)
Goetz@4798 28 static char cpu_arch[] = "arm";
Goetz@4798 29 -#elif defined(PPC)
Goetz@4798 30 +#elif defined(PPC32)
Goetz@4798 31 static char cpu_arch[] = "ppc";
Goetz@4798 32 #elif defined(SPARC)
Goetz@4798 33 # ifdef _LP64
Goetz@4798 34 diff -r 06bfb810994a src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp
Goetz@4798 35 --- a/src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 36 +++ b/src/os_cpu/bsd_zero/vm/os_bsd_zero.hpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 37 @@ -36,7 +36,7 @@
Goetz@4798 38
Goetz@4798 39 // Atomically copy 64 bits of data
Goetz@4798 40 static void atomic_copy64(volatile void *src, volatile void *dst) {
Goetz@4798 41 -#if defined(PPC) && !defined(_LP64)
Goetz@4798 42 +#if defined(PPC32)
Goetz@4798 43 double tmp;
Goetz@4798 44 asm volatile ("lfd %0, 0(%1)\n"
Goetz@4798 45 "stfd %0, 0(%2)\n"
Goetz@4798 46 diff -r 06bfb810994a src/os_cpu/linux_zero/vm/os_linux_zero.hpp
Goetz@4798 47 --- a/src/os_cpu/linux_zero/vm/os_linux_zero.hpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 48 +++ b/src/os_cpu/linux_zero/vm/os_linux_zero.hpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 49 @@ -36,7 +36,7 @@
Goetz@4798 50
Goetz@4798 51 // Atomically copy 64 bits of data
Goetz@4798 52 static void atomic_copy64(volatile void *src, volatile void *dst) {
Goetz@4798 53 -#if defined(PPC) && !defined(_LP64)
Goetz@4798 54 +#if defined(PPC32)
Goetz@4798 55 double tmp;
Goetz@4798 56 asm volatile ("lfd %0, 0(%1)\n"
Goetz@4798 57 "stfd %0, 0(%2)\n"
Goetz@4798 58 diff -r 06bfb810994a src/share/vm/runtime/frame.cpp
Goetz@4798 59 --- a/src/share/vm/runtime/frame.cpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 60 +++ b/src/share/vm/runtime/frame.cpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 61 @@ -918,7 +918,7 @@
Goetz@4798 62 cld_f->do_cld(m->method_holder()->class_loader_data());
Goetz@4798 63 }
Goetz@4798 64
Goetz@4798 65 -#if !defined(PPC) || defined(ZERO)
Goetz@4798 66 +#if !defined(PPC32) || defined(ZERO)
Goetz@4798 67 if (m->is_native()) {
Goetz@4798 68 #ifdef CC_INTERP
Goetz@4798 69 interpreterState istate = get_interpreterState();
Goetz@4798 70 @@ -927,11 +927,11 @@
Goetz@4798 71 f->do_oop((oop*)( fp() + interpreter_frame_oop_temp_offset ));
Goetz@4798 72 #endif /* CC_INTERP */
Goetz@4798 73 }
Goetz@4798 74 -#else // PPC
Goetz@4798 75 +#else // PPC32
Goetz@4798 76 if (m->is_native() && m->is_static()) {
Goetz@4798 77 f->do_oop(interpreter_frame_mirror_addr());
Goetz@4798 78 }
Goetz@4798 79 -#endif // PPC
Goetz@4798 80 +#endif // PPC32
Goetz@4798 81
Goetz@4798 82 int max_locals = m->is_native() ? m->size_of_parameters() : m->max_locals();
Goetz@4798 83
Goetz@4798 84 diff -r 06bfb810994a src/share/vm/runtime/frame.hpp
Goetz@4798 85 --- a/src/share/vm/runtime/frame.hpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 86 +++ b/src/share/vm/runtime/frame.hpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 87 @@ -346,7 +346,7 @@
Goetz@4798 88 void interpreter_frame_set_method(Method* method);
Goetz@4798 89 Method** interpreter_frame_method_addr() const;
Goetz@4798 90 ConstantPoolCache** interpreter_frame_cache_addr() const;
Goetz@4798 91 -#ifdef PPC
Goetz@4798 92 +#ifdef PPC32
Goetz@4798 93 oop* interpreter_frame_mirror_addr() const;
Goetz@4798 94 #endif
Goetz@4798 95
Goetz@4798 96 diff -r 06bfb810994a src/share/vm/runtime/sharedRuntime.cpp
Goetz@4798 97 --- a/src/share/vm/runtime/sharedRuntime.cpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 98 +++ b/src/share/vm/runtime/sharedRuntime.cpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 99 @@ -406,7 +406,7 @@
Goetz@4798 100
Goetz@4798 101 #endif
Goetz@4798 102
Goetz@4798 103 -#if defined(__SOFTFP__) || defined(PPC)
Goetz@4798 104 +#if defined(__SOFTFP__) || defined(PPC32)
Goetz@4798 105 double SharedRuntime::dsqrt(double f) {
Goetz@4798 106 return sqrt(f);
Goetz@4798 107 }
Goetz@4798 108 diff -r 06bfb810994a src/share/vm/runtime/sharedRuntime.hpp
Goetz@4798 109 --- a/src/share/vm/runtime/sharedRuntime.hpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 110 +++ b/src/share/vm/runtime/sharedRuntime.hpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 111 @@ -140,7 +140,7 @@
Goetz@4798 112 static double dabs(double f);
Goetz@4798 113 #endif
Goetz@4798 114
Goetz@4798 115 -#if defined(__SOFTFP__) || defined(PPC)
Goetz@4798 116 +#if defined(__SOFTFP__) || defined(PPC32)
Goetz@4798 117 static double dsqrt(double f);
Goetz@4798 118 #endif
Goetz@4798 119
Goetz@4798 120 diff -r 06bfb810994a src/share/vm/runtime/vm_version.cpp
Goetz@4798 121 --- a/src/share/vm/runtime/vm_version.cpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 122 +++ b/src/share/vm/runtime/vm_version.cpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 123 @@ -186,7 +186,7 @@
Goetz@4798 124 IA64_ONLY("ia64") \
Goetz@4798 125 AMD64_ONLY("amd64") \
Goetz@4798 126 ARM_ONLY("arm") \
Goetz@4798 127 - PPC_ONLY("ppc") \
Goetz@4798 128 + PPC32_ONLY("ppc") \
Goetz@4798 129 SPARC_ONLY("sparc")
Goetz@4798 130 #endif // ZERO
Goetz@4798 131
Goetz@4798 132 @@ -244,7 +244,7 @@
Goetz@4798 133 #define FLOAT_ARCH_STR "-e500v2"
Goetz@4798 134 #elif defined(ARM)
Goetz@4798 135 #define FLOAT_ARCH_STR "-vfp"
Goetz@4798 136 - #elif defined(PPC)
Goetz@4798 137 + #elif defined(PPC32)
Goetz@4798 138 #define FLOAT_ARCH_STR "-hflt"
Goetz@4798 139 #else
Goetz@4798 140 #define FLOAT_ARCH_STR ""
Goetz@4798 141 diff -r 06bfb810994a src/share/vm/utilities/macros.hpp
Goetz@4798 142 --- a/src/share/vm/utilities/macros.hpp Mon Apr 22 09:43:26 2013 +0200
Goetz@4798 143 +++ b/src/share/vm/utilities/macros.hpp Fri Apr 26 10:15:14 2013 +0200
Goetz@4798 144 @@ -340,7 +340,8 @@
Goetz@4798 145 #define NOT_SPARC(code) code
Goetz@4798 146 #endif
Goetz@4798 147
Goetz@4798 148 -#ifdef PPC
Goetz@4798 149 +#if defined(PPC32) || defined(PPC64)
Goetz@4798 150 +#define PPC
Goetz@4798 151 #define PPC_ONLY(code) code
Goetz@4798 152 #define NOT_PPC(code)
Goetz@4798 153 #else
Goetz@4798 154 @@ -348,6 +349,22 @@
Goetz@4798 155 #define NOT_PPC(code) code
Goetz@4798 156 #endif
Goetz@4798 157
Goetz@4798 158 +#ifdef PPC32
Goetz@4798 159 +#define PPC32_ONLY(code) code
Goetz@4798 160 +#define NOT_PPC32(code)
Goetz@4798 161 +#else
Goetz@4798 162 +#define PPC32_ONLY(code)
Goetz@4798 163 +#define NOT_PPC32(code) code
Goetz@4798 164 +#endif
Goetz@4798 165 +
Goetz@4798 166 +#ifdef PPC64
Goetz@4798 167 +#define PPC64_ONLY(code) code
Goetz@4798 168 +#define NOT_PPC64(code)
Goetz@4798 169 +#else
Goetz@4798 170 +#define PPC64_ONLY(code)
Goetz@4798 171 +#define NOT_PPC64(code) code
Goetz@4798 172 +#endif
Goetz@4798 173 +
Goetz@4798 174 #ifdef E500V2
Goetz@4798 175 #define E500V2_ONLY(code) code
Goetz@4798 176 #define NOT_E500V2(code)