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

Refactor code generations #45

Closed
jserv opened this issue Jan 20, 2021 · 1 comment
Closed

Refactor code generations #45

jserv opened this issue Jan 20, 2021 · 1 comment
Assignees

Comments

@jserv
Copy link
Collaborator

jserv commented Jan 20, 2021

Both src/arm-codegen and src/riscv-codegen.c have some functions in common. The code generation can be refactored with the following changes:

  1. split the shared functions/variables to new file src/codegen.c from src/{arm,riscv}-codegen.c
  2. In the end of src/codegen.c, there should be a statement `#include "src/arch-codegen.c" which links to Arm or RISC-V code generation implementation.
  3. The generated shecc executable file should be capable of showing its configurations such as the supported architecture and ABI.
@jserv
Copy link
Collaborator Author

jserv commented Feb 5, 2021

Depends on #47

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

No branches or pull requests

2 participants