CSE 401 -- Compilers
Course Notes from CSE 413 AU07
In cse 413 last quarter students wrote a simple recursive descent
compiler that generated x86 code. Here are a some notes from that
course that might be useful.
- x86 overview - should be mostly relevant
to what MiniJava is generating, but note that there are a few
simplifications that students did that quarter to make code gen
easier (ex. pushing args from L to R rather than R to L).
- Code generation for D - shows how
you could generate assembly code directly by traversing the AST.
One option for a simple compiler that will do no optimization. (In
our MiniJava compiler instead we generate code by traversing the IL
slides from cse413 x86 lecture - note that I drew the stack in a
different direction than we have been drawing it.
Below are Intel's reference manuals for the X86 architecture (in pdf format).
They contain far more detail than we need, but it's all here if you need
a precise description of something.
manual. Look in ch. 8 for a description of the differences between GNU/AT&T
assembler syntax and the Intel/Microsoft standard conventions.
Back to CSE 401 home