Skip to content

Commit c762de5

Browse files
authored
Merge pull request #96 from qwe661234/patch_emulate
Set rv->compressed for instruction ecall and ebreak
2 parents f2da162 + 4aa938b commit c762de5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/emulate.c

+3
Original file line numberDiff line numberDiff line change
@@ -649,13 +649,15 @@ static bool emulate(riscv_t *rv, const block_t *block)
649649

650650
/* ECALL: Environment Call */
651651
_(ecall, {
652+
rv->compressed = false;
652653
rv->io.on_ecall(rv); /* increment the cycles csr */
653654
rv->csr_cycle++;
654655
return true;
655656
})
656657

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

12891291
/* C.EBREAK */
12901292
_(cebreak, {
1293+
rv->compressed = true;
12911294
rv->io.on_ebreak(rv);
12921295
/* increment the cycles csr */
12931296
rv->csr_cycle++;

0 commit comments

Comments
 (0)