1787 |
1787 |
1788 case vmIntrinsics::_dexp: |
1788 case vmIntrinsics::_dexp: |
1789 return StubRoutines::dexp() != NULL ? |
1789 return StubRoutines::dexp() != NULL ? |
1790 runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dexp(), "dexp") : |
1790 runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dexp(), "dexp") : |
1791 runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dexp), "EXP"); |
1791 runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dexp), "EXP"); |
1792 case vmIntrinsics::_dpow: |
1792 case vmIntrinsics::_dpow: { |
1793 return StubRoutines::dpow() != NULL ? |
1793 Node* exp = round_double_node(argument(2)); |
1794 runtime_math(OptoRuntime::Math_DD_D_Type(), StubRoutines::dpow(), "dpow") : |
1794 const TypeD* d = _gvn.type(exp)->isa_double_constant(); |
|
1795 if (d != NULL && d->getd() == 2.0) { |
|
1796 // Special case: pow(x, 2.0) => x * x |
|
1797 Node* base = round_double_node(argument(0)); |
|
1798 set_result(_gvn.transform(new MulDNode(base, base))); |
|
1799 return true; |
|
1800 } |
|
1801 return StubRoutines::dexp() != NULL ? |
|
1802 runtime_math(OptoRuntime::Math_DD_D_Type(), StubRoutines::dpow(), "dpow") : |
1795 runtime_math(OptoRuntime::Math_DD_D_Type(), FN_PTR(SharedRuntime::dpow), "POW"); |
1803 runtime_math(OptoRuntime::Math_DD_D_Type(), FN_PTR(SharedRuntime::dpow), "POW"); |
|
1804 } |
1796 #undef FN_PTR |
1805 #undef FN_PTR |
1797 |
1806 |
1798 // These intrinsics are not yet correctly implemented |
1807 // These intrinsics are not yet correctly implemented |
1799 case vmIntrinsics::_datan2: |
1808 case vmIntrinsics::_datan2: |
1800 return false; |
1809 return false; |