From 4c8ea96de29a836e983cd884088727ff245a5a0f Mon Sep 17 00:00:00 2001 From: goetz Date: Thu, 22 Aug 2013 09:39:54 -0700 Subject: [PATCH] 8023033: PPC64 (part 13): basic changes for AIX Summary: Added AIX includes alpha-sorted before BSD. Fix compilation issues with xlC in shared code. Basic shared platform dependend adaption (vm_version etc.). Reviewed-by: kvn, dholmes, stefank --- src/os/posix/vm/os_posix.cpp | 4 ++-- src/share/vm/c1/c1_globals.hpp | 3 +++ src/share/vm/classfile/classLoader.cpp | 3 +++ src/share/vm/code/nmethod.cpp | 2 +- src/share/vm/code/relocInfo.hpp | 4 ++-- src/share/vm/code/stubs.hpp | 3 +++ src/share/vm/code/vmreg.hpp | 8 ++++---- src/share/vm/compiler/disassembler.hpp | 3 +++ .../concurrentMarkSweep/adaptiveFreeList.cpp | 2 +- .../concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp | 3 +++ .../parallelScavenge/parMarkBitMap.cpp | 3 +++ .../parallelScavenge/psVirtualspace.cpp | 3 +++ src/share/vm/interpreter/bytecodeInterpreter.cpp | 3 +++ src/share/vm/libadt/port.hpp | 2 -- src/share/vm/memory/allocation.cpp | 3 +++ src/share/vm/memory/allocation.hpp | 5 ++++- src/share/vm/memory/space.hpp | 3 +++ src/share/vm/memory/universe.cpp | 7 ++++++- src/share/vm/oops/typeArrayOop.hpp | 3 +++ src/share/vm/opto/c2_globals.hpp | 3 +++ src/share/vm/prims/jvm.cpp | 3 +++ src/share/vm/prims/jvm.h | 3 +++ src/share/vm/prims/nativeLookup.cpp | 3 +++ src/share/vm/runtime/arguments.cpp | 3 +++ src/share/vm/runtime/atomic.cpp | 3 +++ src/share/vm/runtime/atomic.inline.hpp | 5 +++++ src/share/vm/runtime/globals.hpp | 15 +++++++++++++++ src/share/vm/runtime/interfaceSupport.hpp | 3 +++ src/share/vm/runtime/javaFrameAnchor.hpp | 3 +++ src/share/vm/runtime/mutexLocker.hpp | 3 +++ src/share/vm/runtime/os.hpp | 11 +++++++++++ src/share/vm/runtime/osThread.hpp | 3 +++ src/share/vm/runtime/sharedRuntimeTrans.cpp | 4 ++++ src/share/vm/runtime/sharedRuntimeTrig.cpp | 8 ++++---- src/share/vm/runtime/thread.hpp | 3 +++ src/share/vm/runtime/thread.inline.hpp | 3 +++ src/share/vm/runtime/threadLocalStorage.hpp | 3 +++ src/share/vm/runtime/timer.cpp | 3 +++ src/share/vm/runtime/virtualspace.cpp | 3 +++ src/share/vm/runtime/vmStructs.cpp | 3 +++ src/share/vm/runtime/vm_version.cpp | 4 ++++ src/share/vm/utilities/accessFlags.cpp | 3 +++ src/share/vm/utilities/bitMap.cpp | 3 +++ src/share/vm/utilities/debug.hpp | 2 +- src/share/vm/utilities/decoder.cpp | 4 ++++ src/share/vm/utilities/globalDefinitions.hpp | 3 +++ src/share/vm/utilities/histogram.hpp | 3 +++ src/share/vm/utilities/macros.hpp | 8 ++++++++ src/share/vm/utilities/ostream.cpp | 5 ++++- src/share/vm/utilities/resourceHash.hpp | 8 ++++++-- src/share/vm/utilities/taskqueue.hpp | 3 +++ 51 files changed, 182 insertions(+), 22 deletions(-) diff --git a/src/os/posix/vm/os_posix.cpp b/src/os/posix/vm/os_posix.cpp index 61b8116f2..66ca97ba1 100644 --- a/src/os/posix/vm/os_posix.cpp +++ b/src/os/posix/vm/os_posix.cpp @@ -165,7 +165,7 @@ void os::Posix::print_rlimit_info(outputStream* st) { else st->print("%uk", rlim.rlim_cur >> 10); // Isn't there on solaris -#ifndef TARGET_OS_FAMILY_solaris +#if! defined(TARGET_OS_FAMILY_solaris) && !defined(TARGET_OS_FAMILY_aix) st->print(", NPROC "); getrlimit(RLIMIT_NPROC, &rlim); if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); @@ -487,7 +487,7 @@ bool os::Posix::is_valid_signal(int sig) { #define NUM_IMPORTANT_SIGS 32 // Returns one-line short description of a signal set in a user provided buffer. const char* os::Posix::describe_signal_set_short(const sigset_t* set, char* buffer, size_t buf_size) { - assert(buf_size = (NUM_IMPORTANT_SIGS + 1), "wrong buffer size"); + assert(buf_size == (NUM_IMPORTANT_SIGS + 1), "wrong buffer size"); // Note: for shortness, just print out the first 32. That should // cover most of the useful ones, apart from realtime signals. for (int sig = 1; sig <= NUM_IMPORTANT_SIGS; sig++) { diff --git a/src/share/vm/c1/c1_globals.hpp b/src/share/vm/c1/c1_globals.hpp index 844880be2..49ef91451 100644 --- a/src/share/vm/c1/c1_globals.hpp +++ b/src/share/vm/c1/c1_globals.hpp @@ -47,6 +47,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "c1_globals_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "c1_globals_aix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "c1_globals_bsd.hpp" #endif diff --git a/src/share/vm/classfile/classLoader.cpp b/src/share/vm/classfile/classLoader.cpp index 32a4da05b..942144f75 100644 --- a/src/share/vm/classfile/classLoader.cpp +++ b/src/share/vm/classfile/classLoader.cpp @@ -68,6 +68,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/code/nmethod.cpp b/src/share/vm/code/nmethod.cpp index 1dfc3ba8f..fb48d4300 100644 --- a/src/share/vm/code/nmethod.cpp +++ b/src/share/vm/code/nmethod.cpp @@ -799,7 +799,7 @@ nmethod::nmethod( } #endif // def HAVE_DTRACE_H -void* nmethod::operator new(size_t size, int nmethod_size) throw () { +void* nmethod::operator new(size_t size, int nmethod_size) { // Not critical, may return null if there is too little continuous memory return CodeCache::allocate(nmethod_size); } diff --git a/src/share/vm/code/relocInfo.hpp b/src/share/vm/code/relocInfo.hpp index 2b8611ca2..14fbc496d 100644 --- a/src/share/vm/code/relocInfo.hpp +++ b/src/share/vm/code/relocInfo.hpp @@ -365,7 +365,7 @@ class relocInfo VALUE_OBJ_CLASS_SPEC { // "immediate" in the prefix header word itself. This optimization // is invisible outside this module.) - inline friend relocInfo prefix_relocInfo(int datalen = 0); + inline friend relocInfo prefix_relocInfo(int datalen); protected: // an immediate relocInfo optimizes a prefix with one 10-bit unsigned value @@ -460,7 +460,7 @@ inline relocInfo filler_relocInfo() { return relocInfo(relocInfo::none, relocInfo::offset_limit() - relocInfo::offset_unit); } -inline relocInfo prefix_relocInfo(int datalen) { +inline relocInfo prefix_relocInfo(int datalen = 0) { assert(relocInfo::fits_into_immediate(datalen), "datalen in limits"); return relocInfo(relocInfo::data_prefix_tag, relocInfo::RAW_BITS, relocInfo::datalen_tag | datalen); } diff --git a/src/share/vm/code/stubs.hpp b/src/share/vm/code/stubs.hpp index 233f43e2d..25cd9ee01 100644 --- a/src/share/vm/code/stubs.hpp +++ b/src/share/vm/code/stubs.hpp @@ -36,6 +36,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/code/vmreg.hpp b/src/share/vm/code/vmreg.hpp index dfb957ba5..1ef07ec19 100644 --- a/src/share/vm/code/vmreg.hpp +++ b/src/share/vm/code/vmreg.hpp @@ -73,7 +73,7 @@ friend class OptoReg; // friend class Location; private: enum { - BAD = -1 + BAD_REG = -1 }; @@ -86,7 +86,7 @@ private: public: - static VMReg as_VMReg(int val, bool bad_ok = false) { assert(val > BAD || bad_ok, "invalid"); return (VMReg) (intptr_t) val; } + static VMReg as_VMReg(int val, bool bad_ok = false) { assert(val > BAD_REG || bad_ok, "invalid"); return (VMReg) (intptr_t) val; } const char* name() { if (is_reg()) { @@ -98,8 +98,8 @@ public: return "STACKED REG"; } } - static VMReg Bad() { return (VMReg) (intptr_t) BAD; } - bool is_valid() const { return ((intptr_t) this) != BAD; } + static VMReg Bad() { return (VMReg) (intptr_t) BAD_REG; } + bool is_valid() const { return ((intptr_t) this) != BAD_REG; } bool is_stack() const { return (intptr_t) this >= (intptr_t) stack0; } bool is_reg() const { return is_valid() && !is_stack(); } diff --git a/src/share/vm/compiler/disassembler.hpp b/src/share/vm/compiler/disassembler.hpp index c81666ec2..c348ae650 100644 --- a/src/share/vm/compiler/disassembler.hpp +++ b/src/share/vm/compiler/disassembler.hpp @@ -36,6 +36,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp index cfba2376e..37e079aa0 100644 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp @@ -122,7 +122,7 @@ void AdaptiveFreeList::return_chunk_at_head(Chunk* chunk, bool record_ret template void AdaptiveFreeList::return_chunk_at_tail(Chunk* chunk) { - return_chunk_at_tail(chunk, true); + AdaptiveFreeList::return_chunk_at_tail(chunk, true); } template diff --git a/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp b/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp index d60fe8068..955039909 100644 --- a/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp +++ b/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp @@ -37,6 +37,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp index 0db70cdd7..76a368b69 100644 --- a/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp +++ b/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp @@ -38,6 +38,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp b/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp index 999952730..90672fba0 100644 --- a/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp +++ b/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp @@ -35,6 +35,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/interpreter/bytecodeInterpreter.cpp b/src/share/vm/interpreter/bytecodeInterpreter.cpp index ba72cf4ec..b22ce9718 100644 --- a/src/share/vm/interpreter/bytecodeInterpreter.cpp +++ b/src/share/vm/interpreter/bytecodeInterpreter.cpp @@ -67,6 +67,9 @@ #ifdef TARGET_OS_ARCH_linux_ppc # include "orderAccess_linux_ppc.inline.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "orderAccess_aix_ppc.inline.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "orderAccess_bsd_x86.inline.hpp" #endif diff --git a/src/share/vm/libadt/port.hpp b/src/share/vm/libadt/port.hpp index ad7e77c1a..903e486a6 100644 --- a/src/share/vm/libadt/port.hpp +++ b/src/share/vm/libadt/port.hpp @@ -91,8 +91,6 @@ inline int max( int a, int b) { return a > b ? a : b; } #define IMPLEMENTATION #include #include -inline int min( int a, int b) { return a < b ? a : b; } -inline int max( int a, int b) { return a > b ? a : b; } #elif defined(_MSC_VER) // Microsoft Visual C++ diff --git a/src/share/vm/memory/allocation.cpp b/src/share/vm/memory/allocation.cpp index 6a80c4738..5230a459e 100644 --- a/src/share/vm/memory/allocation.cpp +++ b/src/share/vm/memory/allocation.cpp @@ -45,6 +45,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/memory/allocation.hpp b/src/share/vm/memory/allocation.hpp index aa916660d..316b8cdca 100644 --- a/src/share/vm/memory/allocation.hpp +++ b/src/share/vm/memory/allocation.hpp @@ -220,8 +220,11 @@ template class CHeapObj ALLOCATION_SUPER_CLASS_SPEC { class StackObj ALLOCATION_SUPER_CLASS_SPEC { private: void* operator new(size_t size); - void operator delete(void* p); void* operator new [](size_t size); +#ifdef __IBMCPP__ + public: +#endif + void operator delete(void* p); void operator delete [](void* p); }; diff --git a/src/share/vm/memory/space.hpp b/src/share/vm/memory/space.hpp index eb1e209a8..3a22815c7 100644 --- a/src/share/vm/memory/space.hpp +++ b/src/share/vm/memory/space.hpp @@ -45,6 +45,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/memory/universe.cpp b/src/share/vm/memory/universe.cpp index 511610bd3..b60f22f52 100644 --- a/src/share/vm/memory/universe.cpp +++ b/src/share/vm/memory/universe.cpp @@ -747,7 +747,7 @@ char* Universe::preferred_heap_base(size_t heap_size, NARROW_OOP_MODE mode) { // the correct no-access prefix. // The final value will be set in initialize_heap() below. Universe::set_narrow_oop_base((address)NarrowOopHeapMax); -#ifdef _WIN64 +#if defined(_WIN64) || defined(AIX) if (UseLargePages) { // Cannot allocate guard pages for implicit checks in indexed // addressing mode when large pages are specified on windows. @@ -825,6 +825,11 @@ jint Universe::initialize_heap() { // Can't reserve heap below 32Gb. // keep the Universe::narrow_oop_base() set in Universe::reserve_heap() Universe::set_narrow_oop_shift(LogMinObjAlignmentInBytes); +#ifdef AIX + // There is no protected page before the heap. This assures all oops + // are decoded so that NULL is preserved, so this page will not be accessed. + Universe::set_narrow_oop_use_implicit_null_checks(false); +#endif if (verbose) { tty->print(", %s: "PTR_FORMAT, narrow_oop_mode_to_string(HeapBasedNarrowOop), diff --git a/src/share/vm/oops/typeArrayOop.hpp b/src/share/vm/oops/typeArrayOop.hpp index cee2b8a5e..29ad6cd5c 100644 --- a/src/share/vm/oops/typeArrayOop.hpp +++ b/src/share/vm/oops/typeArrayOop.hpp @@ -51,6 +51,9 @@ #ifdef TARGET_OS_ARCH_linux_ppc # include "orderAccess_linux_ppc.inline.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "orderAccess_aix_ppc.inline.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "orderAccess_bsd_x86.inline.hpp" #endif diff --git a/src/share/vm/opto/c2_globals.hpp b/src/share/vm/opto/c2_globals.hpp index 1acbd0a03..80f1e49c1 100644 --- a/src/share/vm/opto/c2_globals.hpp +++ b/src/share/vm/opto/c2_globals.hpp @@ -47,6 +47,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "c2_globals_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "c2_globals_aix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "c2_globals_bsd.hpp" #endif diff --git a/src/share/vm/prims/jvm.cpp b/src/share/vm/prims/jvm.cpp index caed2d136..776337be3 100644 --- a/src/share/vm/prims/jvm.cpp +++ b/src/share/vm/prims/jvm.cpp @@ -76,6 +76,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "jvm_windows.h" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "jvm_aix.h" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "jvm_bsd.h" #endif diff --git a/src/share/vm/prims/jvm.h b/src/share/vm/prims/jvm.h index 6248f4d79..0e2a27f11 100644 --- a/src/share/vm/prims/jvm.h +++ b/src/share/vm/prims/jvm.h @@ -35,6 +35,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "jvm_windows.h" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "jvm_aix.h" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "jvm_bsd.h" #endif diff --git a/src/share/vm/prims/nativeLookup.cpp b/src/share/vm/prims/nativeLookup.cpp index 990600eea..c4cd3d8d2 100644 --- a/src/share/vm/prims/nativeLookup.cpp +++ b/src/share/vm/prims/nativeLookup.cpp @@ -50,6 +50,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/runtime/arguments.cpp b/src/share/vm/runtime/arguments.cpp index 0662b6912..15165d629 100644 --- a/src/share/vm/runtime/arguments.cpp +++ b/src/share/vm/runtime/arguments.cpp @@ -49,6 +49,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/runtime/atomic.cpp b/src/share/vm/runtime/atomic.cpp index 87c80ad33..8572afab3 100644 --- a/src/share/vm/runtime/atomic.cpp +++ b/src/share/vm/runtime/atomic.cpp @@ -33,6 +33,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/runtime/atomic.inline.hpp b/src/share/vm/runtime/atomic.inline.hpp index e89bf0c08..290671945 100644 --- a/src/share/vm/runtime/atomic.inline.hpp +++ b/src/share/vm/runtime/atomic.inline.hpp @@ -57,6 +57,11 @@ # include "atomic_windows_x86.inline.hpp" #endif +// AIX +#ifdef TARGET_OS_ARCH_aix_ppc +# include "atomic_aix_ppc.inline.hpp" +#endif + // BSD #ifdef TARGET_OS_ARCH_bsd_x86 # include "atomic_bsd_x86.inline.hpp" diff --git a/src/share/vm/runtime/globals.hpp b/src/share/vm/runtime/globals.hpp index 5db2fdc42..7af2b4372 100644 --- a/src/share/vm/runtime/globals.hpp +++ b/src/share/vm/runtime/globals.hpp @@ -61,6 +61,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "globals_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "globals_aix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "globals_bsd.hpp" #endif @@ -88,6 +91,9 @@ #ifdef TARGET_OS_ARCH_linux_ppc # include "globals_linux_ppc.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "globals_aix_ppc.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "globals_bsd_x86.hpp" #endif @@ -116,6 +122,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "c1_globals_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "c1_globals_aix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "c1_globals_bsd.hpp" #endif @@ -130,6 +139,9 @@ #ifdef TARGET_ARCH_arm # include "c2_globals_arm.hpp" #endif +#ifdef TARGET_ARCH_ppc +# include "c2_globals_ppc.hpp" +#endif #ifdef TARGET_OS_FAMILY_linux # include "c2_globals_linux.hpp" #endif @@ -139,6 +151,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "c2_globals_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "c2_globals_aix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "c2_globals_bsd.hpp" #endif diff --git a/src/share/vm/runtime/interfaceSupport.hpp b/src/share/vm/runtime/interfaceSupport.hpp index 0c48e5181..383f83359 100644 --- a/src/share/vm/runtime/interfaceSupport.hpp +++ b/src/share/vm/runtime/interfaceSupport.hpp @@ -107,6 +107,9 @@ class InterfaceSupport: AllStatic { #ifdef TARGET_OS_FAMILY_windows # include "interfaceSupport_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "interfaceSupport_aix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "interfaceSupport_bsd.hpp" #endif diff --git a/src/share/vm/runtime/javaFrameAnchor.hpp b/src/share/vm/runtime/javaFrameAnchor.hpp index 8374aa2a9..f6340923e 100644 --- a/src/share/vm/runtime/javaFrameAnchor.hpp +++ b/src/share/vm/runtime/javaFrameAnchor.hpp @@ -50,6 +50,9 @@ #ifdef TARGET_OS_ARCH_linux_ppc # include "orderAccess_linux_ppc.inline.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "orderAccess_aix_ppc.inline.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "orderAccess_bsd_x86.inline.hpp" #endif diff --git a/src/share/vm/runtime/mutexLocker.hpp b/src/share/vm/runtime/mutexLocker.hpp index 7a2e240bd..c0100ce97 100644 --- a/src/share/vm/runtime/mutexLocker.hpp +++ b/src/share/vm/runtime/mutexLocker.hpp @@ -36,6 +36,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/runtime/os.hpp b/src/share/vm/runtime/os.hpp index 03497e197..121259e5f 100644 --- a/src/share/vm/runtime/os.hpp +++ b/src/share/vm/runtime/os.hpp @@ -41,6 +41,10 @@ #ifdef TARGET_OS_FAMILY_windows # include "jvm_windows.h" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "jvm_aix.h" +# include +#endif #ifdef TARGET_OS_FAMILY_bsd # include "jvm_bsd.h" # include @@ -750,6 +754,10 @@ class os: AllStatic { #ifdef TARGET_OS_FAMILY_windows # include "os_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.hpp" +# include "os_posix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_posix.hpp" # include "os_bsd.hpp" @@ -778,6 +786,9 @@ class os: AllStatic { #ifdef TARGET_OS_ARCH_linux_ppc # include "os_linux_ppc.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "os_aix_ppc.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "os_bsd_x86.hpp" #endif diff --git a/src/share/vm/runtime/osThread.hpp b/src/share/vm/runtime/osThread.hpp index 1dfcb3761..02f3c0203 100644 --- a/src/share/vm/runtime/osThread.hpp +++ b/src/share/vm/runtime/osThread.hpp @@ -105,6 +105,9 @@ class OSThread: public CHeapObj { #ifdef TARGET_OS_FAMILY_windows # include "osThread_windows.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "osThread_aix.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "osThread_bsd.hpp" #endif diff --git a/src/share/vm/runtime/sharedRuntimeTrans.cpp b/src/share/vm/runtime/sharedRuntimeTrans.cpp index 6390ae1a0..d3a795b15 100644 --- a/src/share/vm/runtime/sharedRuntimeTrans.cpp +++ b/src/share/vm/runtime/sharedRuntimeTrans.cpp @@ -56,10 +56,12 @@ # define __LO(x) *(1+(int*)&x) #endif +#if !defined(AIX) double copysign(double x, double y) { __HI(x) = (__HI(x)&0x7fffffff)|(__HI(y)&0x80000000); return x; } +#endif /* * ==================================================== @@ -85,6 +87,7 @@ two54 = 1.80143985094819840000e+16, /* 0x43500000, 0x00000000 */ hugeX = 1.0e+300, tiny = 1.0e-300; +#if !defined(AIX) double scalbn (double x, int n) { int k,hx,lx; hx = __HI(x); @@ -111,6 +114,7 @@ double scalbn (double x, int n) { __HI(x) = (hx&0x800fffff)|(k<<20); return x*twom54; } +#endif /* __ieee754_log(x) * Return the logrithm of x diff --git a/src/share/vm/runtime/sharedRuntimeTrig.cpp b/src/share/vm/runtime/sharedRuntimeTrig.cpp index 74ed30cb0..a3590df87 100644 --- a/src/share/vm/runtime/sharedRuntimeTrig.cpp +++ b/src/share/vm/runtime/sharedRuntimeTrig.cpp @@ -658,7 +658,7 @@ C6 = -1.13596475577881948265e-11; /* 0xBDA8FAE9, 0xBE8838D4 */ static double __kernel_cos(double x, double y) { - double a,hz,z,r,qx; + double a,h,z,r,qx; int ix; ix = __HI(x)&0x7fffffff; /* ix = |x|'s high word*/ if(ix<0x3e400000) { /* if x < 2**27 */ @@ -675,9 +675,9 @@ static double __kernel_cos(double x, double y) __HI(qx) = ix-0x00200000; /* x/4 */ __LO(qx) = 0; } - hz = 0.5*z-qx; - a = one-qx; - return a - (hz - (z*r-x*y)); + h = 0.5*z-qx; + a = one-qx; + return a - (h - (z*r-x*y)); } } diff --git a/src/share/vm/runtime/thread.hpp b/src/share/vm/runtime/thread.hpp index a67b8a43a..cdff326c4 100644 --- a/src/share/vm/runtime/thread.hpp +++ b/src/share/vm/runtime/thread.hpp @@ -1730,6 +1730,9 @@ public: #ifdef TARGET_OS_ARCH_linux_ppc # include "thread_linux_ppc.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "thread_aix_ppc.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "thread_bsd_x86.hpp" #endif diff --git a/src/share/vm/runtime/thread.inline.hpp b/src/share/vm/runtime/thread.inline.hpp index 30b02dbcb..2a95d70b6 100644 --- a/src/share/vm/runtime/thread.inline.hpp +++ b/src/share/vm/runtime/thread.inline.hpp @@ -37,6 +37,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "thread_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "thread_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "thread_bsd.inline.hpp" #endif diff --git a/src/share/vm/runtime/threadLocalStorage.hpp b/src/share/vm/runtime/threadLocalStorage.hpp index c2f7a9e4c..0f570f3d3 100644 --- a/src/share/vm/runtime/threadLocalStorage.hpp +++ b/src/share/vm/runtime/threadLocalStorage.hpp @@ -68,6 +68,9 @@ class ThreadLocalStorage : AllStatic { #ifdef TARGET_OS_ARCH_linux_ppc # include "threadLS_linux_ppc.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "threadLS_aix_ppc.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "threadLS_bsd_x86.hpp" #endif diff --git a/src/share/vm/runtime/timer.cpp b/src/share/vm/runtime/timer.cpp index 12c32660b..ccb3322ce 100644 --- a/src/share/vm/runtime/timer.cpp +++ b/src/share/vm/runtime/timer.cpp @@ -35,6 +35,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/runtime/virtualspace.cpp b/src/share/vm/runtime/virtualspace.cpp index 9096a034c..30961c12c 100644 --- a/src/share/vm/runtime/virtualspace.cpp +++ b/src/share/vm/runtime/virtualspace.cpp @@ -36,6 +36,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/runtime/vmStructs.cpp b/src/share/vm/runtime/vmStructs.cpp index 8f7e78ef3..9a6dc0528 100644 --- a/src/share/vm/runtime/vmStructs.cpp +++ b/src/share/vm/runtime/vmStructs.cpp @@ -143,6 +143,9 @@ #ifdef TARGET_OS_ARCH_linux_ppc # include "vmStructs_linux_ppc.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "vmStructs_aix_ppc.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "vmStructs_bsd_x86.hpp" #endif diff --git a/src/share/vm/runtime/vm_version.cpp b/src/share/vm/runtime/vm_version.cpp index e7d082d9f..cdc05a3e0 100644 --- a/src/share/vm/runtime/vm_version.cpp +++ b/src/share/vm/runtime/vm_version.cpp @@ -177,6 +177,7 @@ const char* Abstract_VM_Version::jre_release_version() { #define OS LINUX_ONLY("linux") \ WINDOWS_ONLY("windows") \ SOLARIS_ONLY("solaris") \ + AIX_ONLY("aix") \ BSD_ONLY("bsd") #ifdef ZERO @@ -237,6 +238,9 @@ const char* Abstract_VM_Version::internal_vm_info_string() { #endif #elif defined(__GNUC__) #define HOTSPOT_BUILD_COMPILER "gcc " __VERSION__ + #elif defined(__IBMCPP__) + #define HOTSPOT_BUILD_COMPILER "xlC " XSTR(__IBMCPP__) + #else #define HOTSPOT_BUILD_COMPILER "unknown compiler" #endif diff --git a/src/share/vm/utilities/accessFlags.cpp b/src/share/vm/utilities/accessFlags.cpp index 6ae8e74c2..d9279428e 100644 --- a/src/share/vm/utilities/accessFlags.cpp +++ b/src/share/vm/utilities/accessFlags.cpp @@ -34,6 +34,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/utilities/bitMap.cpp b/src/share/vm/utilities/bitMap.cpp index 01825d302..23f8e5518 100644 --- a/src/share/vm/utilities/bitMap.cpp +++ b/src/share/vm/utilities/bitMap.cpp @@ -35,6 +35,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/utilities/debug.hpp b/src/share/vm/utilities/debug.hpp index 2450c8fe1..bb4f032c8 100644 --- a/src/share/vm/utilities/debug.hpp +++ b/src/share/vm/utilities/debug.hpp @@ -25,8 +25,8 @@ #ifndef SHARE_VM_UTILITIES_DEBUG_HPP #define SHARE_VM_UTILITIES_DEBUG_HPP -#include "prims/jvm.h" #include "utilities/globalDefinitions.hpp" +#include "prims/jvm.h" #include diff --git a/src/share/vm/utilities/decoder.cpp b/src/share/vm/utilities/decoder.cpp index 5489fe6fe..e4e466bad 100644 --- a/src/share/vm/utilities/decoder.cpp +++ b/src/share/vm/utilities/decoder.cpp @@ -33,6 +33,8 @@ #include "decoder_windows.hpp" #elif defined(__APPLE__) #include "decoder_machO.hpp" +#elif defined(AIX) + #include "decoder_aix.hpp" #else #include "decoder_elf.hpp" #endif @@ -67,6 +69,8 @@ AbstractDecoder* Decoder::create_decoder() { decoder = new (std::nothrow) WindowsDecoder(); #elif defined (__APPLE__) decoder = new (std::nothrow)MachODecoder(); +#elif defined(AIX) + decoder = new (std::nothrow)AIXDecoder(); #else decoder = new (std::nothrow)ElfDecoder(); #endif diff --git a/src/share/vm/utilities/globalDefinitions.hpp b/src/share/vm/utilities/globalDefinitions.hpp index 181e80a08..93f1f961c 100644 --- a/src/share/vm/utilities/globalDefinitions.hpp +++ b/src/share/vm/utilities/globalDefinitions.hpp @@ -38,6 +38,9 @@ #ifdef TARGET_COMPILER_sparcWorks # include "utilities/globalDefinitions_sparcWorks.hpp" #endif +#ifdef TARGET_COMPILER_xlc +# include "utilities/globalDefinitions_xlc.hpp" +#endif #include "utilities/macros.hpp" diff --git a/src/share/vm/utilities/histogram.hpp b/src/share/vm/utilities/histogram.hpp index a969ed457..c03d48893 100644 --- a/src/share/vm/utilities/histogram.hpp +++ b/src/share/vm/utilities/histogram.hpp @@ -37,6 +37,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif diff --git a/src/share/vm/utilities/macros.hpp b/src/share/vm/utilities/macros.hpp index 5d5609725..0a061494c 100644 --- a/src/share/vm/utilities/macros.hpp +++ b/src/share/vm/utilities/macros.hpp @@ -254,6 +254,14 @@ #define NOT_LINUX(code) code #endif +#ifdef AIX +#define AIX_ONLY(code) code +#define NOT_AIX(code) +#else +#define AIX_ONLY(code) +#define NOT_AIX(code) code +#endif + #ifdef SOLARIS #define SOLARIS_ONLY(code) code #define NOT_SOLARIS(code) diff --git a/src/share/vm/utilities/ostream.cpp b/src/share/vm/utilities/ostream.cpp index 2f04fa0e4..8c5bc3363 100644 --- a/src/share/vm/utilities/ostream.cpp +++ b/src/share/vm/utilities/ostream.cpp @@ -39,6 +39,9 @@ #ifdef TARGET_OS_FAMILY_windows # include "os_windows.inline.hpp" #endif +#ifdef TARGET_OS_FAMILY_aix +# include "os_aix.inline.hpp" +#endif #ifdef TARGET_OS_FAMILY_bsd # include "os_bsd.inline.hpp" #endif @@ -1040,7 +1043,7 @@ bufferedStream::~bufferedStream() { #ifndef PRODUCT -#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE) +#if defined(SOLARIS) || defined(LINUX) || defined(AIX) || defined(_ALLBSD_SOURCE) #include #include #include diff --git a/src/share/vm/utilities/resourceHash.hpp b/src/share/vm/utilities/resourceHash.hpp index 87cc8ffdb..2fe5dec94 100644 --- a/src/share/vm/utilities/resourceHash.hpp +++ b/src/share/vm/utilities/resourceHash.hpp @@ -44,8 +44,12 @@ template bool primitive_equals(const K& k0, const K& k1) { template< typename K, typename V, - typename ResourceHashtableFns::hash_fn HASH = primitive_hash, - typename ResourceHashtableFns::equals_fn EQUALS = primitive_equals, + // xlC does not compile this: + // http://stackoverflow.com/questions/8532961/template-argument-of-type-that-is-defined-by-inner-typedef-from-other-template-c + //typename ResourceHashtableFns::hash_fn HASH = primitive_hash, + //typename ResourceHashtableFns::equals_fn EQUALS = primitive_equals, + unsigned (*HASH) (K const&) = primitive_hash, + bool (*EQUALS)(K const&, K const&) = primitive_equals, unsigned SIZE = 256 > class ResourceHashtable : public ResourceObj { diff --git a/src/share/vm/utilities/taskqueue.hpp b/src/share/vm/utilities/taskqueue.hpp index d3eafd5de..84e61aeb9 100644 --- a/src/share/vm/utilities/taskqueue.hpp +++ b/src/share/vm/utilities/taskqueue.hpp @@ -53,6 +53,9 @@ #ifdef TARGET_OS_ARCH_linux_ppc # include "orderAccess_linux_ppc.inline.hpp" #endif +#ifdef TARGET_OS_ARCH_aix_ppc +# include "orderAccess_aix_ppc.inline.hpp" +#endif #ifdef TARGET_OS_ARCH_bsd_x86 # include "orderAccess_bsd_x86.inline.hpp" #endif -- GitLab