< prev index next >
src/share/vm/opto/library_call.cpp
Print this page
*** 1543,1554 ****
bool LibraryCallKit::inline_trig(vmIntrinsics::ID id) {
Node* arg = round_double_node(argument(0));
Node* n = NULL;
switch (id) {
- case vmIntrinsics::_dsin: n = new SinDNode(C, control(), arg); break;
- case vmIntrinsics::_dcos: n = new CosDNode(C, control(), arg); break;
case vmIntrinsics::_dtan: n = new TanDNode(C, control(), arg); break;
default: fatal_unexpected_iid(id); break;
}
n = _gvn.transform(n);
--- 1543,1552 ----
*** 1607,1626 ****
phi->init_req(2, n);
// Slow path - non-blocking leaf call
Node* call = NULL;
switch (id) {
- case vmIntrinsics::_dsin:
- call = make_runtime_call(RC_LEAF, OptoRuntime::Math_D_D_Type(),
- CAST_FROM_FN_PTR(address, SharedRuntime::dsin),
- "Sin", NULL, arg, top());
- break;
- case vmIntrinsics::_dcos:
- call = make_runtime_call(RC_LEAF, OptoRuntime::Math_D_D_Type(),
- CAST_FROM_FN_PTR(address, SharedRuntime::dcos),
- "Cos", NULL, arg, top());
- break;
case vmIntrinsics::_dtan:
call = make_runtime_call(RC_LEAF, OptoRuntime::Math_D_D_Type(),
CAST_FROM_FN_PTR(address, SharedRuntime::dtan),
"Tan", NULL, arg, top());
break;
--- 1605,1614 ----
*** 1904,1917 ****
//------------------------------inline_math_native-----------------------------
bool LibraryCallKit::inline_math_native(vmIntrinsics::ID id) {
#define FN_PTR(f) CAST_FROM_FN_PTR(address, f)
switch (id) {
// These intrinsics are not properly supported on all hardware
! case vmIntrinsics::_dcos: return Matcher::has_match_rule(Op_CosD) ? inline_trig(id) :
! runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dcos), "COS");
! case vmIntrinsics::_dsin: return Matcher::has_match_rule(Op_SinD) ? inline_trig(id) :
runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dsin), "SIN");
case vmIntrinsics::_dtan: return Matcher::has_match_rule(Op_TanD) ? inline_trig(id) :
runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dtan), "TAN");
case vmIntrinsics::_dlog:
return StubRoutines::dlog() != NULL ?
--- 1892,1909 ----
//------------------------------inline_math_native-----------------------------
bool LibraryCallKit::inline_math_native(vmIntrinsics::ID id) {
#define FN_PTR(f) CAST_FROM_FN_PTR(address, f)
switch (id) {
// These intrinsics are not properly supported on all hardware
! case vmIntrinsics::_dsin:
! return StubRoutines::dsin() != NULL ?
! runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dsin(), "dsin") :
runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dsin), "SIN");
+ case vmIntrinsics::_dcos:
+ return StubRoutines::dcos() != NULL ?
+ runtime_math(OptoRuntime::Math_D_D_Type(), StubRoutines::dcos(), "dcos") :
+ runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dcos), "COS");
case vmIntrinsics::_dtan: return Matcher::has_match_rule(Op_TanD) ? inline_trig(id) :
runtime_math(OptoRuntime::Math_D_D_Type(), FN_PTR(SharedRuntime::dtan), "TAN");
case vmIntrinsics::_dlog:
return StubRoutines::dlog() != NULL ?
< prev index next >