File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -375,7 +375,7 @@ So for example the following creates a box containing the value 7:
375375
376376@#reader scribble/comment-reader
377377(racketblock
378- (seq (Mov 'rax (arithmetic-shift 7 imm-shift))
378+ (seq (Mov 'rax (value->bits 7 ))
379379 (Mov (Offset 'rbx 0 ) 'rax ) ; write '7' into address held by rbx
380380 (Mov 'rax 'rbx ) ; copy pointer into return register
381381 (Or 'rax type-box) ; tag pointer as a box
@@ -396,9 +396,9 @@ Pairs are similar. Suppose we want to make @racket[(cons 3 4)]:
396396
397397@#reader scribble/comment-reader
398398(racketblock
399- (seq (Mov 'rax (arithmetic-shift 3 imm-shift ))
399+ (seq (Mov 'rax (value->bits 3 ))
400400 (Mov (Offset 'rbx 0 ) 'rax ) ; write '3' into address held by rbx
401- (Mov 'rax (arithmetic-shift 4 imm-shift ))
401+ (Mov 'rax (value->bits 4 ))
402402 (Mov (Offset 'rbx 8 ) 'rax ) ; write '4' into word after address held by rbx
403403 (Mov 'rax rbx) ; copy pointer into return register
404404 (Or 'rax type-pair) ; tag pointer as a pair
You can’t perform that action at this time.
0 commit comments