changeset 493:a8cb0e14256a

meth-lazy: fixed 32-bit SPARC C1 problem
author twisti
date Mon, 23 Jul 2012 10:12:57 -0700
parents 8680e3b4be3b
children b078b2c12089
files meth-lazy-7023639.review.patch
diffstat 1 files changed, 112 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/meth-lazy-7023639.review.patch	Fri Jul 20 14:39:12 2012 -0700
+++ b/meth-lazy-7023639.review.patch	Mon Jul 23 10:12:57 2012 -0700
@@ -416,6 +416,51 @@
 -    return senderPCField.getValue(addr);
 -  }
 -}
+diff --git a/make/solaris/makefiles/fastdebug.make b/make/solaris/makefiles/fastdebug.make
+--- a/make/solaris/makefiles/fastdebug.make
++++ b/make/solaris/makefiles/fastdebug.make
+@@ -36,6 +36,11 @@
+ ifeq ("${Platform_compiler}", "sparcWorks")
+ OPT_CFLAGS/SLOWER = -xO2
+ 
++ifeq ($(COMPILER_REV_NUMERIC), 510)
++# CC 5.10 has bug XXXXX with -xO4
++OPT_CFLAGS/jvmtiClassFileReconstituter.o = $(OPT_CFLAGS/SLOWER)
++endif # COMPILER_REV_NUMERIC == 510
++
+ ifeq ($(COMPILER_REV_NUMERIC), 509)
+ # To avoid jvm98 crash
+ OPT_CFLAGS/instanceKlass.o = $(OPT_CFLAGS/SLOWER)
+diff --git a/make/solaris/makefiles/optimized.make b/make/solaris/makefiles/optimized.make
+--- a/make/solaris/makefiles/optimized.make
++++ b/make/solaris/makefiles/optimized.make
+@@ -32,6 +32,11 @@
+ # (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
+ ifeq ("${Platform_compiler}", "sparcWorks")
+ 
++ifeq ($(COMPILER_REV_NUMERIC), 510)
++# CC 5.10 has bug XXXXX with -xO4
++OPT_CFLAGS/jvmtiClassFileReconstituter.o = $(OPT_CFLAGS/O2)
++endif # COMPILER_REV_NUMERIC == 510
++
+ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+ # dtrace cannot handle tail call optimization (6672627, 6693876)
+ OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
+diff --git a/make/solaris/makefiles/product.make b/make/solaris/makefiles/product.make
+--- a/make/solaris/makefiles/product.make
++++ b/make/solaris/makefiles/product.make
+@@ -40,6 +40,11 @@
+ # (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files)
+ ifeq ("${Platform_compiler}", "sparcWorks")
+ 
++ifeq ($(COMPILER_REV_NUMERIC), 510)
++# CC 5.10 has bug XXXXX with -xO4
++OPT_CFLAGS/jvmtiClassFileReconstituter.o = $(OPT_CFLAGS/O2)
++endif # COMPILER_REV_NUMERIC == 510
++
+ ifeq ($(shell expr $(COMPILER_REV_NUMERIC) \>= 509), 1)
+ # dtrace cannot handle tail call optimization (6672627, 6693876)
+ OPT_CFLAGS/jni.o = $(OPT_CFLAGS/DEFAULT) $(OPT_CCFLAGS/NO_TAIL_CALL_OPT)
 diff --git a/src/cpu/sparc/vm/interpreter_sparc.cpp b/src/cpu/sparc/vm/interpreter_sparc.cpp
 --- a/src/cpu/sparc/vm/interpreter_sparc.cpp
 +++ b/src/cpu/sparc/vm/interpreter_sparc.cpp
@@ -473,7 +518,71 @@
 diff --git a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
 --- a/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
 +++ b/src/cpu/sparc/vm/sharedRuntime_sparc.cpp
-@@ -888,15 +888,15 @@
+@@ -400,13 +400,13 @@
+     case T_LONG:                // LP64, longs compete with int args
+       assert(sig_bt[i+1] == T_VOID, "");
+ #ifdef _LP64
+-      if (int_reg_cnt < int_reg_max) int_reg_cnt++;
++      if (int_reg_cnt < int_reg_max)  int_reg_cnt++;
+ #endif
+       break;
+     case T_OBJECT:
+     case T_ARRAY:
+     case T_ADDRESS: // Used, e.g., in slow-path locking for the lock's stack address
+-      if (int_reg_cnt < int_reg_max) int_reg_cnt++;
++      if (int_reg_cnt < int_reg_max)  int_reg_cnt++;
+ #ifndef _LP64
+       else                            stk_reg_pairs++;
+ #endif
+@@ -416,11 +416,11 @@
+     case T_CHAR:
+     case T_BYTE:
+     case T_BOOLEAN:
+-      if (int_reg_cnt < int_reg_max) int_reg_cnt++;
++      if (int_reg_cnt < int_reg_max)  int_reg_cnt++;
+       else                            stk_reg_pairs++;
+       break;
+     case T_FLOAT:
+-      if (flt_reg_cnt < flt_reg_max) flt_reg_cnt++;
++      if (flt_reg_cnt < flt_reg_max)  flt_reg_cnt++;
+       else                            stk_reg_pairs++;
+       break;
+     case T_DOUBLE:
+@@ -436,7 +436,6 @@
+   // This is where the longs/doubles start on the stack.
+   stk_reg_pairs = (stk_reg_pairs+1) & ~1; // Round
+ 
+-  int int_reg_pairs = (int_reg_cnt+1) & ~1; // 32-bit 2-reg longs only
+   int flt_reg_pairs = (flt_reg_cnt+1) & ~1;
+ 
+   // int stk_reg = frame::register_save_words*(wordSize>>2);
+@@ -517,24 +516,15 @@
+           stk_reg_pairs += 2;
+         }
+ #else // COMPILER2
+-        if (int_reg_pairs + 1 < int_reg_max) {
+-          if (is_outgoing) {
+-            regs[i].set_pair(as_oRegister(int_reg_pairs + 1)->as_VMReg(), as_oRegister(int_reg_pairs)->as_VMReg());
+-          } else {
+-            regs[i].set_pair(as_iRegister(int_reg_pairs + 1)->as_VMReg(), as_iRegister(int_reg_pairs)->as_VMReg());
+-          }
+-          int_reg_pairs += 2;
+-        } else {
+           regs[i].set2(VMRegImpl::stack2reg(stk_reg_pairs));
+           stk_reg_pairs += 2;
+-        }
+ #endif // COMPILER2
+ #endif // _LP64
+       break;
+ 
+     case T_FLOAT:
+       if (flt_reg < flt_reg_max) regs[i].set1(as_FloatRegister(flt_reg++)->as_VMReg());
+-      else                       regs[i].set1(    VMRegImpl::stack2reg(stk_reg++));
++      else                       regs[i].set1(VMRegImpl::stack2reg(stk_reg++));
+       break;
+     case T_DOUBLE:
+       assert(sig_bt[i+1] == T_VOID, "expecting half");
+@@ -888,15 +878,15 @@
  
  static void range_check(MacroAssembler* masm, Register pc_reg, Register temp_reg, Register temp2_reg,
                          address code_start, address code_end,
@@ -494,7 +603,7 @@
    __ bind(L_fail);
  }
  
-@@ -946,22 +946,19 @@
+@@ -946,22 +936,19 @@
      //         StubRoutines::contains($return_addr),
      //         "i2c adapter must return to an interpreter frame");
      __ block_comment("verify_i2c { ");
@@ -521,7 +630,7 @@
      const char* msg = "i2c adapter must return to an interpreter frame";
      __ block_comment(msg);
      __ stop(msg);
-@@ -2044,7 +2041,7 @@
+@@ -2044,7 +2031,7 @@
    } else if (special_dispatch == vmIntrinsics::_invokeBasic) {
      has_receiver = true;
    } else {