Skip to content

Commit

Permalink
Merge pull request #532 from ChinYikMing/fix-clang-build
Browse files Browse the repository at this point in the history
Fix declaration error when using clang
  • Loading branch information
jserv authored Dec 30, 2024
2 parents d8bf69a + f560955 commit 060b0fb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1122,11 +1122,12 @@ void rv_step_debug(void *arg)
rv_check_interrupt(rv);
#endif

retranslate:
/* fetch the next instruction */
rv_insn_t ir;

retranslate:
memset(&ir, 0, sizeof(rv_insn_t));

/* fetch the next instruction */
uint32_t insn = rv->io.mem_ifetch(rv, rv->PC);
#if RV32_HAS(SYSTEM)
if (!insn && need_retranslate) {
Expand Down

0 comments on commit 060b0fb

Please sign in to comment.