Revert part of the s390x update

This commit is contained in:
Tomas Mraz 2019-05-06 11:58:45 +02:00
parent 569a3cb917
commit 65a11b2a90

View File

@ -1,6 +1,6 @@
diff -up openssl-1.1.1b/crypto/chacha/asm/chacha-s390x.pl.s390x-update openssl-1.1.1b/crypto/chacha/asm/chacha-s390x.pl
--- openssl-1.1.1b/crypto/chacha/asm/chacha-s390x.pl.s390x-update 2019-02-26 15:15:30.000000000 +0100
+++ openssl-1.1.1b/crypto/chacha/asm/chacha-s390x.pl 2019-05-06 10:59:30.859784823 +0200
+++ openssl-1.1.1b/crypto/chacha/asm/chacha-s390x.pl 2019-05-06 10:54:00.035367605 +0200
@@ -1,5 +1,5 @@
#! /usr/bin/env perl
-# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
@ -33,7 +33,7 @@ diff -up openssl-1.1.1b/crypto/chacha/asm/chacha-s390x.pl.s390x-update openssl-1
+use strict;
+use FindBin qw($Bin);
+use lib "$Bin/../..";
+use perlasm::s390x qw(:DEFAULT :VX :LD AUTOLOAD LABEL INCLUDE);
+use perlasm::s390x qw(:DEFAULT :VX AUTOLOAD LABEL INCLUDE);
+my $flavour = shift;
+
@ -1292,8 +1292,8 @@ diff -up openssl-1.1.1b/crypto/chacha/asm/chacha-s390x.pl.s390x-update openssl-1
+PERLASM_END();
diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/crypto/perlasm/s390x.pm
--- openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update 2019-05-06 10:54:00.037367571 +0200
+++ openssl-1.1.1b/crypto/perlasm/s390x.pm 2019-05-06 10:59:30.859784823 +0200
@@ -0,0 +1,3142 @@
+++ openssl-1.1.1b/crypto/perlasm/s390x.pm 2019-05-06 10:54:00.038367554 +0200
@@ -0,0 +1,3060 @@
+#!/usr/bin/env perl
+# Copyright 2018 The OpenSSL Project Authors. All Rights Reserved.
+#
@ -1302,37 +1302,23 @@ diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/cryp
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+# Copyright IBM Corp. 2018-2019
+# Copyright IBM Corp. 2018
+# Author: Patrick Steuer <patrick.steuer@de.ibm.com>
+
+package perlasm::s390x;
+
+use strict;
+use warnings;
+use bigint;
+use Carp qw(confess);
+use Exporter qw(import);
+
+our @EXPORT=qw(PERLASM_BEGIN PERLASM_END);
+our @EXPORT_OK=qw(AUTOLOAD LABEL INCLUDE stfle);
+our %EXPORT_TAGS=(
+ # long-displacement facility
+ LD => [qw(clgfi)],
+ # general-instruction-extension facility
+ GE => [qw(risbg)],
+ # extended-immediate facility
+ EI => [qw(lt)],
+ # miscellaneous-instruction-extensions facility 1
+ MI1 => [qw(risbgn)],
+ # message-security assist
+ MSA => [qw(kmac km kmc kimd klmd)],
+ # message-security-assist extension 4
+ MSA4 => [qw(kmf kmo pcc kmctr)],
+ # message-security-assist extension 5
+ MSA5 => [qw(ppno prno)],
+ # message-security-assist extension 8
+ MSA8 => [qw(kma)],
+ # vector facility
+ VX => [qw(vgef vgeg vgbm vzero vone vgm vgmb vgmh vgmf vgmg
+ vl vlr vlrep vlrepb vlreph vlrepf vlrepg vleb vleh vlef vleg vleib
+ vleih vleif vleig vlgv vlgvb vlgvh vlgvf vlgvg vllez vllezb vllezh
@ -1381,7 +1367,6 @@ diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/cryp
+ wfmadb vfms vfmsdb wfmsdb vfpso vfpsodb wfpsodb vflcdb wflcdb
+ vflndb wflndb vflpdb wflpdb vfsq vfsqdb wfsqdb vfs vfsdb wfsdb
+ vftci vftcidb wftcidb)],
+ # vector-enhancements facility 1
+ VXE => [qw(vbperm vllezlf vmsl vmslg vnx vnn voc vpopctb vpopcth
+ vpopctf vpopctg vfasb wfasb wfaxb wfcsb wfcxb wfksb wfkxb vfcesb
+ vfcesbs wfcesb wfcesbs wfcexb wfcexbs vfchsb vfchsbs wfchsb wfchsbs
@ -1394,11 +1379,10 @@ diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/cryp
+ wfnmsxb vfpsosb wfpsosb vflcsb wflcsb vflnsb wflnsb vflpsb wflpsb
+ vfpsoxb wfpsoxb vflcxb wflcxb vflnxb wflnxb vflpxb wflpxb vfsqsb
+ wfsqsb wfsqxb vfssb wfssb wfsxb vftcisb wftcisb wftcixb)],
+ # vector-packed-decimal facility
+ VXD => [qw(vlrlr vlrl vstrlr vstrl vap vcp vcvb vcvbg vcvd vcvdg vdp
+ vlip vmp vmsp vpkz vpsop vrp vsdp vsrp vsp vtp vupkz)],
+);
+Exporter::export_ok_tags(qw(LD GE EI MI1 MSA MSA4 MSA5 MSA8 VX VXE VXD));
+Exporter::export_ok_tags(qw(MSA MSA4 MSA5 MSA8 VX VXE VXD));
+
+our $AUTOLOAD;
+
@ -1455,28 +1439,6 @@ diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/cryp
+ S(0xb2b0,@_);
+}
+
+# MISC
+
+sub clgfi {
+ confess(err("ARGNUM")) if ($#_!=1);
+ RILa(0xc2e,@_);
+}
+
+sub lt {
+ confess(err("ARGNUM")) if ($#_!=1);
+ RXYa(0xe312,@_);
+}
+
+sub risbg {
+ confess(err("ARGNUM")) if ($#_<3||$#_>4);
+ RIEf(0xec55,@_);
+}
+
+sub risbgn {
+ confess(err("ARGNUM")) if ($#_<3||$#_>4);
+ RIEf(0xec59,@_);
+}
+
+# MSA
+
+sub kmac {
@ -3820,36 +3782,6 @@ diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/cryp
+# Instruction Formats
+#
+
+sub RIEf {
+ confess(err("ARGNUM")) if ($#_<4||5<$#_);
+ my $ops=join(',',@_[1..$#_]);
+ my $memn=(caller(1))[3];
+ $memn=~s/^.*:://;
+ my ($opcode,$r1,$r2,$i3,$i4,$i5)=(shift,get_R(shift),get_R(shift),
+ get_I(shift,8),get_I(shift,8),
+ get_I(shift,8));
+
+ $out.="\t.word\t";
+ $out.=sprintf("%#06x",(($opcode>>8)<<8|$r1<<4|$r2)).",";
+ $out.=sprintf("%#06x",($i3<<8)|$i4).",";
+ $out.=sprintf("%#06x",($i5<<8)|($opcode&0xff));
+ $out.="\t# $memn\t$ops\n"
+}
+
+sub RILa {
+ confess(err("ARGNUM")) if ($#_!=2);
+ my $ops=join(',',@_[1..$#_]);
+ my $memn=(caller(1))[3];
+ $memn=~s/^.*:://;
+ my ($opcode,$r1,$i2)=(shift,get_R(shift),get_I(shift,32));
+
+ $out.="\t.word\t";
+ $out.=sprintf("%#06x",(($opcode>>4)<<8|$r1<<4|($opcode&0xf))).",";
+ $out.=sprintf("%#06x",($i2>>16)).",";
+ $out.=sprintf("%#06x",($i2&0xffff));
+ $out.="\t# $memn\t$ops\n"
+}
+
+sub RRE {
+ confess(err("ARGNUM")) if ($#_<0||2<$#_);
+ my $ops=join(',',@_[1..$#_]);
@ -3874,20 +3806,6 @@ diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/cryp
+ $out.="\t# $memn\t$ops\n"
+}
+
+sub RXYa {
+ confess(err("ARGNUM")) if ($#_!=2);
+ my $ops=join(',',@_[1..$#_]);
+ my $memn=(caller(1))[3];
+ $memn=~s/^.*:://;
+ my ($opcode,$r1,$d2,$x2,$b2)=(shift,get_R(shift),get_DXB(shift));
+
+ $out.="\t.word\t";
+ $out.=sprintf("%#06x",(($opcode>>8)<<8|$r1<<4|$x2)).",";
+ $out.=sprintf("%#06x",($b2<<12|($d2&0xfff))).",";
+ $out.=sprintf("%#06x",(($d2>>12)<<8|$opcode&0xff));
+ $out.="\t# $memn\t$ops\n"
+}
+
+sub S {
+ confess(err("ARGNUM")) if ($#_<0||1<$#_);
+ my $ops=join(',',@_[1..$#_]);
@ -4438,7 +4356,7 @@ diff -up openssl-1.1.1b/crypto/perlasm/s390x.pm.s390x-update openssl-1.1.1b/cryp
+1;
diff -up openssl-1.1.1b/crypto/poly1305/asm/poly1305-s390x.pl.s390x-update openssl-1.1.1b/crypto/poly1305/asm/poly1305-s390x.pl
--- openssl-1.1.1b/crypto/poly1305/asm/poly1305-s390x.pl.s390x-update 2019-02-26 15:15:30.000000000 +0100
+++ openssl-1.1.1b/crypto/poly1305/asm/poly1305-s390x.pl 2019-05-06 10:59:30.860784805 +0200
+++ openssl-1.1.1b/crypto/poly1305/asm/poly1305-s390x.pl 2019-05-06 10:54:00.036367588 +0200
@@ -24,204 +24,961 @@
#
# On side note, z13 enables vector base 2^26 implementation...
@ -4465,7 +4383,7 @@ diff -up openssl-1.1.1b/crypto/poly1305/asm/poly1305-s390x.pl.s390x-update opens
+use strict;
+use FindBin qw($Bin);
+use lib "$Bin/../..";
+use perlasm::s390x qw(:DEFAULT :LD :GE :EI :MI1 :VX AUTOLOAD LABEL INCLUDE);
+use perlasm::s390x qw(:DEFAULT :VX AUTOLOAD LABEL INCLUDE);
+
+my $flavour = shift;