8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX.
authorgoetz
Fri, 05 Jul 2013 22:17:47 +0200
changeset 22819 f88b9c394e42
parent 22818 34cd99df9940
child 22820 70660a78baaf
8019973: PPC64 (part 11): Fix IA64 preprocessor conditionals on AIX. Summary: On AIX 7.1 systemcfg.h defines IA64 unconditionally, so test for !AIX where IA64 is used. Reviewed-by: dholmes, kvn
hotspot/src/share/vm/opto/generateOptoStub.cpp
hotspot/src/share/vm/opto/output.cpp
hotspot/src/share/vm/prims/forte.cpp
hotspot/src/share/vm/runtime/objectMonitor.cpp
hotspot/src/share/vm/runtime/os.cpp
hotspot/src/share/vm/runtime/synchronizer.cpp
hotspot/src/share/vm/utilities/macros.hpp
--- a/hotspot/src/share/vm/opto/generateOptoStub.cpp	Wed Jul 10 09:14:25 2013 -0700
+++ b/hotspot/src/share/vm/opto/generateOptoStub.cpp	Fri Jul 05 22:17:47 2013 +0200
@@ -214,7 +214,7 @@
 #if defined(SPARC)
   store_to_memory(NULL, adr_flags, intcon(0), T_INT, NoAlias);
 #endif /* defined(SPARC) */
-#ifdef IA64
+#if (defined(IA64) && !defined(AIX))
   Node* adr_last_Java_fp = basic_plus_adr(top(), thread, in_bytes(JavaThread::last_Java_fp_offset()));
   if( os::is_MP() ) insert_mem_bar(Op_MemBarRelease);
   store_to_memory(NULL, adr_last_Java_fp,    null(),    T_ADDRESS, NoAlias);
--- a/hotspot/src/share/vm/opto/output.cpp	Wed Jul 10 09:14:25 2013 -0700
+++ b/hotspot/src/share/vm/opto/output.cpp	Fri Jul 05 22:17:47 2013 +0200
@@ -1065,7 +1065,7 @@
   // Compute prolog code size
   _method_size = 0;
   _frame_slots = OptoReg::reg2stack(_matcher->_old_SP)+_regalloc->_framesize;
-#ifdef IA64
+#if defined(IA64) && !defined(AIX)
   if (save_argument_registers()) {
     // 4815101: this is a stub with implicit and unknown precision fp args.
     // The usual spill mechanism can only generate stfd's in this case, which
--- a/hotspot/src/share/vm/prims/forte.cpp	Wed Jul 10 09:14:25 2013 -0700
+++ b/hotspot/src/share/vm/prims/forte.cpp	Fri Jul 05 22:17:47 2013 +0200
@@ -70,7 +70,7 @@
 // Native interfaces for use by Forte tools.
 
 
-#ifndef IA64
+#if !defined(IA64) && !defined(PPC64)
 
 class vframeStreamForte : public vframeStreamCommon {
  public:
@@ -624,16 +624,16 @@
 #endif // !_WINDOWS
 
 } // end extern "C"
-#endif // !IA64
+#endif // !IA64 && !PPC64
 
 void Forte::register_stub(const char* name, address start, address end) {
-#if !defined(_WINDOWS) && !defined(IA64)
+#if !defined(_WINDOWS) && !defined(IA64) && !defined(PPC64)
   assert(pointer_delta(end, start, sizeof(jbyte)) < INT_MAX,
          "Code size exceeds maximum range");
 
   collector_func_load((char*)name, NULL, NULL, start,
     pointer_delta(end, start, sizeof(jbyte)), 0, NULL);
-#endif // !_WINDOWS && !IA64
+#endif // !_WINDOWS && !IA64 && !PPC64
 }
 
 #else // INCLUDE_JVMTI
--- a/hotspot/src/share/vm/runtime/objectMonitor.cpp	Wed Jul 10 09:14:25 2013 -0700
+++ b/hotspot/src/share/vm/runtime/objectMonitor.cpp	Fri Jul 05 22:17:47 2013 +0200
@@ -54,7 +54,7 @@
 # include "os_bsd.inline.hpp"
 #endif
 
-#if defined(__GNUC__) && !defined(IA64)
+#if defined(__GNUC__) && !defined(IA64) && !defined(PPC64)
   // Need to inhibit inlining for older versions of GCC to avoid build-time failures
   #define ATTR __attribute__((noinline))
 #else
--- a/hotspot/src/share/vm/runtime/os.cpp	Wed Jul 10 09:14:25 2013 -0700
+++ b/hotspot/src/share/vm/runtime/os.cpp	Fri Jul 05 22:17:47 2013 +0200
@@ -1020,7 +1020,7 @@
 // if C stack is walkable beyond current frame. The check for fp() is not
 // necessary on Sparc, but it's harmless.
 bool os::is_first_C_frame(frame* fr) {
-#if defined(IA64) && !defined(_WIN32)
+#if (defined(IA64) && !defined(AIX)) && !defined(_WIN32)
   // On IA64 we have to check if the callers bsp is still valid
   // (i.e. within the register stack bounds).
   // Notice: this only works for threads created by the VM and only if
--- a/hotspot/src/share/vm/runtime/synchronizer.cpp	Wed Jul 10 09:14:25 2013 -0700
+++ b/hotspot/src/share/vm/runtime/synchronizer.cpp	Fri Jul 05 22:17:47 2013 +0200
@@ -53,7 +53,7 @@
 # include "os_bsd.inline.hpp"
 #endif
 
-#if defined(__GNUC__)
+#if defined(__GNUC__) && !defined(PPC64)
   // Need to inhibit inlining for older versions of GCC to avoid build-time failures
   #define ATTR __attribute__((noinline))
 #else
--- a/hotspot/src/share/vm/utilities/macros.hpp	Wed Jul 10 09:14:25 2013 -0700
+++ b/hotspot/src/share/vm/utilities/macros.hpp	Fri Jul 05 22:17:47 2013 +0200
@@ -320,7 +320,11 @@
 #define NOT_IA32(code) code
 #endif
 
-#ifdef IA64
+// This is a REALLY BIG HACK, but on AIX <sys/systemcfg.h> unconditionally defines IA64.
+// At least on AIX 7.1 this is a real problem because 'systemcfg.h' is indirectly included
+// by 'pthread.h' and other common system headers.
+
+#if defined(IA64) && !defined(AIX)
 #define IA64_ONLY(code) code
 #define NOT_IA64(code)
 #else