Skip to content

Avoid duplications in RISC-V exception handlers #61

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

Closed
jserv opened this issue Sep 29, 2022 · 0 comments · Fixed by #63
Closed

Avoid duplications in RISC-V exception handlers #61

jserv opened this issue Sep 29, 2022 · 0 comments · Fixed by #63
Assignees

Comments

@jserv
Copy link
Contributor

jserv commented Sep 29, 2022

Code duplication in the function body of the RISC-V exception handlers might be a maintenance headache. That is, we shall refine these functions in src/emulate.c:

  • rv_except_insn_misaligned
  • rv_except_load_misaligned
  • rv_except_store_misaligned
  • rv_except_illegal_insn
  • rv_except_breakpoint proposed in Implement ebreak properly #60

Code generation using preprocessor macros may be an approach to avoid such duplications.

Risheng1128 added a commit to Risheng1128/rv32emu that referenced this issue Oct 3, 2022
Use preprocessor to avoid duplications in exception handlers,
and create a list to define the RISC-V exception code.

Close sysprog21#61
@jserv jserv closed this as completed in #63 Oct 3, 2022
vestata pushed a commit to vestata/rv32emu that referenced this issue Jan 24, 2025
Use preprocessor to avoid duplications in exception handlers,
and create a list to define the RISC-V exception code.

Close sysprog21#61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants