shecc icon indicating copy to clipboard operation
shecc copied to clipboard

Refactor code generations

Open jserv opened this issue 4 years ago • 1 comments

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 avatar Jan 20 '21 12:01 jserv

Depends on #47

jserv avatar Feb 05 '21 04:02 jserv