|
@@ -1022,16 +1022,22 @@ language to compile $R_1$.
|
|
|
\section{The x86 Assembly Language}
|
|
|
\label{sec:x86}
|
|
|
|
|
|
-An x86 program is a sequence of instructions. The program is stored in
|
|
|
-the computer's memory and the \emph{program counter} points to the
|
|
|
-address of the next instruction to be executed. For most instructions,
|
|
|
-once the instruction is executed, the program counter is incremented
|
|
|
-to point to the immediately following instruction in the program.
|
|
|
-Each instruction may refer to integer constants (called
|
|
|
-\emph{immediate values}), variables called \emph{registers}, and
|
|
|
-instructions may load and store values into memory. For our purposes,
|
|
|
-we can think of the computer's memory as a mapping of 64-bit addresses
|
|
|
-to 64-bit values. Figure~\ref{fig:x86-a} defines the syntax for the
|
|
|
+An x86 program is a sequence of instructions. The program is stored in the
|
|
|
+computer's memory and the \emph{program counter} points to the address of the
|
|
|
+next instruction to be executed. For most instructions, once the instruction is
|
|
|
+executed, the program counter is incremented to point to the immediately
|
|
|
+following instruction in the program. Each instruction may refer to integer
|
|
|
+constants (called \emph{immediate values}), variables called \emph{registers},
|
|
|
+and instructions may load and store values into memory. For our purposes, we
|
|
|
+can think of the computer's memory as a mapping of 64-bit addresses to 64-bit
|
|
|
+%
|
|
|
+values\footnote{This simple story doesn't fully cover contemporary x86
|
|
|
+ processors, which combine multiple processing cores per silicon chip, together
|
|
|
+ with hardware memory caches. The result is that, at some instants in real
|
|
|
+ time, different programs may hold conflicting cached values for a given memory
|
|
|
+ address.}.
|
|
|
+%
|
|
|
+Figure~\ref{fig:x86-a} defines the syntax for the
|
|
|
subset of the x86 assembly language needed for this chapter. (We use
|
|
|
the AT\&T syntax expected by the GNU assembler inside \key{gcc}.)
|
|
|
Also, Appendix~\ref{sec:x86-quick-reference} includes a
|