aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Hauser <31252952+jhauser-us@users.noreply.github.com>2020-08-14 14:00:15 -0700
committerGitHub <noreply@github.com>2020-08-14 14:00:15 -0700
commit5b5041e36ed0a902b6fca6e13d56966112fa843a (patch)
tree793b6b9eacb8a5f1c733188739a1108d6eee6059
parent9ee57dfe71b884b85200b8470816e687301cfaf6 (diff)
downloadriscv-isa-manual-5b5041e36ed0a902b6fca6e13d56966112fa843a.zip
riscv-isa-manual-5b5041e36ed0a902b6fca6e13d56966112fa843a.tar.gz
riscv-isa-manual-5b5041e36ed0a902b6fca6e13d56966112fa843a.tar.bz2
Improve table of conditions for explicit CSR read/write (#564)
-rw-r--r--src/csr.tex33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/csr.tex b/src/csr.tex
index bac1c7b..266e02a 100644
--- a/src/csr.tex
+++ b/src/csr.tex
@@ -100,30 +100,33 @@ any read side effects regardless of {\em rd} and {\em rs1} fields.
\begin{table}
\centering
- \begin{tabular}{|l|r|r|c|c|}
+ \begin{tabular}{|l|c|c|c|c|}
\hline
\multicolumn{5}{|c|}{Register operand} \\
\hline
- Instruction & rd & rs1 & read CSR? & write CSR? \\
+ Instruction & \textit{rd} is \texttt{x0}
+ & \textit{rs1} is \texttt{x0}
+ & Reads CSR & Writes CSR \\
\hline
- CSRRW & {\tt x0} & - & no & yes \\
- CSRRW & !{\tt x0} & - & yes & yes \\
- CSRR{S/C} & - & {\tt x0} & yes & no \\
- CSRR{S/C} & - & !{\tt x0} & yes & yes \\
+ CSRRW & Yes & -- & No & Yes \\
+ CSRRW & No & -- & Yes & Yes \\
+ CSRRS/CSRRC & -- & Yes & Yes & No \\
+ CSRRS/CSRRC & -- & No & Yes & Yes \\
\hline
\multicolumn{5}{|c|}{Immediate operand} \\
\hline
-Instruction & rd & uimm & read CSR? & write CSR? \\
+ Instruction & \textit{rd} is \texttt{x0}
+ & \textit{uimm}$=$0
+ & Reads CSR & Writes CSR \\
+ \hline
+ CSRRWI & Yes & -- & No & Yes \\
+ CSRRWI & No & -- & Yes & Yes \\
+ CSRRSI/CSRRCI & -- & Yes & Yes & No \\
+ CSRRSI/CSRRCI & -- & No & Yes & Yes \\
\hline
- CSRRWI & {\tt x0} & - & no & yes \\
- CSRRWI & !{\tt x0} & - & yes & yes \\
- CSRR{S/C}I & - & 0 & yes & no \\
- CSRR{S/C}I & - & !0 & yes & yes \\
- \hline
\end{tabular}
- \caption{Table showing whether a CSR instruction reads or writes a
- given CSR. The CSRRS and CSRRC instructions have same behavior so
- are shown as CSRR{S/C} in Table.}
+ \caption{Conditions determining whether a CSR instruction reads or writes
+ the specified CSR.}
\label{tab:csrsideeffects}
\end{table}