Skip to content

Commit

Permalink
Translator function is now always enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Oct 22, 2023
1 parent 80fac56 commit 00defac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/libriscv/cpu_dispatch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,7 @@ void CPU<W>::DISPATCH_FUNC(uint64_t imax)
[RV32V_BC_VFADD_VV] = &&rv32v_vfadd_vv,
#endif
[RV32I_BC_FUNCTION] = &&execute_decoded_function,
#ifdef RISCV_BINARY_TRANSLATION
[RV32I_BC_TRANSLATOR] = &&translated_function,
#endif
[RV32I_BC_SYSTEM] = &&rv32i_system,
};
#endif
Expand Down Expand Up @@ -343,8 +341,8 @@ INSTRUCTION(RV32I_BC_JAL, rv32i_jal) {
/** UNLIKELY INSTRUCTIONS **/
/** UNLIKELY INSTRUCTIONS **/

#ifdef RISCV_BINARY_TRANSLATION
INSTRUCTION(RV32I_BC_TRANSLATOR, translated_function) {
#ifdef RISCV_BINARY_TRANSLATION
VIEW_INSTR();
// Make the current PC visible
this->registers().pc = pc;
Expand All @@ -357,8 +355,10 @@ INSTRUCTION(RV32I_BC_TRANSLATOR, translated_function) {
// Translations are always full-length instructions (?)
pc = registers().pc + 4;
goto check_jump;
}
#else
trigger_exception(FEATURE_DISABLED, this->pc());
#endif
}

INSTRUCTION(RV32I_BC_SYSTEM, rv32i_system) {
VIEW_INSTR();
Expand Down

0 comments on commit 00defac

Please sign in to comment.