aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Waterman <andrew@sifive.com>2023-09-15 17:18:27 -0700
committerGitHub <noreply@github.com>2023-09-15 17:18:27 -0700
commit5a756948354e1f8e08f9b74ab5b4d4f6bcc20c9b (patch)
treeb2e0a61164bb1725fa5bc17e4012b8d3711a4ede
parentd752f193cec46cfd33300abba2a3a0d020c36755 (diff)
parent7dc124efc440af1a32160d159002c0180750be9c (diff)
downloadriscv-opcodes-5a756948354e1f8e08f9b74ab5b4d4f6bcc20c9b.zip
riscv-opcodes-5a756948354e1f8e08f9b74ab5b4d4f6bcc20c9b.tar.gz
riscv-opcodes-5a756948354e1f8e08f9b74ab5b4d4f6bcc20c9b.tar.bz2
Merge pull request #187 from ved-rivos/zimop
Add unratified Zimop and Zcmop extension instructions
-rw-r--r--unratified/rv_zcmop13
-rw-r--r--unratified/rv_zimop49
2 files changed, 62 insertions, 0 deletions
diff --git a/unratified/rv_zcmop b/unratified/rv_zcmop
new file mode 100644
index 0000000..f58b7df
--- /dev/null
+++ b/unratified/rv_zcmop
@@ -0,0 +1,13 @@
+# Eight code points in the 16-bit encoding space
+# are provided for MOPs; encoded in the reserved
+# encoding space where c.lui N, 0 is encoded i.e
+# Where N is determined for c.mop.M as M*2+1
+
+c.mop.0 1..0=1 6..2=0 11..7=1 12=0 15..13=3
+c.mop.1 1..0=1 6..2=0 11..7=3 12=0 15..13=3
+c.mop.2 1..0=1 6..2=0 11..7=5 12=0 15..13=3
+c.mop.3 1..0=1 6..2=0 11..7=7 12=0 15..13=3
+c.mop.4 1..0=1 6..2=0 11..7=9 12=0 15..13=3
+c.mop.5 1..0=1 6..2=0 11..7=11 12=0 15..13=3
+c.mop.6 1..0=1 6..2=0 11..7=13 12=0 15..13=3
+c.mop.7 1..0=1 6..2=0 11..7=15 12=0 15..13=3
diff --git a/unratified/rv_zimop b/unratified/rv_zimop
new file mode 100644
index 0000000..30e0fd7
--- /dev/null
+++ b/unratified/rv_zimop
@@ -0,0 +1,49 @@
+# The Zimop extension defines 32 MOP instructions named mop.r.0 -- mop.r.31.
+# They are encoded as 1-00--0111--sssss100ddddd1110011, where - denotes an
+# available opcode bit, s denotes the rs1 field, and d denotes the rd field.
+
+mop.r.0 rd rs1 30=0 27=0 26=0 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.1 rd rs1 30=0 27=0 26=0 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.2 rd rs1 30=0 27=0 26=0 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.3 rd rs1 30=0 27=0 26=0 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.4 rd rs1 30=0 27=0 26=1 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.5 rd rs1 30=0 27=0 26=1 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.6 rd rs1 30=0 27=0 26=1 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.7 rd rs1 30=0 27=0 26=1 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.8 rd rs1 30=0 27=1 26=0 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.9 rd rs1 30=0 27=1 26=0 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.10 rd rs1 30=0 27=1 26=0 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.11 rd rs1 30=0 27=1 26=0 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.12 rd rs1 30=0 27=1 26=1 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.13 rd rs1 30=0 27=1 26=1 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.14 rd rs1 30=0 27=1 26=1 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.15 rd rs1 30=0 27=1 26=1 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.16 rd rs1 30=1 27=0 26=0 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.17 rd rs1 30=1 27=0 26=0 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.18 rd rs1 30=1 27=0 26=0 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.19 rd rs1 30=1 27=0 26=0 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.20 rd rs1 30=1 27=0 26=1 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.21 rd rs1 30=1 27=0 26=1 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.22 rd rs1 30=1 27=0 26=1 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.23 rd rs1 30=1 27=0 26=1 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.24 rd rs1 30=1 27=1 26=0 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.25 rd rs1 30=1 27=1 26=0 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.26 rd rs1 30=1 27=1 26=0 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.27 rd rs1 30=1 27=1 26=0 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.28 rd rs1 30=1 27=1 26=1 21=0 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.29 rd rs1 30=1 27=1 26=1 21=0 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.30 rd rs1 30=1 27=1 26=1 21=1 20=0 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+mop.r.31 rd rs1 30=1 27=1 26=1 21=1 20=1 31=1 29..28=0 25..22=7 14..12=4 6..2=0x1C 1..0=3
+
+# The Zimop extension additionally defines 8 MOP instructions named mop.rr.0
+# -- mop.rr.7. They are encoded as 1-00--1tttttsssss100ddddd1110011, where t
+# denotes the rs2 field.
+
+mop.rr.0 rd rs1 rs2 30=0 27=0 26=0 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3
+mop.rr.1 rd rs1 rs2 30=0 27=0 26=1 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3
+mop.rr.2 rd rs1 rs2 30=0 27=1 26=0 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3
+mop.rr.3 rd rs1 rs2 30=0 27=1 26=1 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3
+mop.rr.4 rd rs1 rs2 30=1 27=0 26=0 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3
+mop.rr.5 rd rs1 rs2 30=1 27=0 26=1 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3
+mop.rr.6 rd rs1 rs2 30=1 27=1 26=0 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3
+mop.rr.7 rd rs1 rs2 30=1 27=1 26=1 31=1 29..28=0 25=1 14..12=4 6..2=0x1C 1..0=3