Commit c871bbd1 authored by Michael Matz's avatar Michael Matz

* linker-optimization.tex (Optimize GOTPCRELX Relocations):

Convert mov to mov for symbol defined locally in the lower
32-bit address space when PIC is off.

This restores r251 from the master svn repo of the x86-64 psABI,
whose server is gone.  r251 was the last committed version in that
repo before the server went away (at the point of this commit,
2018-01-29).
parent 16aa753a
2016-04-25 H.J. Lu <[email protected]>
* linker-optimization.tex (Optimize GOTPCRELX Relocations):
Convert mov to mov for symbol defined locally in the lower
32-bit address space when PIC is off.
2016-02-29 Michael Matz <[email protected]>
* low-level-sys-info.tex (Register pass classification,
......
......@@ -72,13 +72,13 @@ into a different form on immediate operand if \texttt{foo} is defined
locally.
\begin{description}
\item[\textindex{Convert call, jmp and mov}]
Convert memory operand of \code{call}, \code{jmp} and \code{mov} into
\item[\textindex{Convert call and jmp}]
Convert memory operand of \code{call} and \code{jmp} into
immediate operand.
\begin{table}[H]
\Hrule
\caption{Call, Jmp and Mov Conversion}
\caption{Call and Jmp Conversion}
\begin{center}
\small\code{
\begin{tabular}{l|l}
......@@ -87,6 +87,28 @@ locally.
call *[email protected](\%rip) & nop call foo \\
call *[email protected](\%rip) & call foo nop \\
jmp *[email protected](\%rip) & jmp foo nop \\
\end{tabular}
}
\end{center}
\Hrule
\end{table}
\item[\textindex{Convert mov}]
Convert memory operand of \code{mov} into immediate operand. When
position-independent code is disabled and \texttt{foo} is defined
locally in the lower 32-bit address space, memory operand in \code{mov}
can be converted into immediate operand. Otherwise, \code{mov} must
be changed to \code{lea}.
\begin{table}[H]
\Hrule
\caption{Mov Conversion}
\begin{center}
\small\code{
\begin{tabular}{l|l}
\multicolumn{1}{c}{Memory Operand} & \multicolumn{1}{c}{Immediate Operand} \\
\hline
mov [email protected](\%rip), \%reg & mov \$foo, \%reg \\
mov [email protected](\%rip), \%reg & lea foo(\%rip), \%reg \\
\end{tabular}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment