mirror of https://github.com/openssl/openssl.git
RISC-V: Add Zbb orn and its pseudo instruction opcode to rv64gc in riscv.pm
Signed-off-by: Julian Zhu <julian.oerv@isrc.iscas.ac.cn> Reviewed-by: Paul Yang <paulyang.inf@gmail.com> Reviewed-by: Paul Dale <ppzgs1@gmail.com> (Merged from https://github.com/openssl/openssl/pull/27990)
This commit is contained in:
parent
ba2c314a60
commit
5a68746099
|
@ -289,6 +289,15 @@ ___
|
|||
return $code;
|
||||
}
|
||||
|
||||
sub orn_rv64i {
|
||||
my ($rd, $rs1, $rs2) = @_;
|
||||
my $code=<<___;
|
||||
not $rd, $rs2
|
||||
or $rd, $rd, $rs1
|
||||
___
|
||||
return $code;
|
||||
}
|
||||
|
||||
# Scalar crypto instructions
|
||||
|
||||
sub aes64ds {
|
||||
|
@ -388,6 +397,16 @@ sub clmulh {
|
|||
return ".word ".($template | ($rs2 << 20) | ($rs1 << 15) | ($rd << 7));
|
||||
}
|
||||
|
||||
sub orn {
|
||||
# Encoding for orn rd, rs1, rs2
|
||||
# 0100000 _ rs2 _ rs1 _110_ rd _0110011
|
||||
my $template = 0b0100000_00000_00000_110_00000_0110011;
|
||||
my $rd = read_reg shift;
|
||||
my $rs1 = read_reg shift;
|
||||
my $rs2 = read_reg shift;
|
||||
return ".word ".($template | ($rs2 << 20) | ($rs1 << 15) | ($rd << 7));
|
||||
}
|
||||
|
||||
sub rev8 {
|
||||
# Encoding for rev8 rd, rs instruction on RV64
|
||||
# XXXXXXXXXXXXX_ rs _XXX_ rd _XXXXXXX
|
||||
|
|
Loading…
Reference in New Issue