aboutsummaryrefslogtreecommitdiff
path: root/src/zimop.adoc
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2023-10-06 16:31:54 -0700
committerAndrew Waterman <andrew@sifive.com>2023-10-06 16:42:17 -0700
commitf98344f3e7db9e340c466b4b93972b43f08c3ca1 (patch)
treea79d8845f20ee6dd4410660e6dca7bc11ebbf646 /src/zimop.adoc
parentd924944fa58d21547ee72fd3fec6020ef2f3337c (diff)
downloadriscv-isa-manual-f98344f3e7db9e340c466b4b93972b43f08c3ca1.zip
riscv-isa-manual-f98344f3e7db9e340c466b4b93972b43f08c3ca1.tar.gz
riscv-isa-manual-f98344f3e7db9e340c466b4b93972b43f08c3ca1.tar.bz2
Number c.mop instructions more intuitively
h/t @jhauser-us
Diffstat (limited to 'src/zimop.adoc')
-rw-r--r--src/zimop.adoc26
1 files changed, 13 insertions, 13 deletions
diff --git a/src/zimop.adoc b/src/zimop.adoc
index 0b4db59..32f0841 100644
--- a/src/zimop.adoc
+++ b/src/zimop.adoc
@@ -63,14 +63,14 @@ implementations of reading `x[rs1]` and `x[rs2]`.
=== "Zcmop" Compressed May-Be-Operations Extension, Version 0.1
This section defines the "Zcmop" extension, which defines eight 16-bit MOP
-instructions named `c.mop.__n__`, where __n__ is an integer between 0 and 7,
-inclusive. `c.mop.__n__` is encoded in the reserved encoding space
-corresponding to `c.lui x__m__, 0`, where __m__=2__n__+1, as shown in Table
+instructions named `c.mop.__n__`, where __n__ is an odd integer between 1 and
+15, inclusive. `c.mop.__n__` is encoded in the reserved encoding space
+corresponding to `c.lui x__n__, 0`, as shown in Table
<<tab:c-mop>>.
Unlike the MOPs defined in the Zimop extension, the `c.mop.__n__` instructions
are defined to _not_ write any register.
Their encoding allows future extensions to define them to read register
-`x[__m__]`.
+`x[__n__]`.
include::images/wavedrom/c-mop.adoc[]
[[c-mop]]
@@ -86,18 +86,18 @@ therefore of lower value for most purposes.
|===
|Mnemonic | Encoding | Redefinable to read register
-|c.mop.0 | `0110000010000001` | `x1`
-|c.mop.1 | `0110000110000001` | `x3`
-|c.mop.2 | `0110001010000001` | `x5`
-|c.mop.3 | `0110001110000001` | `x7`
-|c.mop.4 | `0110010010000001` | `x9`
-|c.mop.5 | `0110010110000001` | `x11`
-|c.mop.6 | `0110011010000001` | `x13`
-|c.mop.7 | `0110011110000001` | `x15`
+|c.mop.1 | `0110000010000001` | `x1`
+|c.mop.3 | `0110000110000001` | `x3`
+|c.mop.5 | `0110001010000001` | `x5`
+|c.mop.7 | `0110001110000001` | `x7`
+|c.mop.9 | `0110010010000001` | `x9`
+|c.mop.11 | `0110010110000001` | `x11`
+|c.mop.13 | `0110011010000001` | `x13`
+|c.mop.15 | `0110011110000001` | `x15`
|===
NOTE: The recommended assembly syntax for `c.mop.__n__` is simply the nullary
-`c.mop.__n__`. The possibly accessed register is implicitly `x__m__`.
+`c.mop.__n__`. The possibly accessed register is implicitly `x__n__`.
NOTE: The expectation is that each Zcmop instruction is equivalent to some
Zimop instruction, but the choice of expansion (if any) is left to the