aboutsummaryrefslogtreecommitdiff
path: root/src/rv32.tex
diff options
context:
space:
mode:
authorJohn Hauser <31252952+jhauser-us@users.noreply.github.com>2020-08-14 13:58:14 -0700
committerGitHub <noreply@github.com>2020-08-14 13:58:14 -0700
commit9ee57dfe71b884b85200b8470816e687301cfaf6 (patch)
tree515a8148dc198a635afe87a00afade007cd182d1 /src/rv32.tex
parent7dee20c9c802d0966d2beaddb11d1e1501a35b99 (diff)
downloadriscv-isa-manual-9ee57dfe71b884b85200b8470816e687301cfaf6.zip
riscv-isa-manual-9ee57dfe71b884b85200b8470816e687301cfaf6.tar.gz
riscv-isa-manual-9ee57dfe71b884b85200b8470816e687301cfaf6.tar.bz2
Improve table of RAS hints for JALR instructions (#563)
Diffstat (limited to 'src/rv32.tex')
-rw-r--r--src/rv32.tex21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/rv32.tex b/src/rv32.tex
index bb7348b..b28fd7a 100644
--- a/src/rv32.tex
+++ b/src/rv32.tex
@@ -822,24 +822,25 @@ detection of instructions used for procedure calls and returns to be
effective. For RISC-V, hints as to the instructions' usage are encoded
implicitly via the register numbers used. A JAL instruction should
push the return address onto a return-address stack (RAS) only when
-{\em rd}$=${\tt x1}/{\tt x5}. JALR instructions should push/pop a
+{\em rd} is {\tt x1} or {\tt x5}. JALR instructions should push/pop a
RAS as shown in the Table~\ref{rashints}.
\begin{table}[hbt]
\centering
\begin{tabular}{|c|c|c|l|}
\hline
- \em rd & \em rs1 & {\em rs1}$=${\em rd} & RAS action \\
+ \textit{rd} is \texttt{x1}/\texttt{x5}
+ & \textit{rs1} is \texttt{x1}/\texttt{x5}
+ & \textit{rd}$=$\textit{rs1} & RAS action \\
\hline
- !{\em link} & !{\em link} & - & none \\
- !{\em link} & {\em link} & - & pop \\
- {\em link} & !{\em link} & - & push \\
- {\em link} & {\em link} & 0 & pop, then push \\
- {\em link} & {\em link} & 1 & push \\
+ No & No & -- & None \\
+ No & Yes & -- & Pop \\
+ Yes & No & -- & Push \\
+ Yes & Yes & No & Pop, then push \\
+ Yes & Yes & Yes & Push \\
\hline
\end{tabular}
-\caption{Return-address stack prediction hints encoded in register
- specifiers used in the instruction. In the above, {\em link} is
- true when the register is either {\tt x1} or {\tt x5}.}
+\caption{Return-address stack prediction hints encoded in the register
+ operands of a JALR instruction.}
\label{rashints}
\end{table}