mirror of
https://github.com/janishutz/eth-summaries.git
synced 2026-03-14 10:50:05 +01:00
[SPCA] Design fixes
This commit is contained in:
@@ -5,7 +5,7 @@ The most obvious difference between the two is that they invert the order of ope
|
||||
i.e. where the AT\&T syntax has the destination as the second argument, the Intel syntax puts it first.
|
||||
|
||||
The state that is visible to us is:
|
||||
\begin{itemize}
|
||||
\begin{itemize}[noitemsep]
|
||||
\item PC (Program Counter) that contains the address of the next instruction
|
||||
\item Register file that contains the most used program data
|
||||
\item Condition codes that store status information about most recent arithmetic operation and are used for conditional branching
|
||||
|
||||
@@ -21,5 +21,4 @@ In other words, any 16 bit code would still work as previously, as e.g. the \tex
|
||||
|
||||
The same happened again when extending to 64-bit, only this time the \texttt{r} prefix was used.
|
||||
So, the register \texttt{\$eax} was now the lower 32 bits of \texttt{\%rax}.
|
||||
|
||||
Additionally, the following registers are also available, with \texttt{X} to be substituted with 8 through 15: \texttt{\%rX} and the lower 32 bits \texttt{\%rXd}
|
||||
|
||||
@@ -5,7 +5,7 @@ The following postfixes are available: \texttt{b} (byte, 1 byte), \texttt{w} (wo
|
||||
The following options can be passed for source and destination: Registers,
|
||||
|
||||
\content{Immediates} To use a constant value (aka Immediate) in an instruction, we prefix the number with \texttt{\$} (following number is decimal).
|
||||
To use hex, we can use \texttt{\$0x}, etc.
|
||||
To use hex, we can use \texttt{\$0x}, for binary, we can use \texttt{\$0b}, etc.
|
||||
|
||||
\content{Memory addresses} To treat a register as a memory address, use parenthesis, e.g. \texttt{(\%rax)} interprets the value of \texttt{\%rax} as a memory address.
|
||||
The instruction will then read the number of bytes, as specified by the postfix of the instruction.
|
||||
|
||||
Reference in New Issue
Block a user