Mercurial > hg > truffle
diff src/share/vm/c1/c1_GraphBuilder.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 | 0105f367a14c |
children | 8f37087fc13f |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_GraphBuilder.cpp Mon May 14 09:36:00 2012 -0700 +++ b/src/share/vm/c1/c1_GraphBuilder.cpp Tue May 15 10:10:23 2012 +0200 @@ -2949,6 +2949,8 @@ case vmIntrinsics::_dtan : // fall through case vmIntrinsics::_dlog : // fall through case vmIntrinsics::_dlog10 : // fall through + case vmIntrinsics::_dexp : // fall through + case vmIntrinsics::_dpow : // fall through { // Compiles where the root method is an intrinsic need a special // compilation environment because the bytecodes for the method @@ -2969,6 +2971,9 @@ _state = start_block->state()->copy_for_parsing(); _last = start_block; load_local(doubleType, 0); + if (scope->method()->intrinsic_id() == vmIntrinsics::_dpow) { + load_local(doubleType, 2); + } // Emit the intrinsic node. bool result = try_inline_intrinsics(scope->method()); @@ -3182,6 +3187,8 @@ case vmIntrinsics::_dtan : // fall through case vmIntrinsics::_dlog : // fall through case vmIntrinsics::_dlog10 : // fall through + case vmIntrinsics::_dexp : // fall through + case vmIntrinsics::_dpow : // fall through if (!InlineMathNatives) return false; cantrap = false; preserves_state = true;