Feb. 2024 - Mar. 2024
Synopsis¶
A C90 to RISC-V compiler, written in C++. This was a spring term coursework assignment for Imperial module, `Instruction Set Architecture & Compilers’ (IAC).
Below is an enumerative list of all the C90 features the compiler is capable of compiling into RISCV assembly:
Function definition
Parameter allocation
Declaring variables
Assigning variables
Arithmetic and logical operators
Arithmetic and logical assignment operators
Short form arithmetic operators (e.g i++)
If and Else statements
For loops
While loops
Array declaration
Array indexing and assignment
Switch statements
Break and continue keywords
Skills¶
Below are the skills and experiences gained from this project:
Competencies with C++, C, RISCV, Yakk and Flex
Competencies using GitHub for collaborative development
Knowledge of compiler theory