comparison 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
comparison
equal deleted inserted replaced
6057:8f972594effc 6084:6759698e3140
2947 case vmIntrinsics::_dsin : // fall through 2947 case vmIntrinsics::_dsin : // fall through
2948 case vmIntrinsics::_dcos : // fall through 2948 case vmIntrinsics::_dcos : // fall through
2949 case vmIntrinsics::_dtan : // fall through 2949 case vmIntrinsics::_dtan : // fall through
2950 case vmIntrinsics::_dlog : // fall through 2950 case vmIntrinsics::_dlog : // fall through
2951 case vmIntrinsics::_dlog10 : // fall through 2951 case vmIntrinsics::_dlog10 : // fall through
2952 case vmIntrinsics::_dexp : // fall through
2953 case vmIntrinsics::_dpow : // fall through
2952 { 2954 {
2953 // Compiles where the root method is an intrinsic need a special 2955 // Compiles where the root method is an intrinsic need a special
2954 // compilation environment because the bytecodes for the method 2956 // compilation environment because the bytecodes for the method
2955 // shouldn't be parsed during the compilation, only the special 2957 // shouldn't be parsed during the compilation, only the special
2956 // Intrinsic node should be emitted. If this isn't done the the 2958 // Intrinsic node should be emitted. If this isn't done the the
2967 // setup the initial block state 2969 // setup the initial block state
2968 _block = start_block; 2970 _block = start_block;
2969 _state = start_block->state()->copy_for_parsing(); 2971 _state = start_block->state()->copy_for_parsing();
2970 _last = start_block; 2972 _last = start_block;
2971 load_local(doubleType, 0); 2973 load_local(doubleType, 0);
2974 if (scope->method()->intrinsic_id() == vmIntrinsics::_dpow) {
2975 load_local(doubleType, 2);
2976 }
2972 2977
2973 // Emit the intrinsic node. 2978 // Emit the intrinsic node.
2974 bool result = try_inline_intrinsics(scope->method()); 2979 bool result = try_inline_intrinsics(scope->method());
2975 if (!result) BAILOUT("failed to inline intrinsic"); 2980 if (!result) BAILOUT("failed to inline intrinsic");
2976 method_return(dpop()); 2981 method_return(dpop());
3180 case vmIntrinsics::_dsin : // fall through 3185 case vmIntrinsics::_dsin : // fall through
3181 case vmIntrinsics::_dcos : // fall through 3186 case vmIntrinsics::_dcos : // fall through
3182 case vmIntrinsics::_dtan : // fall through 3187 case vmIntrinsics::_dtan : // fall through
3183 case vmIntrinsics::_dlog : // fall through 3188 case vmIntrinsics::_dlog : // fall through
3184 case vmIntrinsics::_dlog10 : // fall through 3189 case vmIntrinsics::_dlog10 : // fall through
3190 case vmIntrinsics::_dexp : // fall through
3191 case vmIntrinsics::_dpow : // fall through
3185 if (!InlineMathNatives) return false; 3192 if (!InlineMathNatives) return false;
3186 cantrap = false; 3193 cantrap = false;
3187 preserves_state = true; 3194 preserves_state = true;
3188 break; 3195 break;
3189 3196