Mercurial > hg > truffle
diff src/share/vm/opto/library_call.cpp @ 6084:6759698e3140
7133857: exp() and pow() should use the x87 ISA on x86
Summary: use x87 instructions to implement exp() and pow() in interpreter/c1/c2.
Reviewed-by: kvn, never, twisti
author | roland |
---|---|
date | Tue, 15 May 2012 10:10:23 +0200 |
parents | 8f972594effc |
children | 8b0a4867acf0 |
line wrap: on
line diff
--- a/src/share/vm/opto/library_call.cpp Mon May 14 09:36:00 2012 -0700 +++ b/src/share/vm/opto/library_call.cpp Tue May 15 10:10:23 2012 +0200 @@ -1557,9 +1557,6 @@ // every again. NaN results requires StrictMath.exp handling. if (too_many_traps(Deoptimization::Reason_intrinsic)) return false; - // Do not intrinsify on older platforms which lack cmove. - if (ConditionalMoveLimit == 0) return false; - _sp += arg_size(); // restore stack pointer Node *x = pop_math_arg(); Node *result = _gvn.transform(new (C, 2) ExpDNode(0,x)); @@ -1802,15 +1799,11 @@ case vmIntrinsics::_dsqrt: return Matcher::has_match_rule(Op_SqrtD) ? inline_sqrt(id) : false; case vmIntrinsics::_dabs: return Matcher::has_match_rule(Op_AbsD) ? inline_abs(id) : false; - // These intrinsics don't work on X86. The ad implementation doesn't - // handle NaN's properly. Instead of returning infinity, the ad - // implementation returns a NaN on overflow. See bug: 6304089 - // Once the ad implementations are fixed, change the code below - // to match the intrinsics above - case vmIntrinsics::_dexp: return + Matcher::has_match_rule(Op_ExpD) ? inline_exp(id) : runtime_math(OptoRuntime::Math_D_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dexp), "EXP"); case vmIntrinsics::_dpow: return + Matcher::has_match_rule(Op_PowD) ? inline_pow(id) : runtime_math(OptoRuntime::Math_DD_D_Type(), CAST_FROM_FN_PTR(address, SharedRuntime::dpow), "POW"); // These intrinsics are not yet correctly implemented