hotspot/src/share/vm/opto/library_call.cpp
changeset 33089 f4e956ed8b43
parent 32581 632402f18fe6
child 33172 06453a29bc41
child 33155 73bf16b22e89
equal deleted inserted replaced
33088:34fe49ecee13 33089:f4e956ed8b43
   220   bool inline_math_multiplyExactL();
   220   bool inline_math_multiplyExactL();
   221   bool inline_math_negateExactI();
   221   bool inline_math_negateExactI();
   222   bool inline_math_negateExactL();
   222   bool inline_math_negateExactL();
   223   bool inline_math_subtractExactI(bool is_decrement);
   223   bool inline_math_subtractExactI(bool is_decrement);
   224   bool inline_math_subtractExactL(bool is_decrement);
   224   bool inline_math_subtractExactL(bool is_decrement);
   225   bool inline_exp();
       
   226   bool inline_pow();
   225   bool inline_pow();
   227   Node* finish_pow_exp(Node* result, Node* x, Node* y, const TypeFunc* call_type, address funcAddr, const char* funcName);
   226   Node* finish_pow_exp(Node* result, Node* x, Node* y, const TypeFunc* call_type, address funcAddr, const char* funcName);
   228   bool inline_min_max(vmIntrinsics::ID id);
   227   bool inline_min_max(vmIntrinsics::ID id);
   229   bool inline_notify(vmIntrinsics::ID id);
   228   bool inline_notify(vmIntrinsics::ID id);
   230   Node* generate_min_max(vmIntrinsics::ID id, Node* x, Node* y);
   229   Node* generate_min_max(vmIntrinsics::ID id, Node* x, Node* y);
  1533       return result;
  1532       return result;
  1534     }
  1533     }
  1535   }
  1534   }
  1536 }
  1535 }
  1537 
  1536 
  1538 //------------------------------inline_exp-------------------------------------
       
  1539 // Inline exp instructions, if possible.  The Intel hardware only misses
       
  1540 // really odd corner cases (+/- Infinity).  Just uncommon-trap them.
       
  1541 bool LibraryCallKit::inline_exp() {
       
  1542   Node* arg = round_double_node(argument(0));
       
  1543   Node* n   = _gvn.transform(new ExpDNode(C, control(), arg));
       
  1544 
       
  1545   n = finish_pow_exp(n, arg, NULL, OptoRuntime::Math_D_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dexp), "EXP");
       
  1546   set_result(n);
       
  1547 
       
  1548   C->set_has_split_ifs(true); // Has chance for split-if optimization
       
  1549   return true;
       
  1550 }
       
  1551 
       
  1552 //------------------------------inline_pow-------------------------------------
  1537 //------------------------------inline_pow-------------------------------------
  1553 // Inline power instructions, if possible.
  1538 // Inline power instructions, if possible.
  1554 bool LibraryCallKit::inline_pow() {
  1539 bool LibraryCallKit::inline_pow() {
  1555   // Pseudocode for pow
  1540   // Pseudocode for pow
  1556   // if (y == 2) {
  1541   // if (y == 2) {
  1774 
  1759 
  1775     // These intrinsics are supported on all hardware
  1760     // These intrinsics are supported on all hardware
  1776   case vmIntrinsics::_dsqrt:  return Matcher::match_rule_supported(Op_SqrtD) ? inline_math(id) : false;
  1761   case vmIntrinsics::_dsqrt:  return Matcher::match_rule_supported(Op_SqrtD) ? inline_math(id) : false;
  1777   case vmIntrinsics::_dabs:   return Matcher::has_match_rule(Op_AbsD)   ? inline_math(id) : false;
  1762   case vmIntrinsics::_dabs:   return Matcher::has_match_rule(Op_AbsD)   ? inline_math(id) : false;
  1778 
  1763 
  1779   case vmIntrinsics::_dexp:   return Matcher::has_match_rule(Op_ExpD)   ? inline_exp()    :
  1764   case vmIntrinsics::_dexp:
  1780     runtime_math(OptoRuntime::Math_D_D_Type(),  FN_PTR(SharedRuntime::dexp),  "EXP");
  1765     return (UseSSE >= 2) ? runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dexp(),  "dexp") :
       
  1766     runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dexp),  "EXP");
  1781   case vmIntrinsics::_dpow:   return Matcher::has_match_rule(Op_PowD)   ? inline_pow()    :
  1767   case vmIntrinsics::_dpow:   return Matcher::has_match_rule(Op_PowD)   ? inline_pow()    :
  1782     runtime_math(OptoRuntime::Math_DD_D_Type(), FN_PTR(SharedRuntime::dpow),  "POW");
  1768     runtime_math(OptoRuntime::Math_DD_D_Type(), FN_PTR(SharedRuntime::dpow),  "POW");
  1783 #undef FN_PTR
  1769 #undef FN_PTR
  1784 
  1770 
  1785    // These intrinsics are not yet correctly implemented
  1771    // These intrinsics are not yet correctly implemented