aboutsummaryrefslogtreecommitdiff
path: root/src/rv64.tex
diff options
context:
space:
mode:
authorKrste Asanovic <krste@eecs.berkeley.edu>2018-08-06 00:59:38 -0700
committerKrste Asanovic <krste@eecs.berkeley.edu>2018-08-06 00:59:38 -0700
commit42f3c82d1a669004e0ccdd5eb6b8fa90d358141a (patch)
tree1b0bb1627222548300e93277eb2623ce4204915d /src/rv64.tex
parent695d84330e22b39a0b8cdfc0c54bb0e390bbcefa (diff)
downloadriscv-isa-manual-42f3c82d1a669004e0ccdd5eb6b8fa90d358141a.zip
riscv-isa-manual-42f3c82d1a669004e0ccdd5eb6b8fa90d358141a.tar.gz
riscv-isa-manual-42f3c82d1a669004e0ccdd5eb6b8fa90d358141a.tar.bz2
Cleaned up RV64 chapter to remove platform-specific mandates.
Diffstat (limited to 'src/rv64.tex')
-rw-r--r--src/rv64.tex19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/rv64.tex b/src/rv64.tex
index e4bfb3c..0aaf127 100644
--- a/src/rv64.tex
+++ b/src/rv64.tex
@@ -17,7 +17,7 @@ Additional instruction variants are provided to manipulate 32-bit
values in RV64I, indicated by a `W' suffix to the opcode. These
``*W'' instructions ignore the upper 32 bits of their inputs and
always produce 32-bit signed values, i.e. bits XLEN-1 through 31 are
-equal. They cause an illegal instruction exception in RV32I.
+equal.
\begin{commentary}
The compiler and calling convention maintain an invariant that all 32-bit
@@ -56,7 +56,7 @@ I-immediate[11:0] & src & ADDIW & dest & OP-IMM-32 \\
\end{tabular}
\end{center}
-ADDIW is an RV64I-only instruction that adds the sign-extended 12-bit
+ADDIW is an RV64I instruction that adds the sign-extended 12-bit
immediate to register {\em rs1} and produces the proper sign-extension
of a 32-bit result in {\em rd}. Overflows are ignored and the result
is the low 32 bits of the result sign-extended to 64 bits. Note,
@@ -101,14 +101,18 @@ shifted is in {\em rs1}, and the shift amount is encoded in the lower
encoded in bit 30. SLLI is a logical left shift (zeros are shifted
into the lower bits); SRLI is a logical right shift (zeros are shifted
into the upper bits); and SRAI is an arithmetic right shift (the
-original sign bit is copied into the vacated upper bits). For RV32I,
-SLLI, SRLI, and SRAI generate an illegal instruction exception if
-$imm[5] \neq 0$.
+original sign bit is copied into the vacated upper bits).
SLLIW, SRLIW, and SRAIW are RV64I-only instructions that are
analogously defined but operate on 32-bit values and produce
-signed 32-bit results. SLLIW, SRLIW, and SRAIW generate an illegal
-instruction exception if $imm[5] \neq 0$.
+signed 32-bit results. SLLIW, SRLIW, and SRAIW encodings
+with $imm[5] \neq 0$ are reserved.
+
+\begin{commentary}
+ Previously, SLLIW, SRLIW, and SRAIW with imm[5]=0 were defined to
+ cause illegal instruction exceptions, whereas now they are marked as
+ reserved. This is a backwards-compatible change.
+\end{commentary}
\vspace{-0.2in}
\begin{center}
@@ -128,7 +132,6 @@ U-immediate[31:12] & dest & AUIPC
\end{tabular}
\end{center}
-
LUI (load upper immediate) uses the same opcode as RV32I. LUI places
the 20-bit U-immediate into bits 31--12 of register {\em rd} and
places zero in the lowest 12 bits. The 32-bit result is