Skip to content

Commit 7ba71c4

Browse files
committed
Fix up for-label in Dupe notes.
1 parent 2ee9344 commit 7ba71c4

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

www/notes/dupe.scrbl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
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 a86/interp))
44
@(require redex/pict
55
racket/runtime-path
66
scribble/examples
@@ -271,14 +271,14 @@ To make the problem concrete, consider the Dupe expression
271271
that moves this value into the @racket[rax] register:
272272

273273
@ex[
274-
(Mov 'rax 5)]
274+
(Mov rax 5)]
275275

276276
But now consider @racket[#t]. The compiler needs to emit an
277277
instruction that moves ``@racket[#t]'' into @racket[rax], but the
278278
@racket[Mov] instruction doesn't take booleans:
279279

280280
@ex[
281-
(eval:error (Mov 'rax #t))]
281+
(eval:error (Mov rax #t))]
282282

283283
We have to move some 64-bit integer into @racket[rax], but the
284284
question is: which one?
@@ -289,12 +289,12 @@ C tradition and say @racket[#f] will be @racket[0] and @racket[#t]
289289
will be 1. So compiling @racket[#t] would emit:
290290

291291
@ex[
292-
(Mov 'rax 1)]
292+
(Mov rax 1)]
293293

294294
And compiling @racket[#f] would emit:
295295

296296
@ex[
297-
(Mov 'rax 0)]
297+
(Mov rax 0)]
298298

299299
Seems reasonable. Well except that the specification of @racket[if]
300300
in our interpreter requires that @racket[(if 0 1 2)] evaluates to
@@ -925,12 +925,12 @@ Let's consider some simple examples:
925925

926926
@item{@racket[42]: this should compile just like integer literals
927927
before, but needs to use the new representation, i.e. the compiler
928-
should produce @racket[(Mov 'rax #,(value->bits 42))], which is
928+
should produce @racket[(Mov rax #,(value->bits 42))], which is
929929
@racket[42] shifted to the left @racket[#,int-shift]-bit.}
930930

931-
@item{@racket[#f]: this should produce @racket[(Mov 'rax #,(value->bits #f))].}
931+
@item{@racket[#f]: this should produce @racket[(Mov rax #,(value->bits #f))].}
932932

933-
@item{@racket[#t]: this should produce @racket[(Mov 'rax #,(value->bits #t))].}
933+
@item{@racket[#t]: this should produce @racket[(Mov rax #,(value->bits #t))].}
934934

935935
@item{@racket[(add1 _e)]: this should produce the instructions for
936936
@racket[_e], which when executed would leave @emph{the encoding of the

0 commit comments

Comments
 (0)