Skip to content

Commit

Permalink
sha3: fix SP adjustment
Browse files Browse the repository at this point in the history
keccakF1600 manually subtracts 200 from SP, but the generated prologue
already does this and the extra subtraction just means keccakF1600 is
defeating the stack growth check.

Remove the unnecessary SP adjustment.

Change-Id: I9450f6b12489bcd20e9ace30f9dd3066025d3a1a
Reviewed-on: https://go-review.googlesource.com/31653
Run-TryBot: Austin Clements <[email protected]>
TryBot-Result: Gobot Gobot <[email protected]>
Reviewed-by: Adam Langley <[email protected]>
  • Loading branch information
aclements committed Oct 21, 2016
1 parent 1705134 commit 77e8044
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sha3/keccakf_amd64.s
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,6 @@
// func keccakF1600(state *[25]uint64)
TEXT ·keccakF1600(SB), 0, $200-8
MOVQ state+0(FP), rpState
SUBQ $(8*25), SP

// Convert the user state into an internal state
NOTQ _be(rpState)
Expand Down Expand Up @@ -388,5 +387,4 @@ TEXT ·keccakF1600(SB), 0, $200-8
NOTQ _mi(rpState)
NOTQ _sa(rpState)

ADDQ $(8*25), SP
RET

0 comments on commit 77e8044

Please sign in to comment.