changeset 473:a3668184eaae

meth: fix register crush on x86_32, rebase for annot
author jrose
date Wed, 11 Jul 2012 17:18:25 -0700
parents 34aa8c19bcaa
children c748a6624c8b
files meth-lazy-7023639.patch
diffstat 1 files changed, 19 insertions(+), 21 deletions(-) [+]
line wrap: on
line diff
--- a/meth-lazy-7023639.patch	Wed Jul 11 17:17:50 2012 -0700
+++ b/meth-lazy-7023639.patch	Wed Jul 11 17:18:25 2012 -0700
@@ -5487,7 +5487,7 @@
      Label run_compiled_code;
      // JVMTI events, such as single-stepping, are implemented partly by avoiding running
      // compiled code in threads for which the event is enabled.  Check here for
-@@ -567,462 +138,377 @@
+@@ -567,462 +138,379 @@
      __ cmpb(Address(rthread, JavaThread::interp_only_mode_offset()), 0);
      __ jccb(Assembler::zero, run_compiled_code);
      __ jmp(Address(method, methodOopDesc::interpreter_entry_offset()));
@@ -5936,7 +5936,7 @@
 -    __ stop("valid bounds (copy up)");
 -    __ BIND(L_ok);
 +#else
-+  Register temp1 = rsi;
++  Register temp1 = (for_compiler_entry ? rsi : rdx);
 +  Register temp2 = rdi;
 +  Register temp3 = rax;
 +  if (for_compiler_entry) {
@@ -5964,6 +5964,8 @@
 -}
 +  assert_different_registers(temp1, temp2, temp3, receiver_reg);
 +  assert_different_registers(temp1, temp2, temp3, member_reg);
++  if (!for_compiler_entry)
++    assert_different_registers(temp1, temp2, temp3, saved_last_sp_register());  // don't trash lastSP
  
 -// in-place movement; no change to rsp
 -// blows rax_temp, rdx_temp
@@ -6281,7 +6283,7 @@
  
    if (Verbose) {
      tty->print_cr("Registers:");
-@@ -1086,12 +572,18 @@
+@@ -1086,12 +574,18 @@
          values.describe(-1, dump_fp, "fp for #1 <not parsed, cannot trust pc>");
          values.describe(-1, dump_sp, "sp for #1");
        }
@@ -6302,7 +6304,7 @@
    }
  }
  
-@@ -1159,1363 +651,3 @@
+@@ -1159,1363 +653,3 @@
  }
  #endif //PRODUCT
  
@@ -10311,11 +10313,10 @@
    assert(!callee->is_native(), "callee must not be native");
    if (CompilationPolicy::policy()->should_not_inline(compilation()->env(), callee)) {
      INLINE_BAILOUT("inlining prohibited by policy");
-@@ -3507,10 +3599,10 @@
+@@ -3507,9 +3599,10 @@
    // now perform tests that are based on flag settings
    if (callee->force_inline() || callee->should_inline()) {
      // ignore heuristic controls on inlining
--    _inline_bailout_msg = "forced inlining";
 +    print_inlining(callee, "force inline by annotation");
    } else {
 -    if (inline_level() > MaxInlineLevel                         ) INLINE_BAILOUT("too-deep inlining");
@@ -10325,7 +10326,7 @@
      if (callee->code_size_for_inlining() > max_inline_size()    ) INLINE_BAILOUT("callee is too large");
  
      // don't inline throwable methods unless the inlining tree is rooted in a throwable class
-@@ -3529,28 +3621,25 @@
+@@ -3528,28 +3621,25 @@
      if (compilation()->env()->num_inlined_bytecodes() > DesiredMethodLimit) {
        INLINE_BAILOUT("total inlining greater than DesiredMethodLimit");
      }
@@ -10360,7 +10361,7 @@
      // note: null check must happen even if first instruction of callee does
      //       an implicit null check since the callee is in a different scope
      //       and we must make sure exception handling does the right thing
-@@ -3566,7 +3655,7 @@
+@@ -3565,7 +3655,7 @@
      compilation()->set_would_profile(true);
  
      if (profile_calls()) {
@@ -10369,7 +10370,7 @@
      }
    }
  
-@@ -3575,7 +3664,7 @@
+@@ -3574,7 +3664,7 @@
    // fall-through of control flow, all return instructions of the
    // callee will need to be replaced by Goto's pointing to this
    // continuation point.
@@ -10378,7 +10379,7 @@
    bool continuation_existed = true;
    if (cont == NULL) {
      cont = new BlockBegin(next_bci());
-@@ -3608,17 +3697,10 @@
+@@ -3607,17 +3697,10 @@
    // note: this will also ensure that all arguments are computed before being passed
    ValueStack* callee_state = state();
    ValueStack* caller_state = state()->caller_state();
@@ -10400,7 +10401,7 @@
    }
  
    // Remove args from stack.
-@@ -3694,29 +3776,27 @@
+@@ -3693,29 +3776,27 @@
    // block merging. This allows load elimination and CSE to take place
    // across multiple callee scopes if they are relatively simple, and
    // is currently essential to making inlining profitable.
@@ -10449,7 +10450,7 @@
      }
    }
  
-@@ -3734,114 +3814,88 @@
+@@ -3733,114 +3814,88 @@
  
  
  bool GraphBuilder::for_method_handle_inline(ciMethod* callee) {
@@ -10641,7 +10642,7 @@
    return false;
  }
  
-@@ -4033,22 +4087,24 @@
+@@ -4032,22 +4087,24 @@
  }
  
  
@@ -12017,12 +12018,9 @@
    index += 2;  // skip atype
    if ((index += 2) >= limit)  return limit;  // read nmem
    int nmem = Bytes::get_Java_u2(buffer+index-2);
-@@ -1776,8 +1776,17 @@
-   vmSymbols::SID sid = vmSymbols::find_sid(name);
-   switch (sid) {
+@@ -1777,6 +1777,15 @@
    case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_ForceInline_signature):
--    if (_location != _in_class)  break;
-+    if (_location != _in_method)  break;  // only allow for methods
+     if (_location != _in_method)  break;  // only allow for methods
      return _method_ForceInline;
 +  case vmSymbols::VM_SYMBOL_ENUM_NAME(java_lang_invoke_DontInline_signature):
 +    if (_location != _in_method)  break;  // only allow for methods
@@ -12036,7 +12034,7 @@
    default: break;
    }
    return AnnotationCollector::_unknown;
-@@ -1790,6 +1799,12 @@
+@@ -1789,6 +1798,12 @@
  void ClassFileParser::MethodAnnotationCollector::apply_to(methodHandle m) {
    if (has_annotation(_method_ForceInline))
      m->set_force_inline(true);
@@ -12049,7 +12047,7 @@
  }
  
  void ClassFileParser::ClassAnnotationCollector::apply_to(instanceKlassHandle k) {
-@@ -2210,6 +2225,9 @@
+@@ -2209,6 +2224,9 @@
    // Copy byte codes
    m->set_code(code_start);
  
@@ -12059,7 +12057,7 @@
    // Copy line number table
    if (linenumber_table != NULL) {
      memcpy(m->compressed_linenumber_table(),
-@@ -2329,12 +2347,6 @@
+@@ -2328,12 +2346,6 @@
      _has_vanilla_constructor = true;
    }