hotspot/src/share/vm/opto/library_call.cpp
changeset 8734 2dae3d363359
parent 8728 3f1bcd33068e
parent 8732 16fc1c68714b
child 9176 42d9d1010f38
child 8872 36680c58660e
equal deleted inserted replaced
8730:c604bea19aab 8734:2dae3d363359
  1099 
  1099 
  1100   Node* no_ctrl  = NULL;
  1100   Node* no_ctrl  = NULL;
  1101   float likely   = PROB_LIKELY(0.9);
  1101   float likely   = PROB_LIKELY(0.9);
  1102   float unlikely = PROB_UNLIKELY(0.9);
  1102   float unlikely = PROB_UNLIKELY(0.9);
  1103 
  1103 
       
  1104   const int nargs = 2; // number of arguments to push back for uncommon trap in predicate
       
  1105 
  1104   const int value_offset  = java_lang_String::value_offset_in_bytes();
  1106   const int value_offset  = java_lang_String::value_offset_in_bytes();
  1105   const int count_offset  = java_lang_String::count_offset_in_bytes();
  1107   const int count_offset  = java_lang_String::count_offset_in_bytes();
  1106   const int offset_offset = java_lang_String::offset_offset_in_bytes();
  1108   const int offset_offset = java_lang_String::offset_offset_in_bytes();
  1107 
  1109 
  1108   ciInstanceKlass* klass = env()->String_klass();
  1110   ciInstanceKlass* klass = env()->String_klass();
  1136   IdealVariable rtn(kit), i(kit), j(kit); __ declarations_done();
  1138   IdealVariable rtn(kit), i(kit), j(kit); __ declarations_done();
  1137   Node* outer_loop = __ make_label(2 /* goto */);
  1139   Node* outer_loop = __ make_label(2 /* goto */);
  1138   Node* return_    = __ make_label(1);
  1140   Node* return_    = __ make_label(1);
  1139 
  1141 
  1140   __ set(rtn,__ ConI(-1));
  1142   __ set(rtn,__ ConI(-1));
  1141   __ loop(i, sourceOffset, BoolTest::lt, sourceEnd); {
  1143   __ loop(this, nargs, i, sourceOffset, BoolTest::lt, sourceEnd); {
  1142        Node* i2  = __ AddI(__ value(i), targetCountLess1);
  1144        Node* i2  = __ AddI(__ value(i), targetCountLess1);
  1143        // pin to prohibit loading of "next iteration" value which may SEGV (rare)
  1145        // pin to prohibit loading of "next iteration" value which may SEGV (rare)
  1144        Node* src = load_array_element(__ ctrl(), source, i2, TypeAryPtr::CHARS);
  1146        Node* src = load_array_element(__ ctrl(), source, i2, TypeAryPtr::CHARS);
  1145        __ if_then(src, BoolTest::eq, lastChar, unlikely); {
  1147        __ if_then(src, BoolTest::eq, lastChar, unlikely); {
  1146          __ loop(j, zero, BoolTest::lt, targetCountLess1); {
  1148          __ loop(this, nargs, j, zero, BoolTest::lt, targetCountLess1); {
  1147               Node* tpj = __ AddI(targetOffset, __ value(j));
  1149               Node* tpj = __ AddI(targetOffset, __ value(j));
  1148               Node* targ = load_array_element(no_ctrl, target, tpj, target_type);
  1150               Node* targ = load_array_element(no_ctrl, target, tpj, target_type);
  1149               Node* ipj  = __ AddI(__ value(i), __ value(j));
  1151               Node* ipj  = __ AddI(__ value(i), __ value(j));
  1150               Node* src2 = load_array_element(no_ctrl, source, ipj, TypeAryPtr::CHARS);
  1152               Node* src2 = load_array_element(no_ctrl, source, ipj, TypeAryPtr::CHARS);
  1151               __ if_then(targ, BoolTest::ne, src2); {
  1153               __ if_then(targ, BoolTest::ne, src2); {