cs420
cs420 copied to clipboard
[Homework 7] Assembly Generation (due: 6/18)
Implement assembly generation.
-
instruction
- https://www.youtube.com/watch?v=qLZUtNTYIoo&list=PL5aMzERQ_OZ8RWqn-XiZLXm1IJuaQbXp0&index=28 and the following videos in the same playlist
- https://docs.google.com/presentation/d/1SqtU-Cn60Sd1jkbO0OSsRYKPMIkul0eZoYG9KpMugFE/edit#slide=id.g8085bd6ec8_18_13
- RISC-V ISA manual: Vol 1 of https://lf-riscv.atlassian.net/wiki/spaces/HOME/pages/16154769/RISC-V+Technical+Specifications.
-
skeleton: https://github.com/kaist-cp/kecc-public/blob/main/src/asmgen/mod.rs
- fill out
todo!()
. - don't fork this repository. It'll be public!
- fill out
-
self grader
- https://github.com/kaist-cp/kecc-public/blob/main/scripts/grade-asmgen.sh
- https://github.com/kaist-cp/kecc-public/blob/main/scripts/grade-asmgen-small.sh
-
submission: run
./scripts/make-submissions.sh
and then submitasmgen.zip
.- https://gg.kaist.ac.kr/assignment/156/ (small)
- https://gg.kaist.ac.kr/assignment/157/ (full)
- due: 6/18 23:59:59 (KST = UTC+9)
- model solution: https://gg.kaist.ac.kr/assignment/159/. It will generate RISC-V assembly when given a KECC IR file.
-
tips
- ABI related:
- While implementing hw7, you don't have to care about the ABI but if you plan to do hw8, we recommend reading below before implementing hw7
- https://github.com/kaist-cp/cs420/issues/209
- stack allocation
- https://github.com/kaist-cp/cs420/issues/211
- sp byte alignment: https://github.com/kaist-cp/cs420/issues/450#issuecomment-1159779360
-
HI
,LO
Register-
la
instead ofHI
,LO
: https://github.com/kaist-cp/cs420/issues/168#issuecomment-653044107
-
- As with IRgen, start with small first.
- ABI related: