diff options
author | Andrew Waterman <andrew@sifive.com> | 2017-04-10 23:34:55 -0700 |
---|---|---|
committer | Andrew Waterman <andrew@sifive.com> | 2017-04-10 23:34:55 -0700 |
commit | b2936be90094c9ac4a00711fe424cc9f9bbf90b5 (patch) | |
tree | 95e3c58d3496a00f9caf98d6363e2e6547edc75c /src/c.tex | |
parent | 676bd3db6b6c8e8565ed121229e2c8a7f4d0f20a (diff) | |
download | riscv-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.tex | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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} |