From 77e80449e8f4f5928316edeb49b56ec16c63c6cc Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Thu, 20 Oct 2016 21:55:57 -0400 Subject: [PATCH] sha3: fix SP adjustment 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 TryBot-Result: Gobot Gobot Reviewed-by: Adam Langley --- sha3/keccakf_amd64.s | 2 -- 1 file changed, 2 deletions(-) diff --git a/sha3/keccakf_amd64.s b/sha3/keccakf_amd64.s index a353351..f88533a 100644 --- a/sha3/keccakf_amd64.s +++ b/sha3/keccakf_amd64.s @@ -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) @@ -388,5 +387,4 @@ TEXT ·keccakF1600(SB), 0, $200-8 NOTQ _mi(rpState) NOTQ _sa(rpState) - ADDQ $(8*25), SP RET