|
@@ -985,7 +985,7 @@ main:
|
|
|
callq print_int
|
|
|
retq
|
|
|
\end{lstlisting}
|
|
|
-\caption{\it An x86-64 program equivalent to $\BINOP{+}{10}{32}$.}
|
|
|
+\caption{An x86-64 program equivalent to $\BINOP{+}{10}{32}$.}
|
|
|
\label{fig:p0-x86}
|
|
|
\end{wrapfigure}
|
|
|
%% \marginpar{Consider using italics for the texts in these figures.
|
|
@@ -1050,10 +1050,10 @@ _main:
|
|
|
The next example exhibits the use of memory. Figure~\ref{fig:p1-x86}
|
|
|
lists an x86-64 program that is equivalent to $\BINOP{+}{52}{
|
|
|
\UNIOP{-}{10} }$. To understand how this x86-64 program works, we
|
|
|
-need to explain a region of memory called called the \emph{procedure
|
|
|
- call stack} (or \emph{stack} for short). The stack consists of a
|
|
|
-separate \emph{frame} for each procedure call. The memory layout for
|
|
|
-an individual frame is shown in Figure~\ref{fig:frame}. The register
|
|
|
+need to explain a region of memory called the \emph{procedure call
|
|
|
+ stack} (or \emph{stack} for short). The stack consists of a separate
|
|
|
+\emph{frame} for each procedure call. The memory layout for an
|
|
|
+individual frame is shown in Figure~\ref{fig:frame}. The register
|
|
|
\key{rsp} is called the \emph{stack pointer} and points to the item at
|
|
|
the top of the stack. The stack grows downward in memory, so we
|
|
|
increase the size of the stack by subtracting from the stack
|