aboutsummaryrefslogtreecommitdiff
path: root/constants.py
diff options
context:
space:
mode:
authorVed Shanbhogue <91900059+ved-rivos@users.noreply.github.com>2023-10-17 14:32:19 -0500
committerGitHub <noreply@github.com>2023-10-17 12:32:19 -0700
commit19e3ddcc323b809a8b71f9fb0998320e2ba95005 (patch)
tree64f303535d9a4d6c927b76957080cca3d2a5d286 /constants.py
parentd23e15c2c8823033b3ed0af9b25706b91af77e8f (diff)
downloadriscv-opcodes-19e3ddcc323b809a8b71f9fb0998320e2ba95005.zip
riscv-opcodes-19e3ddcc323b809a8b71f9fb0998320e2ba95005.tar.gz
riscv-opcodes-19e3ddcc323b809a8b71f9fb0998320e2ba95005.tar.bz2
Add pseudo-instructions for Zimop/Zcmop (#194)
* add mop.r.N and mop.rr.N pseudo-inst * add c.mop.N pseudo-inst * add arg_lut entries and emitted pseudoops for Zimop/Zcmop * add pseudoinsts for Zimop * add pseudoinsts for Zcmop * update zcmop mnemonics * update zcmop mnemonics
Diffstat (limited to 'constants.py')
-rw-r--r--constants.py57
1 files changed, 57 insertions, 0 deletions
diff --git a/constants.py b/constants.py
index 9ff08c0..1298aa7 100644
--- a/constants.py
+++ b/constants.py
@@ -47,6 +47,14 @@ with open("arg_lut.csv") as f:
v = (int(row[1]), int(row[2]))
arg_lut[k] = v
+# for mop
+arg_lut['mop_r_t_30'] = (30,30)
+arg_lut['mop_r_t_27_26'] = (27,26)
+arg_lut['mop_r_t_21_20'] = (21, 20)
+arg_lut['mop_rr_t_30'] = (30,30)
+arg_lut['mop_rr_t_27_26'] = (27, 26)
+arg_lut['c_mop_t'] = (10,8)
+
# dictionary containing the mapping of the argument to the what the fields in
# the latex table should be
latex_mapping = {}
@@ -156,4 +164,53 @@ emitted_pseudo_ops = [
'srli_rv128',
'srli_rv32',
'umax32',
+ 'c_mop_1',
+ 'c_mop_3',
+ 'c_mop_5',
+ 'c_mop_7',
+ 'c_mop_9',
+ 'c_mop_11',
+ 'c_mop_13',
+ 'c_mop_15',
+ 'mop_r_0',
+ 'mop_r_1',
+ 'mop_r_2',
+ 'mop_r_3',
+ 'mop_r_4',
+ 'mop_r_5',
+ 'mop_r_6',
+ 'mop_r_7',
+ 'mop_r_8',
+ 'mop_r_9',
+ 'mop_r_10',
+ 'mop_r_11',
+ 'mop_r_12',
+ 'mop_r_13',
+ 'mop_r_14',
+ 'mop_r_15',
+ 'mop_r_16',
+ 'mop_r_17',
+ 'mop_r_18',
+ 'mop_r_19',
+ 'mop_r_20',
+ 'mop_r_21',
+ 'mop_r_22',
+ 'mop_r_23',
+ 'mop_r_24',
+ 'mop_r_25',
+ 'mop_r_26',
+ 'mop_r_27',
+ 'mop_r_28',
+ 'mop_r_29',
+ 'mop_r_30',
+ 'mop_r_31',
+ 'mop_r_32',
+ 'mop_rr_0',
+ 'mop_rr_1',
+ 'mop_rr_2',
+ 'mop_rr_3',
+ 'mop_rr_4',
+ 'mop_rr_5',
+ 'mop_rr_6',
+ 'mop_rr_7',
]