Skip to content

Commit

Permalink
temp
Browse files Browse the repository at this point in the history
  • Loading branch information
robehn committed Feb 24, 2024
1 parent c3eb1b9 commit a1e7ccd
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
10 changes: 9 additions & 1 deletion src/hotspot/cpu/riscv/macroAssembler_riscv.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,15 @@ class MacroAssembler: public Assembler {
assert_cond(dest != nullptr);
assert(temp != noreg, "expecting a register");
int32_t offset = 0;
mv(temp, dest, offset);
movptr(temp, dest, offset);
jalr(x1, temp, offset);
}

void call_la(const address dest, Register temp = t0) {
assert_cond(dest != nullptr);
assert(temp != noreg, "expecting a register");
int32_t offset = 0;
la(temp, dest, offset);
jalr(x1, temp, offset);
}

Expand Down
16 changes: 8 additions & 8 deletions src/hotspot/cpu/riscv/templateInterpreterGenerator_riscv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dsin());
}
__ call(fn);
__ call_la(fn);
break;
case Interpreter::java_lang_math_cos :
entry_point = __ pc();
Expand All @@ -203,7 +203,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dcos());
}
__ call(fn);
__ call_la(fn);
break;
case Interpreter::java_lang_math_tan :
entry_point = __ pc();
Expand All @@ -216,7 +216,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dtan());
}
__ call(fn);
__ call_la(fn);
break;
case Interpreter::java_lang_math_log :
entry_point = __ pc();
Expand All @@ -229,7 +229,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dlog());
}
__ call(fn);
__ call_la(fn);
break;
case Interpreter::java_lang_math_log10 :
entry_point = __ pc();
Expand All @@ -242,7 +242,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dlog10());
}
__ call(fn);
__ call_la(fn);
break;
case Interpreter::java_lang_math_exp :
entry_point = __ pc();
Expand All @@ -255,7 +255,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dexp());
}
__ call(fn);
__ call_la(fn);
break;
case Interpreter::java_lang_math_pow :
entry_point = __ pc();
Expand All @@ -269,7 +269,7 @@ address TemplateInterpreterGenerator::generate_math_entry(AbstractInterpreter::M
} else {
fn = CAST_FROM_FN_PTR(address, StubRoutines::dpow());
}
__ call(fn);
__ call_la(fn);
break;
case Interpreter::java_lang_math_fmaD :
if (UseFMA) {
Expand Down Expand Up @@ -1812,7 +1812,7 @@ void TemplateInterpreterGenerator::trace_bytecode(Template* t) {
// the tosca in-state for the given template.

assert(Interpreter::trace_code(t->tos_in()) != nullptr, "entry must have been generated");
__ call(Interpreter::trace_code(t->tos_in()));
__ call_la(Interpreter::trace_code(t->tos_in()));
__ reinit_heapbase();
}

Expand Down

0 comments on commit a1e7ccd

Please sign in to comment.