IUCompilerCourse / Essentials-of-Compilation

A book about compiling Racket and Python to x86-64 assembly
1.27k stars 137 forks source link

2.7: Jumping to 'conclusion' unclear (Racket edition) #155

Closed mullr closed 1 year ago

mullr commented 1 year ago

The text reads:

Regarding Return, we recommend treating it as an assignment to the rax register followed by a jump to the conclusion of the program (so the conclusion needs to be labeled).

I spent a bit of time wondering why my (Jmp 'exit) instruction plus an ending ('exit . ()) block didn't work. It may be worth mentioning that, at least at this point in the project, the student can just assume that a block named 'conclusion already exists, in the correct position.

jsiek commented 1 year ago

Yes, that needs clarifying. I'll work on it.

jsiek commented 1 year ago

I've pushed a fix for this.