8294492: RISC-V: Use li instead of patchable movptr at non-patchable callsites

Reviewed-by: fyang
This commit is contained in:
Xiaolin Zheng 2022-09-29 07:21:07 +00:00 committed by Fei Yang
parent 8491fd5c12
commit 1decdcee71
8 changed files with 51 additions and 82 deletions

View file

@ -190,8 +190,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dsin());
}
__ mv(t0, fn);
__ jalr(t0);
__ call(fn);
break;
case Interpreter::java_lang_math_cos :
entry_point = __ pc();
@ -204,8 +203,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dcos());
}
__ mv(t0, fn);
__ jalr(t0);
__ call(fn);
break;
case Interpreter::java_lang_math_tan :
entry_point = __ pc();
@ -218,8 +216,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dtan());
}
__ mv(t0, fn);
__ jalr(t0);
__ call(fn);
break;
case Interpreter::java_lang_math_log :
entry_point = __ pc();
@ -232,8 +229,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dlog());
}
__ mv(t0, fn);
__ jalr(t0);
__ call(fn);
break;
case Interpreter::java_lang_math_log10 :
entry_point = __ pc();
@ -246,8 +242,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dlog10());
}
__ mv(t0, fn);
__ jalr(t0);
__ call(fn);
break;
case Interpreter::java_lang_math_exp :
entry_point = __ pc();
@ -260,8 +255,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dexp());
}
__ mv(t0, fn);
__ jalr(t0);
__ call(fn);
break;
case Interpreter::java_lang_math_pow :
entry_point = __ pc();
@ -275,8 +269,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dpow());
}
__ mv(t0, fn);
__ jalr(t0);
__ call(fn);
break;
case Interpreter::java_lang_math_fmaD :
if (UseFMA) {
@ -1169,8 +1162,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
// hand.
//
__ mv(c_rarg0, xthread);
__ mv(t1, CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans));
__ jalr(t1);
__ call(CAST_FROM_FN_PTR(address, JavaThread::check_special_condition_for_native_trans));
__ get_method(xmethod);
__ reinit_heapbase();
__ bind(Continue);
@ -1219,8 +1211,7 @@ address TemplateInterpreterGenerator::generate_native_entry(bool synchronized) {
__ push_call_clobbered_registers();
__ mv(c_rarg0, xthread);
__ mv(t1, CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages));
__ jalr(t1);
__ call(CAST_FROM_FN_PTR(address, SharedRuntime::reguard_yellow_pages));
__ pop_call_clobbered_registers();
__ bind(no_reguard);
}