mirror of
https://github.com/openssl/openssl.git
synced 2025-04-06 20:20:50 +08:00
RISC-V: Add Zbb rori opcode in riscv.pm
Signed-off-by: Julian Zhu <julian.oerv@isrc.iscas.ac.cn> Reviewed-by: Paul Dale <ppzgs1@gmail.com> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/27161)
This commit is contained in:
parent
bf4c9b7b66
commit
f04fdd908c
@ -384,6 +384,16 @@ sub rev8 {
|
||||
return ".word ".($template | ($rs << 15) | ($rd << 7));
|
||||
}
|
||||
|
||||
sub rori {
|
||||
# Encoding for rori rd, rs1, shamt instruction on RV64
|
||||
# XXXXXXX_ shamt _ rs1 _XXX_ rd _XXXXXXX
|
||||
my $template = 0b0110000_00000_00000_101_00000_0010011;
|
||||
my $rd = read_reg shift;
|
||||
my $rs1 = read_reg shift;
|
||||
my $shamt = shift;
|
||||
return ".word ".($template | ($shamt << 20) | ($rs1 << 15) | ($rd << 7));
|
||||
}
|
||||
|
||||
sub roriw {
|
||||
# Encoding for roriw rd, rs1, shamt instruction on RV64
|
||||
# XXXXXXX_ shamt _ rs1 _XXX_ rd _XXXXXXX
|
||||
|
Loading…
x
Reference in New Issue
Block a user