1716 PhiNode* result_val = new (C) PhiNode(result_region, Type::DOUBLE); 1717 1718 result_region->init_req(1, if_fast); 1719 result_val->init_req(1, result); 1720 1721 set_control(if_slow); 1722 1723 const TypePtr* no_memory_effects = NULL; 1724 Node* rt = make_runtime_call(RC_LEAF, call_type, funcAddr, funcName, 1725 no_memory_effects, 1726 x, top(), y, y ? top() : NULL); 1727 Node* value = _gvn.transform(new (C) ProjNode(rt, TypeFunc::Parms+0)); 1728 #ifdef ASSERT 1729 Node* value_top = _gvn.transform(new (C) ProjNode(rt, TypeFunc::Parms+1)); 1730 assert(value_top == top(), "second value must be top"); 1731 #endif 1732 1733 result_region->init_req(2, control()); 1734 result_val->init_req(2, value); 1735 set_control(_gvn.transform(result_region)); 1736 return result_val; 1737 } else { 1738 return result; 1739 } 1740 } 1741 } 1742 1743 //------------------------------inline_exp------------------------------------- 1744 // Inline exp instructions, if possible. The Intel hardware only misses 1745 // really odd corner cases (+/- Infinity). Just uncommon-trap them. 1746 bool LibraryCallKit::inline_exp() { 1747 Node* arg = round_double_node(argument(0)); 1748 Node* n = _gvn.transform(new (C) ExpDNode(C, control(), arg)); 1749 1750 n = finish_pow_exp(n, arg, NULL, OptoRuntime::Math_D_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dexp), "EXP"); 1751 set_result(n); 1752 1753 C->set_has_split_ifs(true); // Has chance for split-if optimization 1754 return true; 1755 } | 1716 PhiNode* result_val = new (C) PhiNode(result_region, Type::DOUBLE); 1717 1718 result_region->init_req(1, if_fast); 1719 result_val->init_req(1, result); 1720 1721 set_control(if_slow); 1722 1723 const TypePtr* no_memory_effects = NULL; 1724 Node* rt = make_runtime_call(RC_LEAF, call_type, funcAddr, funcName, 1725 no_memory_effects, 1726 x, top(), y, y ? top() : NULL); 1727 Node* value = _gvn.transform(new (C) ProjNode(rt, TypeFunc::Parms+0)); 1728 #ifdef ASSERT 1729 Node* value_top = _gvn.transform(new (C) ProjNode(rt, TypeFunc::Parms+1)); 1730 assert(value_top == top(), "second value must be top"); 1731 #endif 1732 1733 result_region->init_req(2, control()); 1734 result_val->init_req(2, value); 1735 set_control(_gvn.transform(result_region)); 1736 // Make sure type of PhiNode is recorded 1737 _gvn.transform(result_val); 1738 return result_val; 1739 } else { 1740 return result; 1741 } 1742 } 1743 } 1744 1745 //------------------------------inline_exp------------------------------------- 1746 // Inline exp instructions, if possible. The Intel hardware only misses 1747 // really odd corner cases (+/- Infinity). Just uncommon-trap them. 1748 bool LibraryCallKit::inline_exp() { 1749 Node* arg = round_double_node(argument(0)); 1750 Node* n = _gvn.transform(new (C) ExpDNode(C, control(), arg)); 1751 1752 n = finish_pow_exp(n, arg, NULL, OptoRuntime::Math_D_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dexp), "EXP"); 1753 set_result(n); 1754 1755 C->set_has_split_ifs(true); // Has chance for split-if optimization 1756 return true; 1757 } |