Skip to content

Commit

Permalink
remap cincoffsetimm to op-imm-32 and make cincoffset with rs2=x0 deco…
Browse files Browse the repository at this point in the history
…de as cmove
  • Loading branch information
tariqkurd-repo committed Jan 8, 2024
1 parent 17a3dd7 commit a9c4551
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions unratified/rv64_cheri
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
lc rd rs1 imm12 14..12=4 6..2=0x03 1..0=3
sc imm12hi rs1 rs2 imm12lo 14..12=4 6..2=0x08 1..0=3

#6-bit immediate fits, should hopefully be enough?
cincoffsetimm rd rs1 imm6 31..26=1 14..12=1 6..2=0x04 1..0=3
#need to ADDIW
cincoffsetimm rd rs1 imm12 14..12=2 6..2=0x06 1..0=3
#5-bit immediate and 25 says whether to shift it
csetboundsimm rd rs1 imm5 31..26=1 14..12=5 6..2=0x04 1..0=3
csetboundsimm rd rs1 imm5 31..26=1 14..12=5 6..2=0x04 1..0=3

cincoffset rd rs1 rs2 31..25=6 14..12=0 6..2=0x0C 1..0=3
#if rs2=x0 decode as cmove
cincoffset rd rs1 rs2 31..25=6 14..12=0 6..2=0x06 1..0=3
cmove rd rs1 24..20=0 31..25=6 14..12=0 6..2=0x06 1..0=3
csetaddr rd rs1 rs2 31..25=6 14..12=1 6..2=0x0C 1..0=3
candperm rd rs1 rs2 31..25=6 14..12=2 6..2=0x0C 1..0=3
csethigh rd rs1 rs2 31..25=6 14..12=3 6..2=0x0C 1..0=3
Expand All @@ -19,7 +21,6 @@ csetboundsinexact rd rs1 rs2 31..25=7 14..12=1 6..2=0x0C 1..0=3

cgettag rd rs1 31..25=8 24..20=0 14..12=0 6..2=0x0C 1..0=3
cgetperm rd rs1 31..25=8 24..20=1 14..12=0 6..2=0x0C 1..0=3
cmove rd rs1 31..25=8 24..20=2 14..12=0 6..2=0x0C 1..0=3
csetmode rd rs1 31..25=8 24..20=3 14..12=0 6..2=0x0C 1..0=3
cgethigh rd rs1 31..25=8 24..20=4 14..12=0 6..2=0x0C 1..0=3
cgetbase rd rs1 31..25=8 24..20=5 14..12=0 6..2=0x0C 1..0=3
Expand Down

0 comments on commit a9c4551

Please sign in to comment.