Skip to content

Commit

Permalink
Merge pull request #96 from qwe661234/patch_emulate
Browse files Browse the repository at this point in the history
Set rv->compressed for instruction ecall and ebreak
  • Loading branch information
jserv authored Dec 19, 2022
2 parents f2da162 + 4aa938b commit c762de5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/emulate.c
Original file line number Diff line number Diff line change
Expand Up @@ -649,13 +649,15 @@ static bool emulate(riscv_t *rv, const block_t *block)

/* ECALL: Environment Call */
_(ecall, {
rv->compressed = false;
rv->io.on_ecall(rv); /* increment the cycles csr */
rv->csr_cycle++;
return true;
})

/* EBREAK: Environment Break */
_(ebreak, {
rv->compressed = false;
rv->io.on_ebreak(rv); /* increment the cycles csr */
rv->csr_cycle++;
return true;
Expand Down Expand Up @@ -1288,6 +1290,7 @@ static bool emulate(riscv_t *rv, const block_t *block)

/* C.EBREAK */
_(cebreak, {
rv->compressed = true;
rv->io.on_ebreak(rv);
/* increment the cycles csr */
rv->csr_cycle++;
Expand Down

0 comments on commit c762de5

Please sign in to comment.