diff options
author | Deepankar Bhattacharjee <deepankar.b@in.ibm.com> | 2021-09-20 10:45:15 -0400 |
---|---|---|
committer | Pauli <ppzgs1@gmail.com> | 2022-02-22 16:58:55 +1100 |
commit | f596bbe4da779b56eea34d96168b557d78e1149a (patch) | |
tree | 9371dd2979f2d8bfecc72b81034c0d10d3e5bfd0 /crypto/perlasm | |
parent | 7b3041eba1c6e177eede0d6311d53a6b9ff58051 (diff) |
chacha20 performance optimizations for ppc64le with 8x lanes,
Performance increase around 50%.
Co-authored-by: Madhusudhanan Duraisamy <madurais@in.ibm.com>
Co-authored-by: Nilamjyoti Goswami <nilamgoswami@in.ibm.com>
Co-authored-by: Siva Sundar Anbareeswaran <srisivasundar@in.ibm.com>
Reviewed-by: Danny Tsen <dtsen@us.ibm.com>
Tested-by: Danny Tsen <dtsen@us.ibm.com>
Signed-off-by: Danny <dtsen@us.ibm.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16637)
Diffstat (limited to 'crypto/perlasm')
-rwxr-xr-x | crypto/perlasm/ppc-xlate.pl | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/crypto/perlasm/ppc-xlate.pl b/crypto/perlasm/ppc-xlate.pl index 2ee444045f..45903407df 100755 --- a/crypto/perlasm/ppc-xlate.pl +++ b/crypto/perlasm/ppc-xlate.pl @@ -293,6 +293,14 @@ my $vpermdi = sub { # xxpermdi $dm = oct($dm) if ($dm =~ /^0/); " .long ".sprintf "0x%X",(60<<26)|($vrt<<21)|($vra<<16)|($vrb<<11)|($dm<<8)|(10<<3)|7; }; +my $vxxlor = sub { # xxlor + my ($f, $vrt, $vra, $vrb) = @_; + " .long ".sprintf "0x%X",(60<<26)|($vrt<<21)|($vra<<16)|($vrb<<11)|(146<<3)|6; +}; +my $vxxlorc = sub { # xxlor + my ($f, $vrt, $vra, $vrb) = @_; + " .long ".sprintf "0x%X",(60<<26)|($vrt<<21)|($vra<<16)|($vrb<<11)|(146<<3)|1; +}; # PowerISA 2.07 stuff sub vcrypto_op { @@ -377,6 +385,15 @@ my $addex = sub { }; my $vmsumudm = sub { vfour_vsr(@_, 35); }; +# PowerISA 3.1 stuff +my $brd = sub { + my ($f, $ra, $rs) = @_; + " .long ".sprintf "0x%X",(31<<26)|($rs<<21)|($ra<<16)|(187<<1); +}; +my $vsrq = sub { vcrypto_op(@_, 517); }; + + + while($line=<>) { $line =~ s|[#!;].*$||; # get rid of asm-style comments... |