aboutsummaryrefslogtreecommitdiff
path: root/rv64_c
diff options
context:
space:
mode:
authorNeel Gala <neelgala@incoresemi.com>2022-04-08 17:38:10 +0530
committerNeel Gala <neelgala@incoresemi.com>2022-04-08 20:11:59 +0530
commit88085a5f6bbb74cb434ff62bacc5912f41fb913b (patch)
tree64cade26276a85e63550a6b66461e39dfe075235 /rv64_c
parent56147c766f68cf19f826fde0e4897e988d658bcf (diff)
downloadriscv-opcodes-88085a5f6bbb74cb434ff62bacc5912f41fb913b.zip
riscv-opcodes-88085a5f6bbb74cb434ff62bacc5912f41fb913b.tar.gz
riscv-opcodes-88085a5f6bbb74cb434ff62bacc5912f41fb913b.tar.bz2
migrate C-extension opcodes (major)
- the previous opcodes used ignore to define immediate fields instead of assigning arg names to it. This is made it difficult to parse and decode the instructions. - this commit assigns unique names to immediate fields in accordance to what has been done elsewhere. Note these names hold no correspondence to the spec and are defined here purely to ease decoding - This commit also splits the instructions which depend on F/D/Q in to their respective files as per new naming convention - c.nop encoding has been changed to include hints as well.
Diffstat (limited to 'rv64_c')
-rw-r--r--rv64_c17
1 files changed, 17 insertions, 0 deletions
diff --git a/rv64_c b/rv64_c
new file mode 100644
index 0000000..39d087a
--- /dev/null
+++ b/rv64_c
@@ -0,0 +1,17 @@
+# quadrant 0
+c.ld rd_p rs1_p c_uimm8lo c_uimm8hi 1..0=0 15..13=3
+c.sd rs1_p rs2_p c_uimm8hi c_uimm8lo 1..0=0 15..13=7
+
+#quadrant 1
+c.addiw rd_rs1 c_imm6lo c_imm6hi 1..0=1 15..13=1
+c.srli rd_rs1_p c_nzuimm6lo c_nzuimm6hi 1..0=1 15..13=4 11..10=0
+c.srai rd_rs1_p c_nzuimm6lo c_nzuimm6hi 1..0=1 15..13=4 11..10=1
+c.subw rd_rs1_p rs2_p 1..0=1 15..13=4 12..10=0b111 6..5=0
+c.addw rd_rs1_p rs2_p 1..0=1 15..13=4 12..10=0b111 6..5=1
+
+
+#quadrant 2
+c.slli rd_rs1_n0 c_nzuimm6hi c_nzuimm6lo 1..0=2 15..13=0
+c.ldsp rd_n0 c_uimm9sphi c_uimm9splo 1..0=2 15..13=3
+c.sdsp c_rs2 c_uimm9sp_s 1..0=2 15..13=7
+