]> Cypherpunks repositories - gostls13.git/commitdiff
crypto/sha256, crypto/sha512: fix argument size in assembly
authorRuss Cox <rsc@golang.org>
Thu, 15 May 2014 19:34:25 +0000 (15:34 -0400)
committerRuss Cox <rsc@golang.org>
Thu, 15 May 2014 19:34:25 +0000 (15:34 -0400)
The function takes 32 bytes of arguments: 8 for the *block
and then 3*8 for the slice.

The 24 is not causing a bug (today at least) because the
final word is the cap of the slice, which the assembly
does not use.

Identified by 'go vet std'.

LGTM=bradfitz
R=golang-codereviews, bradfitz
CC=golang-codereviews
https://golang.org/cl/96360043

src/pkg/crypto/sha256/sha256block_amd64.s
src/pkg/crypto/sha512/sha512block_amd64.s

index b83897c7caf43011876952dc37d030671fec4618..95aebbe7626073584ddf50626e42e5a207424997 100644 (file)
        MSGSCHEDULE1(index); \
        SHA256ROUND(index, const, a, b, c, d, e, f, g, h)
 
-TEXT ·block(SB),0,$264-24
+TEXT ·block(SB),0,$264-32
        MOVQ    p_base+8(FP), SI
        MOVQ    p_len+16(FP), DX
        SHRQ    $6, DX
index 8cb6b9e4331b1f4a7bb454e0b42242e4ed8168e6..344d8d2c3e999b55b6b3113f81d7fc3e2f1ac791 100644 (file)
        MSGSCHEDULE1(index); \
        SHA512ROUND(index, const, a, b, c, d, e, f, g, h)
 
-TEXT ·block(SB),0,$648-24
+TEXT ·block(SB),0,$648-32
        MOVQ    p_base+8(FP), SI
        MOVQ    p_len+16(FP), DX
        SHRQ    $7, DX