Jeremy Siek 3 年 前
コミット
149b4d2645
2 ファイル変更13 行追加9 行削除
  1. 9 9
      book.tex
  2. 4 0
      notes.md

+ 9 - 9
book.tex

@@ -5506,13 +5506,13 @@ Run the script to test the \code{patch\_instructions} pass.
 \end{exercise}
 
 
-\section{Print x86}
+\section{Prelude and Conclusion}
 \label{sec:print-x86-reg-alloc}
 \index{subject}{calling conventions}
 \index{subject}{prelude}\index{subject}{conclusion}
 
-Recall that the \code{print\_x86} pass generates the prelude and
-conclusion instructions to satisfy the x86 calling conventions
+Recall that this pass generates the prelude and conclusion
+instructions to satisfy the x86 calling conventions
 (Section~\ref{sec:calling-conventions}). With the addition of the
 register allocator, the callee-saved registers used by the register
 allocator must be saved in the prelude and restored in the conclusion.
@@ -5523,10 +5523,10 @@ In the \code{allocate\_registers} pass,
 %
 \python{add a field named \code{used\_callee} to the \code{X86Program} AST node}
 %
-that stores the set of
-callee-saved registers that were assigned to variables. The
-\code{print\_x86} pass can then access this information to decide which
-callee-saved registers need to be saved and restored.
+that stores the set of callee-saved registers that were assigned to
+variables. The \code{prelude\_and\_conclusion} pass can then access
+this information to decide which callee-saved registers need to be
+saved and restored.
 %
 When calculating the size of the frame to adjust the \code{rsp} in the
 prelude, make sure to take into account the space used for saving the
@@ -5672,10 +5672,10 @@ main:
 \end{figure}
 
 \begin{exercise}\normalfont
-Update the \code{print\_x86} pass as described in this section.
+Update the \code{prelude\_and\_conclusion} pass as described in this section.
 %
 \racket{
-In the \code{run-tests.rkt} script, reinstate \code{print\_x86} in the
+In the \code{run-tests.rkt} script, add \code{prelude\_and\_conclusion} to the
 list of passes and the call to \code{compiler-tests}.}
 %
 Run the script to test the complete compiler for \LangVar{} that

+ 4 - 0
notes.md

@@ -1,4 +1,8 @@
+which registers to use for coloring?
+which not?
 
+register allocation
+  update print x86