sha/asm/keccak1600-s390x.pl: resolve -march=z900 portability issue.
authorAndy Polyakov <appro@openssl.org>
Mon, 17 Sep 2018 10:36:37 +0000 (12:36 +0200)
committerAndy Polyakov <appro@openssl.org>
Fri, 12 Oct 2018 18:51:27 +0000 (20:51 +0200)
Negative displacement in memory references was not originally specified,
so that for maximum coverage one should abstain from it, just like with
any other extension. [Unless it's guarded by run-time switch, but there
is no switch in keccak1600-s390x.]

Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/7239)

crypto/sha/asm/keccak1600-s390x.pl

index 3bce19be9ea409972b178c7ed33c602ac6b6abb3..1184cf233eba2e92c901d34e3c75e81718b31045 100755 (executable)
@@ -432,9 +432,9 @@ SHA3_absorb:
        lrvg    %r0,0($inp)
        la      $inp,8($inp)
        xg      %r0,0(%r1)
-       la      %r1,8(%r1)
        a${g}hi $len,-8
-       stg     %r0,-8(%r1)
+       stg     %r0,0(%r1)
+       la      %r1,8(%r1)
        brct    $bsz,.Lblock_absorb
 
        stm${g} $inp,$len,$frame+3*$SIZE_T($sp)