@@ -465,13 +465,19 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
465
465
__ call_VM_leaf0 (CAST_FROM_FN_PTR (address, SharedRuntime::dtan));
466
466
}
467
467
} else if (kind == Interpreter::java_lang_math_tanh) {
468
- assert (StubRoutines::dtanh () != nullptr , " not initialized " );
468
+ if (StubRoutines::dtanh () != nullptr ) {
469
469
__ movdbl (xmm0, Address (rsp, wordSize));
470
470
__ call (RuntimeAddress (CAST_FROM_FN_PTR (address, StubRoutines::dtanh ())));
471
+ } else {
472
+ return nullptr ; // Fallback to default implementation
473
+ }
471
474
} else if (kind == Interpreter::java_lang_math_cbrt) {
472
- assert (StubRoutines::dcbrt () != nullptr , " not initialized" );
473
- __ movdbl (xmm0, Address (rsp, wordSize));
474
- __ call (RuntimeAddress (CAST_FROM_FN_PTR (address, StubRoutines::dcbrt ())));
475
+ if (StubRoutines::dcbrt () != nullptr ) {
476
+ __ movdbl (xmm0, Address (rsp, wordSize));
477
+ __ call (RuntimeAddress (CAST_FROM_FN_PTR (address, StubRoutines::dcbrt ())));
478
+ } else {
479
+ return nullptr ; // Fallback to default implementation
480
+ }
475
481
} else if (kind == Interpreter::java_lang_math_abs) {
476
482
assert (StubRoutines::x86::double_sign_mask () != nullptr , " not initialized" );
477
483
__ movdbl (xmm0, Address (rsp, wordSize));
0 commit comments