aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/crypto
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-05-15 15:34:25 -0400
committerRuss Cox <rsc@golang.org>2014-05-15 15:34:25 -0400
commitfbd091500818c095c34f7a221aa298efeb13fb9c (patch)
tree1cd0c591edb31bf11af0d134de66e309ddf2d678 /src/pkg/crypto
parent435ba1295af24c0254707057a7d8dc6f17d6ad19 (diff)
downloadgo-fbd091500818c095c34f7a221aa298efeb13fb9c.tar.xz
crypto/sha256, crypto/sha512: fix argument size in assembly
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
Diffstat (limited to 'src/pkg/crypto')
-rw-r--r--src/pkg/crypto/sha256/sha256block_amd64.s2
-rw-r--r--src/pkg/crypto/sha512/sha512block_amd64.s2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/crypto/sha256/sha256block_amd64.s b/src/pkg/crypto/sha256/sha256block_amd64.s
index b83897c7ca..95aebbe762 100644
--- a/src/pkg/crypto/sha256/sha256block_amd64.s
+++ b/src/pkg/crypto/sha256/sha256block_amd64.s
@@ -140,7 +140,7 @@
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
diff --git a/src/pkg/crypto/sha512/sha512block_amd64.s b/src/pkg/crypto/sha512/sha512block_amd64.s
index 8cb6b9e433..344d8d2c3e 100644
--- a/src/pkg/crypto/sha512/sha512block_amd64.s
+++ b/src/pkg/crypto/sha512/sha512block_amd64.s
@@ -141,7 +141,7 @@
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