Skip to content

Commit

Permalink
Merge pull request riscv#211 from ved-rivos/zicfiss_insts
Browse files Browse the repository at this point in the history
Add unratified Zicfiss extension instructions
  • Loading branch information
aswaterman authored Nov 27, 2023
2 parents 616660c + e184bfc commit fbc47d2
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,10 @@
'srli_rv32',
'umax32',
'c_mop_1',
'c_sspush_x1',
'c_mop_3',
'c_mop_5',
'c_sspopchk_x5',
'c_mop_7',
'c_mop_9',
'c_mop_11',
Expand Down Expand Up @@ -201,6 +203,9 @@
'mop_r_26',
'mop_r_27',
'mop_r_28',
'sspopchk_x1',
'sspopchk_x5',
'ssrdp',
'mop_r_29',
'mop_r_30',
'mop_r_31',
Expand All @@ -213,4 +218,6 @@
'mop_rr_5',
'mop_rr_6',
'mop_rr_7',
'sspush_x1',
'sspush_x5',
]
5 changes: 5 additions & 0 deletions unratified/rv_c_zicfiss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# c.sspush x1 -> c.mop.1
$pseudo_op rv_zcmop::c.mop.N c.sspush.x1 1..0=1 6..2=0 11..7=1 12=0 15..13=3

# c.sspopchk x5 -> c.mop.5
$pseudo_op rv_zcmop::c.mop.N c.sspopchk.x5 1..0=1 6..2=0 11..7=5 12=0 15..13=3
14 changes: 14 additions & 0 deletions unratified/rv_zicfiss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
ssamoswap.w rd rs1 rs2 aq rl 31..29=2 28..27=1 14..12=2 6..2=0x0B 1..0=3
ssamoswap.d rd rs1 rs2 aq rl 31..29=2 28..27=1 14..12=3 6..2=0x0B 1..0=3

# sspopchk x1/x5 -> mop.r.28 rd=x0, rs1=x1/x5
$pseudo_op rv_zimop::mop.r.N sspopchk.x1 30=1 27=1 26=1 21=0 20=0 31=1 29..28=0 25..22=7 19..15=1 14..12=4 11..7=0 6..2=0x1C 1..0=3
$pseudo_op rv_zimop::mop.r.N sspopchk.x5 30=1 27=1 26=1 21=0 20=0 31=1 29..28=0 25..22=7 19..15=5 14..12=4 11..7=0 6..2=0x1C 1..0=3

# ssrdp rd != x0 -> mop.r.28 rd!=x0, rs1=x0
$pseudo_op rv_zimop::mop.r.N ssrdp rd_n0 30=1 27=1 26=1 21=0 20=0 31=1 29..28=0 25..22=7 19..15=0 14..12=4 6..2=0x1C 1..0=3

# sspush x1/x5 -> mop.rr.7 rd=x0, rs2=x1/x5, rs1=x0
$pseudo_op rv_zimop::mop.rr.N sspush.x1 30=1 27=1 26=1 31=1 29..28=0 25=1 24..20=1 19..15=0 14..12=4 11..7=0 6..2=0x1C 1..0=3
$pseudo_op rv_zimop::mop.rr.N sspush.x5 30=1 27=1 26=1 31=1 29..28=0 25=1 24..20=5 19..15=0 14..12=4 11..7=0 6..2=0x1C 1..0=3

0 comments on commit fbc47d2

Please sign in to comment.