Skip to content

Commit

Permalink
Respect decision not to binary translate
Browse files Browse the repository at this point in the history
  • Loading branch information
fwsGonzo committed Oct 22, 2023
1 parent f76774f commit b1354e8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/libriscv/decoder_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,10 @@ namespace riscv
// Attempt to load binary translation
// Also, fill out the binary translation SO filename for later
std::string bintr_filename;
machine().cpu.load_translation(options, &bintr_filename, exec);
int result = machine().cpu.load_translation(options, &bintr_filename, exec);
const bool must_translate = result > 0;

if (!exec.is_binary_translated())
if (!exec.is_binary_translated() && must_translate)
{
// This can be improved somewhat, by fetching them on demand
// instead of building a vector of the whole execute segment.
Expand Down

0 comments on commit b1354e8

Please sign in to comment.