diff options
author | Palmer Dabbelt <palmer@dabbelt.com> | 2018-10-25 17:22:53 -0700 |
---|---|---|
committer | Andrew Waterman <aswaterman@gmail.com> | 2018-10-26 09:22:53 +0900 |
commit | 15c872135d33de854a797126d68e5d24b7c18480 (patch) | |
tree | 33b051ceddbbd95490ac30951037114029c579a3 /src/c.tex | |
parent | 015b13e021d3a0604435a0e81ef98ac2e0e4fb21 (diff) | |
download | riscv-isa-manual-15c872135d33de854a797126d68e5d24b7c18480.zip riscv-isa-manual-15c872135d33de854a797126d68e5d24b7c18480.tar.gz riscv-isa-manual-15c872135d33de854a797126d68e5d24b7c18480.tar.bz2 |
A pair of somewhat pedantic changes to the wording of C.NOP (#248)
* "c.addi x0, 0" isn't a legal instruction
I was reviewing some QEMU patches recently and noticed an oddity of the
current description of the ISA manual: the NOP instruction can also
decode as a valid ADDI instruction, but the C.NOP instruction cannot
decode as a valid C.ADDI instruction despite the ISA manual saying
"C.NOP is encoded as c.addi x0, 0 and so expands to addi x0, x0, 0".
This isn't a big deal, because "c.nop" does match what you'd expect the
encoding of "c.addi x0, 0", but it is technically incorrect because the
instruction "c.addi x0, 0" doesn't exist.
This patch fixes the text of "c.nop" to just say it expands to "NOP".
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
* The performance counters must respect "c.nop"
The non-compressed "nop" mentions that performance counters are modified
by the instruction, but the text of the compressed instruction make it
sound like that's not the case.
Diffstat (limited to 'src/c.tex')
-rw-r--r-- | src/c.tex | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1099,8 +1099,8 @@ C.NOP & 0 & 0 & 0 & C1 \\ \end{center} C.NOP is a CI-format instruction that does not change any user-visible state, -except for advancing the {\tt pc}. C.NOP is encoded as {\tt c.addi x0, 0} and -so expands to {\tt addi x0, x0, 0}. +except for advancing the {\tt pc} and incrementing any applicable performance +counters. C.NOP expands to {\tt nop}. \subsection*{Breakpoint Instruction} \vspace{-0.4in} |