Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add dummy WFI implementation #470

Merged
merged 1 commit into from
Aug 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,8 @@ static inline bool op_system(rv_insn_t *ir, const uint32_t insn)
ir->opcode = rv_insn_ebreak;
break;
case 0x105: /* WFI: Wait for Interrupt */
ir->opcode = rv_insn_wfi;
break;
case 0x002: /* URET: return from traps in U-mode */
case 0x202: /* HRET: return from traps in H-mode */
/* illegal instruction */
Expand Down
3 changes: 2 additions & 1 deletion src/rv32_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,9 @@ RVOP(
RVOP(
wfi,
{
PC += 4;
/* FIXME: Implement */
return false;
goto end_op;
},
GEN({
assert; /* FIXME: Implement */
Expand Down