# Programming Exercise 9: Assembly Printing This is the continuation of hw07. You can continue from your own code or use the parser from the website as starting point. ## Implementation Print out assembly code from your instruction-selected-and-register-allocated-LLVM-IR. - Export functions with `.global` and set a proper symbol type and size, e.g. using `.type func, @function` and (at the end) `.size func, .-func`. - Create a sufficiently large and suitably aligned stack frame, which you clean up before return. If your architecture uses a link register, remember to store it as well. Calculate offsets into your stack frame for all alloca instructions. - Take care of basic block labels; make use of fallthrough where easily possible, but don't forget to emit proper branches if this is impossible. - Annotate your function correctly with CFI directives. Enjoy your working compiler! # Submission Send an e-mail to engelke+cghomework@in.tum.de until 2023-01-18, 23:59 with: - Subject: "Homework 9: YourMatrNr YourName" - A single(!) .tar.xz file attached named with "hw9-YourMatrNr-YourLastName.tar.xz", which contains a single folder "hw9-YourMatrNr-YourLastName", which contains your submission - The message body can remain empty - Include a Makefile with compilation directives s.t. `make` compiles the code - Specify correct dependencies in the Makefile - Use `llvm-config --cppflags --ldflags --libs` to find LLVM. - Avoid external dependencies and complex build systems (no cmake, cargo, etc.) - Put the source in a single source file (if easily possible) - Include answers to theory questions as comments in the source file