8023033: PPC64 (part 13): basic changes for AIX
authorgoetz
Thu, 22 Aug 2013 09:39:54 -0700
changeset 22827 07d991d45a51
parent 22826 3ee6886e718d
child 22828 17ecb098bc1e
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
hotspot/src/os/posix/vm/os_posix.cpp
hotspot/src/share/vm/c1/c1_globals.hpp
hotspot/src/share/vm/classfile/classLoader.cpp
hotspot/src/share/vm/code/nmethod.cpp
hotspot/src/share/vm/code/relocInfo.hpp
hotspot/src/share/vm/code/stubs.hpp
hotspot/src/share/vm/code/vmreg.hpp
hotspot/src/share/vm/compiler/disassembler.hpp
hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp
hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp
hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp
hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp
hotspot/src/share/vm/libadt/port.hpp
hotspot/src/share/vm/memory/allocation.cpp
hotspot/src/share/vm/memory/allocation.hpp
hotspot/src/share/vm/memory/space.hpp
hotspot/src/share/vm/memory/universe.cpp
hotspot/src/share/vm/oops/typeArrayOop.hpp
hotspot/src/share/vm/opto/c2_globals.hpp
hotspot/src/share/vm/prims/jvm.cpp
hotspot/src/share/vm/prims/jvm.h
hotspot/src/share/vm/prims/nativeLookup.cpp
hotspot/src/share/vm/runtime/arguments.cpp
hotspot/src/share/vm/runtime/atomic.cpp
hotspot/src/share/vm/runtime/atomic.inline.hpp
hotspot/src/share/vm/runtime/globals.hpp
hotspot/src/share/vm/runtime/interfaceSupport.hpp
hotspot/src/share/vm/runtime/javaFrameAnchor.hpp
hotspot/src/share/vm/runtime/mutexLocker.hpp
hotspot/src/share/vm/runtime/os.hpp
hotspot/src/share/vm/runtime/osThread.hpp
hotspot/src/share/vm/runtime/sharedRuntimeTrans.cpp
hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp
hotspot/src/share/vm/runtime/thread.hpp
hotspot/src/share/vm/runtime/thread.inline.hpp
hotspot/src/share/vm/runtime/threadLocalStorage.hpp
hotspot/src/share/vm/runtime/timer.cpp
hotspot/src/share/vm/runtime/virtualspace.cpp
hotspot/src/share/vm/runtime/vmStructs.cpp
hotspot/src/share/vm/runtime/vm_version.cpp
hotspot/src/share/vm/utilities/accessFlags.cpp
hotspot/src/share/vm/utilities/bitMap.cpp
hotspot/src/share/vm/utilities/debug.hpp
hotspot/src/share/vm/utilities/decoder.cpp
hotspot/src/share/vm/utilities/globalDefinitions.hpp
hotspot/src/share/vm/utilities/histogram.hpp
hotspot/src/share/vm/utilities/macros.hpp
hotspot/src/share/vm/utilities/ostream.cpp
hotspot/src/share/vm/utilities/resourceHash.hpp
hotspot/src/share/vm/utilities/taskqueue.hpp
--- a/hotspot/src/os/posix/vm/os_posix.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/os/posix/vm/os_posix.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -165,7 +165,7 @@
   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 @@
 #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++) {
--- a/hotspot/src/share/vm/c1/c1_globals.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/c1/c1_globals.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/classfile/classLoader.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/classfile/classLoader.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/code/nmethod.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/code/nmethod.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -799,7 +799,7 @@
 }
 #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);
 }
--- a/hotspot/src/share/vm/code/relocInfo.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/code/relocInfo.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -365,7 +365,7 @@
   // "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 @@
   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);
 }
--- a/hotspot/src/share/vm/code/stubs.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/code/stubs.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/code/vmreg.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/code/vmreg.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -73,7 +73,7 @@
 // friend class Location;
 private:
   enum {
-    BAD = -1
+    BAD_REG = -1
   };
 
 
@@ -86,7 +86,7 @@
 
 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 @@
       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(); }
 
--- a/hotspot/src/share/vm/compiler/disassembler.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/compiler/disassembler.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/adaptiveFreeList.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -122,7 +122,7 @@
 
 template <class Chunk>
 void AdaptiveFreeList<Chunk>::return_chunk_at_tail(Chunk* chunk) {
-  return_chunk_at_tail(chunk, true);
+  AdaptiveFreeList<Chunk>::return_chunk_at_tail(chunk, true);
 }
 
 template <class Chunk>
--- a/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep/cmsAdaptiveSizePolicy.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/parMarkBitMap.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/gc_implementation/parallelScavenge/psVirtualspace.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/libadt/port.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/libadt/port.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -91,8 +91,6 @@
 #define IMPLEMENTATION
 #include <stdlib.h>
 #include <memory.h>
-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++
--- a/hotspot/src/share/vm/memory/allocation.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/memory/allocation.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/memory/allocation.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/memory/allocation.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -220,8 +220,11 @@
 class StackObj ALLOCATION_SUPER_CLASS_SPEC {
  private:
   void* operator new(size_t size);
+  void* operator new [](size_t size);
+#ifdef __IBMCPP__
+ public:
+#endif
   void  operator delete(void* p);
-  void* operator new [](size_t size);
   void  operator delete [](void* p);
 };
 
--- a/hotspot/src/share/vm/memory/space.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/memory/space.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/memory/universe.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/memory/universe.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -747,7 +747,7 @@
       // 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 @@
       // 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),
--- a/hotspot/src/share/vm/oops/typeArrayOop.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/oops/typeArrayOop.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/opto/c2_globals.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/opto/c2_globals.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/prims/jvm.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/prims/jvm.h	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/prims/jvm.h	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/prims/nativeLookup.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/prims/nativeLookup.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/atomic.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/atomic.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/atomic.inline.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/atomic.inline.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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"
--- a/hotspot/src/share/vm/runtime/globals.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/interfaceSupport.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/interfaceSupport.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -107,6 +107,9 @@
 #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
--- a/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/javaFrameAnchor.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/mutexLocker.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/mutexLocker.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/os.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/os.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -41,6 +41,10 @@
 #ifdef TARGET_OS_FAMILY_windows
 # include "jvm_windows.h"
 #endif
+#ifdef TARGET_OS_FAMILY_aix
+# include "jvm_aix.h"
+# include <setjmp.h>
+#endif
 #ifdef TARGET_OS_FAMILY_bsd
 # include "jvm_bsd.h"
 # include <setjmp.h>
@@ -750,6 +754,10 @@
 #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 @@
 #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
--- a/hotspot/src/share/vm/runtime/osThread.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/osThread.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -105,6 +105,9 @@
 #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
--- a/hotspot/src/share/vm/runtime/sharedRuntimeTrans.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/sharedRuntimeTrans.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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 @@
   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 @@
   __HI(x) = (hx&0x800fffff)|(k<<20);
   return x*twom54;
 }
+#endif
 
 /* __ieee754_log(x)
  * Return the logrithm of x
--- a/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/sharedRuntimeTrig.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -658,7 +658,7 @@
 
 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 @@
       __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));
   }
 }
 
--- a/hotspot/src/share/vm/runtime/thread.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/thread.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -1730,6 +1730,9 @@
 #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
--- a/hotspot/src/share/vm/runtime/thread.inline.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/thread.inline.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/threadLocalStorage.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/threadLocalStorage.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -68,6 +68,9 @@
 #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
--- a/hotspot/src/share/vm/runtime/timer.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/timer.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/virtualspace.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/virtualspace.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/vmStructs.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/vmStructs.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/runtime/vm_version.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/runtime/vm_version.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -177,6 +177,7 @@
 #define OS       LINUX_ONLY("linux")             \
                  WINDOWS_ONLY("windows")         \
                  SOLARIS_ONLY("solaris")         \
+                 AIX_ONLY("aix")                 \
                  BSD_ONLY("bsd")
 
 #ifdef ZERO
@@ -237,6 +238,9 @@
       #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
--- a/hotspot/src/share/vm/utilities/accessFlags.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/accessFlags.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/utilities/bitMap.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/bitMap.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/utilities/debug.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/debug.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -25,8 +25,8 @@
 #ifndef SHARE_VM_UTILITIES_DEBUG_HPP
 #define SHARE_VM_UTILITIES_DEBUG_HPP
 
+#include "utilities/globalDefinitions.hpp"
 #include "prims/jvm.h"
-#include "utilities/globalDefinitions.hpp"
 
 #include <stdarg.h>
 
--- a/hotspot/src/share/vm/utilities/decoder.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/decoder.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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 @@
   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
--- a/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/globalDefinitions.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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"
 
--- a/hotspot/src/share/vm/utilities/histogram.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/histogram.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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
--- a/hotspot/src/share/vm/utilities/macros.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/macros.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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)
--- a/hotspot/src/share/vm/utilities/ostream.cpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/ostream.cpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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 @@
 
 #ifndef PRODUCT
 
-#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE)
+#if defined(SOLARIS) || defined(LINUX) || defined(AIX) || defined(_ALLBSD_SOURCE)
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
--- a/hotspot/src/share/vm/utilities/resourceHash.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/resourceHash.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -44,8 +44,12 @@
 
 template<
     typename K, typename V,
-    typename ResourceHashtableFns<K>::hash_fn   HASH   = primitive_hash<K>,
-    typename ResourceHashtableFns<K>::equals_fn EQUALS = primitive_equals<K>,
+    // 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<K>::hash_fn   HASH   = primitive_hash<K>,
+    //typename ResourceHashtableFns<K>::equals_fn EQUALS = primitive_equals<K>,
+    unsigned (*HASH)  (K const&)           = primitive_hash<K>,
+    bool     (*EQUALS)(K const&, K const&) = primitive_equals<K>,
     unsigned SIZE = 256
     >
 class ResourceHashtable : public ResourceObj {
--- a/hotspot/src/share/vm/utilities/taskqueue.hpp	Fri Jul 26 00:59:18 2013 +0200
+++ b/hotspot/src/share/vm/utilities/taskqueue.hpp	Thu Aug 22 09:39:54 2013 -0700
@@ -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