Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Clear block only needs when retranslate
Browse files Browse the repository at this point in the history
ChinYikMing committed Nov 2, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 2163a76 commit 6466aa1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/emulate.c
Original file line number Diff line number Diff line change
@@ -567,7 +567,6 @@ FORCE_INLINE bool insn_is_unconditional_branch(uint8_t opcode)
static void block_translate(riscv_t *rv, block_t *block)
{
retranslate:
memset(block, 0, sizeof(block_t));
block->pc_start = block->pc_end = rv->PC;

rv_insn_t *prev_ir = NULL;
@@ -584,6 +583,7 @@ static void block_translate(riscv_t *rv, block_t *block)

#if RV32_HAS(SYSTEM)
if (!insn && need_retranslate) {
memset(block, 0, sizeof(block_t));
need_retranslate = false;
goto retranslate;
}

0 comments on commit 6466aa1

Please sign in to comment.