11#lang scribble/manual
22
3- @(require (for-label (except-in racket compile ... ) a86/printer a86/ast))
3+ @(require (for-label (except-in racket compile ... ) a86/printer a86/ast a86/registers ))
44@(require redex/pict
55 racket/runtime-path
66 scribble/examples
@@ -191,8 +191,8 @@ We already know how to compile the @racket[8], @racket[2], and
191191What needs to happen?
192192
193193@itemlist[
194- @item{Execute the code for @racket[8 ] leaving the result in @racket[' rax ],}
195- @item{check whether @racket[' rax ] holds zero,}
194+ @item{Execute the code for @racket[8 ] leaving the result in @racket[rax],}
195+ @item{check whether @racket[rax] holds zero,}
196196@item{if it does, execute the code for @racket[2 ],}
197197@item{if it doesn't , execute the code for @racket[3 ].}
198198]
@@ -219,10 +219,10 @@ In total, the code for this example would look like:
219219@racketblock[
220220(let ((l0 (gensym))
221221 (l1 (gensym)))
222- (list (Mov ' rax 8 )
223- (Cmp ' rax 0 )
222+ (list (Mov rax 8 )
223+ (Cmp rax 0 )
224224 (Je l0)
225- (Mov ' rax 3 )
225+ (Mov rax 3 )
226226 (Jmp l1)
227227 (Label l0)
228228 (Mov rax 2 )
@@ -232,7 +232,7 @@ In total, the code for this example would look like:
232232
233233@section{A Compiler for Con}
234234
235- Notice that the @racket[(Mov ' rax 8 )], @racket[(Mov rax 3 )] and
235+ Notice that the @racket[(Mov rax 8 )], @racket[(Mov rax 3 )] and
236236@racket[(Mov rax 2 )] parts are just the instructions generated by
237237compiling @racket[8 ], @racket[2 ] and @racket[3 ]. Generalizing from
238238this , we arrive at the following code for the compiler:
@@ -241,7 +241,7 @@ this, we arrive at the following code for the compiler:
241241(let ((l0 (gensym 'if ))
242242 (l1 (gensym 'if )))
243243 (seq (compile-e e1)
244- (Cmp ' rax 0 )
244+ (Cmp rax 0 )
245245 (Je l0)
246246 (compile-e e3)
247247 (Jmp l1)
0 commit comments