1555 |
1555 |
1556 // If this inlining ever returned NaN in the past, we do not intrinsify it |
1556 // If this inlining ever returned NaN in the past, we do not intrinsify it |
1557 // every again. NaN results requires StrictMath.exp handling. |
1557 // every again. NaN results requires StrictMath.exp handling. |
1558 if (too_many_traps(Deoptimization::Reason_intrinsic)) return false; |
1558 if (too_many_traps(Deoptimization::Reason_intrinsic)) return false; |
1559 |
1559 |
1560 // Do not intrinsify on older platforms which lack cmove. |
|
1561 if (ConditionalMoveLimit == 0) return false; |
|
1562 |
|
1563 _sp += arg_size(); // restore stack pointer |
1560 _sp += arg_size(); // restore stack pointer |
1564 Node *x = pop_math_arg(); |
1561 Node *x = pop_math_arg(); |
1565 Node *result = _gvn.transform(new (C, 2) ExpDNode(0,x)); |
1562 Node *result = _gvn.transform(new (C, 2) ExpDNode(0,x)); |
1566 |
1563 |
1567 //------------------- |
1564 //------------------- |
1800 |
1797 |
1801 // These intrinsics are supported on all hardware |
1798 // These intrinsics are supported on all hardware |
1802 case vmIntrinsics::_dsqrt: return Matcher::has_match_rule(Op_SqrtD) ? inline_sqrt(id) : false; |
1799 case vmIntrinsics::_dsqrt: return Matcher::has_match_rule(Op_SqrtD) ? inline_sqrt(id) : false; |
1803 case vmIntrinsics::_dabs: return Matcher::has_match_rule(Op_AbsD) ? inline_abs(id) : false; |
1800 case vmIntrinsics::_dabs: return Matcher::has_match_rule(Op_AbsD) ? inline_abs(id) : false; |
1804 |
1801 |
1805 // These intrinsics don't work on X86. The ad implementation doesn't |
|
1806 // handle NaN's properly. Instead of returning infinity, the ad |
|
1807 // implementation returns a NaN on overflow. See bug: 6304089 |
|
1808 // Once the ad implementations are fixed, change the code below |
|
1809 // to match the intrinsics above |
|
1810 |
|
1811 case vmIntrinsics::_dexp: return |
1802 case vmIntrinsics::_dexp: return |
|
1803 Matcher::has_match_rule(Op_ExpD) ? inline_exp(id) : |
1812 runtime_math(OptoRuntime::Math_D_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dexp), "EXP"); |
1804 runtime_math(OptoRuntime::Math_D_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dexp), "EXP"); |
1813 case vmIntrinsics::_dpow: return |
1805 case vmIntrinsics::_dpow: return |
|
1806 Matcher::has_match_rule(Op_PowD) ? inline_pow(id) : |
1814 runtime_math(OptoRuntime::Math_DD_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dpow), "POW"); |
1807 runtime_math(OptoRuntime::Math_DD_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dpow), "POW"); |
1815 |
1808 |
1816 // These intrinsics are not yet correctly implemented |
1809 // These intrinsics are not yet correctly implemented |
1817 case vmIntrinsics::_datan2: |
1810 case vmIntrinsics::_datan2: |
1818 return false; |
1811 return false; |