]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
SHA3_squeeze(): The next argument is int
authorTomas Mraz <tomas@openssl.org>
Mon, 20 Nov 2023 16:46:26 +0000 (17:46 +0100)
committerHugo Landau <hlandau@openssl.org>
Thu, 23 Nov 2023 15:13:53 +0000 (15:13 +0000)
Amend the assembler so it uses only 32bit value.

Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22750)

crypto/sha/asm/keccak1600-armv8.pl
crypto/sha/asm/keccak1600-ppc64.pl
crypto/sha/asm/keccak1600-x86_64.pl

index 72f8c3adb577bfa70ecf5f329fd8708f5efcac3a..7566a7e3ece1d55fa23d6579b2d60e05536f19b3 100755 (executable)
@@ -483,7 +483,7 @@ SHA3_squeeze:
        mov     $out,x1
        mov     $len,x2
        mov     $bsz,x3
-       cmp     x4, #0                          // x4 = 'next' argument
+       cmp     w4, #0                          // w4 = 'next' argument
        bne     .Lnext_block
 
 .Loop_squeeze:
index fe7d6db20e43d26f49dbb39d16de35c361640c01..54f32e8c9291503bbbcb2427e93d0d0311b2f23c 100755 (executable)
@@ -668,7 +668,7 @@ SHA3_squeeze:
        subi    $out,r4,1               ; prepare for stbu
        mr      $len,r5
        mr      $bsz,r6
-       ${UCMP}i r7,0                   ; r7 = 'next' argument
+       cmplwi  r7,0                    ; r7 = 'next' argument
        bne     .Lnext_block
        b       .Loop_squeeze
 
index bddcaf8294192ba927af37c5e1bd3339f451f68a..78aa5c64aff0e9f95de92cc60c047caf0fd3dcf7 100755 (executable)
@@ -524,7 +524,7 @@ SHA3_squeeze:
        mov     %rsi,$out
        mov     %rdx,$len
        mov     %rcx,$bsz
-       bt      \$0,$next
+       bt      \$0,${next}d
        jc      .Lnext_block
        jmp     .Loop_squeeze