aboutsummaryrefslogtreecommitdiff
path: root/src/c.tex
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2017-04-10 23:34:55 -0700
committerAndrew Waterman <andrew@sifive.com>2017-04-10 23:34:55 -0700
commitb2936be90094c9ac4a00711fe424cc9f9bbf90b5 (patch)
tree95e3c58d3496a00f9caf98d6363e2e6547edc75c /src/c.tex
parent676bd3db6b6c8e8565ed121229e2c8a7f4d0f20a (diff)
downloadriscv-isa-manual-b2936be90094c9ac4a00711fe424cc9f9bbf90b5.zip
riscv-isa-manual-b2936be90094c9ac4a00711fe424cc9f9bbf90b5.tar.gz
riscv-isa-manual-b2936be90094c9ac4a00711fe424cc9f9bbf90b5.tar.bz2
Make immediate signs explicit in RVC table
Adapted from @DSHorner's #31
Diffstat (limited to 'src/c.tex')
-rw-r--r--src/c.tex8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/c.tex b/src/c.tex
index 448a072..3d6f689 100644
--- a/src/c.tex
+++ b/src/c.tex
@@ -748,7 +748,7 @@ format and can target any integer register.
\hline
3 & 1 & 5 & 5 & 2 \\
C.LI & imm[5] & dest$\neq$0 & imm[4:0] & C1 \\
-C.LUI & nzimm[17] & $\textrm{dest}{\neq}{\left\{0,2\right\}}$ & nzimm[16:12] & C1 \\
+C.LUI & nzuimm[17] & $\textrm{dest}{\neq}{\left\{0,2\right\}}$ & nzuimm[16:12] & C1 \\
\end{tabular}
\end{center}
C.LI loads the sign-extended 6-bit immediate, {\em imm}, into
@@ -760,7 +760,7 @@ destination register, clears the bottom 12 bits, and sign-extends bit
17 into all higher bits of the destination. C.LUI is only valid when
$\textit{rd}{\neq}{\left\{\texttt{x0},\texttt{x2}\right\}}$,
and when the immediate is not equal to zero.
-C.LUI expands into {\tt lui rd, nzimm[17:12]}.
+C.LUI expands into {\tt lui rd, nzuimm[17:12]}.
\subsection*{Integer Register-Immediate Operations}
@@ -827,7 +827,7 @@ is always 16-byte aligned.
\multicolumn{1}{c|}{op} \\
\hline
3 & 8 & 3 & 2 \\
-C.ADDI4SPN & zimm[5:4$\vert$9:6$\vert$2$\vert$3] & dest & C0 \\
+C.ADDI4SPN & nzuimm[5:4$\vert$9:6$\vert$2$\vert$3] & dest & C0 \\
\end{tabular}
\end{center}
@@ -835,7 +835,7 @@ C.ADDI4SPN is a CIW-format RV32C/RV64C-only instruction that adds a
{\em zero}-extended non-zero immediate, scaled by 4, to the stack pointer,
{\tt x2}, and writes the result to {\tt rd$'$}. This instruction is used
to generate pointers to stack-allocated variables, and expands to
-{\tt addi rd$'$, x2, zimm[9:2]}.
+{\tt addi rd$'$, x2, nzuimm[9:2]}.
\vspace{-0.4in}