提交 d11fa79d 编写于 作者: G goetz

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: kvn
上级 4cc0bf5d
......@@ -14,4 +14,4 @@ compiler = gcc
gnu_dis_arch = ppc
sysdefs = -DLINUX -D_GNU_SOURCE -DPPC
sysdefs = -DLINUX -D_GNU_SOURCE -DPPC32
......@@ -205,7 +205,7 @@ static char cpu_arch[] = "i386";
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
......
......@@ -247,7 +247,7 @@ static char cpu_arch[] = "i386";
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
......
......@@ -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"
......
......@@ -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"
......
......@@ -918,7 +918,7 @@ void frame::oops_interpreted_do(OopClosure* f, CLDToOopClosure* cld_f,
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 @@ void frame::oops_interpreted_do(OopClosure* f, CLDToOopClosure* cld_f,
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();
......
......@@ -346,7 +346,7 @@ class frame VALUE_OBJ_CLASS_SPEC {
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
......
......@@ -406,7 +406,7 @@ double SharedRuntime::dabs(double f) {
#endif
#if defined(__SOFTFP__) || defined(PPC)
#if defined(__SOFTFP__) || defined(PPC32)
double SharedRuntime::dsqrt(double f) {
return sqrt(f);
}
......
......@@ -140,7 +140,7 @@ class SharedRuntime: AllStatic {
static double dabs(double f);
#endif
#if defined(__SOFTFP__) || defined(PPC)
#if defined(__SOFTFP__) || defined(PPC32)
static double dsqrt(double f);
#endif
......
......@@ -186,7 +186,7 @@ const char* Abstract_VM_Version::jre_release_version() {
IA64_ONLY("ia64") \
AMD64_ONLY("amd64") \
ARM_ONLY("arm") \
PPC_ONLY("ppc") \
PPC32_ONLY("ppc") \
SPARC_ONLY("sparc")
#endif // ZERO
......@@ -248,7 +248,7 @@ const char* Abstract_VM_Version::internal_vm_info_string() {
#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 ""
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册