Skip to content

Commit

Permalink
Add .rv32 on rv32_zbb instructions
Browse files Browse the repository at this point in the history
- zext.h.rv32, rev8.rv32, and rori.rev32

-  rev8.rv32, and rori.rev32 are also aliased in rv32_{zk,zkn,zks}
  - only rv32_zks is shown in the extension field

Signed-off-by: Hiroo HAYASHI <[email protected]>
  • Loading branch information
hirooih committed Jan 8, 2024
1 parent d653dc6 commit cafe798
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
3 changes: 3 additions & 0 deletions constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,4 +224,7 @@
'bexti.rv32',
'binvi.rv32',
'bseti.rv32',
'zext.h.rv32',
'rev8.h.rv32',
'rori.rv32',
]
6 changes: 3 additions & 3 deletions rv32_zbb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
$pseudo_op rv_zbe::pack zext.h rd rs1 31..25=0x04 24..20=0 14..12=0x4 6..0=0x33
$pseudo_op rv64_zbp::grevi rev8 rd rs1 31..20=0x698 14..12=5 6..0=0x13
$pseudo_op rv64_zbb::rori rori rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
$pseudo_op rv_zbe::pack zext.h.rv32 rd rs1 31..25=0x04 24..20=0 14..12=0x4 6..0=0x33
$pseudo_op rv64_zbp::grevi rev8.rv32 rd rs1 31..20=0x698 14..12=5 6..0=0x13
$pseudo_op rv64_zbb::rori rori.rv32 rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
4 changes: 2 additions & 2 deletions rv32_zk
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import zbkb
$pseudo_op rv64_zbp::shfli zip rd rs1 31..25=4 24..20=15 14..12=1 6..2=4 1..0=3
$pseudo_op rv64_zbp::unshfli unzip rd rs1 31..25=4 24..20=15 14..12=5 6..2=4 1..0=3
$pseudo_op rv64_zbb::rori rori rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
$pseudo_op rv64_zbp::grevi rev8 rd rs1 31..20=0x698 14..12=5 6..0=0x13
$pseudo_op rv64_zbb::rori rori.rv32 rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
$pseudo_op rv64_zbp::grevi rev8.rv32 rd rs1 31..20=0x698 14..12=5 6..0=0x13

#import zkne
$import rv32_zkne::aes32esmi
Expand Down
4 changes: 2 additions & 2 deletions rv32_zkn
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#import zbkb
$pseudo_op rv64_zbp::shfli zip rd rs1 31..25=4 24..20=15 14..12=1 6..2=4 1..0=3
$pseudo_op rv64_zbp::unshfli unzip rd rs1 31..25=4 24..20=15 14..12=5 6..2=4 1..0=3
$pseudo_op rv64_zbb::rori rori rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
$pseudo_op rv64_zbp::grevi rev8 rd rs1 31..20=0x698 14..12=5 6..0=0x13
$pseudo_op rv64_zbb::rori rori.rv32 rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
$pseudo_op rv64_zbp::grevi rev8.rv32 rd rs1 31..20=0x698 14..12=5 6..0=0x13

#import zkne
$import rv32_zkne::aes32esmi
Expand Down
4 changes: 2 additions & 2 deletions rv32_zks
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#import zbkb
$pseudo_op rv64_zbp::shfli zip rd rs1 31..25=4 24..20=15 14..12=1 6..2=4 1..0=3
$pseudo_op rv64_zbp::unshfli unzip rd rs1 31..25=4 24..20=15 14..12=5 6..2=4 1..0=3
$pseudo_op rv64_zbb::rori rori rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
$pseudo_op rv64_zbp::grevi rev8 rd rs1 31..20=0x698 14..12=5 6..0=0x13
$pseudo_op rv64_zbb::rori rori.rv32 rd rs1 31..25=0x30 shamtw 14..12=5 6..2=0x04 1..0=3
$pseudo_op rv64_zbp::grevi rev8.rv32 rd rs1 31..20=0x698 14..12=5 6..0=0x13

0 comments on commit cafe798

Please sign in to comment.