diff options
author | Krste Asanovic <krste@eecs.berkeley.edu> | 2020-03-03 18:54:12 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-03 18:54:12 -0800 |
commit | 48d223e2e737c3247a7f0725815037938273873d (patch) | |
tree | 297c89e77d5720f1509b47fd298d261f282e0764 /src/rv64.tex | |
parent | 70b5dee5b4df8d230dd60f93db61638bd69d054d (diff) | |
parent | 0ac0b9a801299896f20aaa69744e246e71204150 (diff) | |
download | riscv-isa-manual-48d223e2e737c3247a7f0725815037938273873d.zip riscv-isa-manual-48d223e2e737c3247a7f0725815037938273873d.tar.gz riscv-isa-manual-48d223e2e737c3247a7f0725815037938273873d.tar.bz2 |
Merge pull request #453 from riscv/u-immediate
Consistently claim that U-immediate is 32 bits, not 20 bits
Diffstat (limited to 'src/rv64.tex')
-rw-r--r-- | src/rv64.tex | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/rv64.tex b/src/rv64.tex index 9321ac4..24e78b1 100644 --- a/src/rv64.tex +++ b/src/rv64.tex @@ -134,15 +134,16 @@ U-immediate[31:12] & dest & AUIPC \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 -sign-extended to 64 bits. +the 32-bit U-immediate into register {\em rd}, filling in the lowest 12 +bits with zeros. +The 32-bit result is sign-extended to 64 bits. AUIPC (add upper immediate to {\tt pc}) uses the same opcode as RV32I. AUIPC is used to build {\tt - pc}-relative addresses and uses the U-type format. AUIPC appends 12 -low-order zero bits to the 20-bit U-immediate, sign-extends the result -to 64 bits, adds it to the address of the AUIPC instruction, + pc}-relative addresses and uses the U-type format. AUIPC forms a 32-bit +offset from the U-immediate, filling in the lowest 12 bits with zeros, +sign-extends the result to 64 bits, +adds it to the address of the AUIPC instruction, then places the result in register {\em rd}. \subsubsection*{Integer Register-Register Operations} |