Skip to content

Commit

Permalink
correctly split cmv from cadd not from caddi
Browse files Browse the repository at this point in the history
  • Loading branch information
tariqkurd-repo committed Jun 10, 2024
1 parent 06d6b6f commit 9b88c00
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions arg_lut.csv
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"rt", 19, 15
"rs1", 19, 15
"rs2", 24, 20
"rs2_n0", 24, 20
"rs3", 31, 27
"aqrl", 26, 25
"aq", 26, 26
Expand Down
2 changes: 1 addition & 1 deletion constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
'c_mv': {'c_jr'},
'c_jalr': {'c_ebreak'},
'c_add': {'c_ebreak', 'c_jalr'},
'caddi': {'cmv'}
'cadd': {'cmv'}
}

isa_regex = \
Expand Down
11 changes: 6 additions & 5 deletions unratified/rv64_cheri
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
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
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

#next to ADDIW
caddi rd_n0 rs1 imm12 14..12=2 6..2=0x06 1..0=3
cmv 11..7=0x0 rs1 imm12 14..12=2 6..2=0x06 1..0=3
caddi rd rs1 imm12 14..12=2 6..2=0x06 1..0=3

#5-bit immediate and 25 says whether to shift it
scbndsi rd rs1 imm5 31..26=1 14..12=5 6..2=0x04 1..0=3

#if rs2=x0 decode as cmove
cadd rd rs1 rs2 31..25=6 14..12=0 6..2=0x0C 1..0=3
cadd rd rs1 rs2_n0 31..25=6 14..12=0 6..2=0x0C 1..0=3
cmv rd rs1 24..20=0x0 31..25=6 14..12=0 6..2=0x0C 1..0=3
scaddr rd rs1 rs2 31..25=6 14..12=1 6..2=0x0C 1..0=3
acperm rd rs1 rs2 31..25=6 14..12=2 6..2=0x0C 1..0=3
schi rd rs1 rs2 31..25=6 14..12=3 6..2=0x0C 1..0=3
Expand Down

0 comments on commit 9b88c00

Please sign in to comment.