ソースを参照

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 <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Adam Langley <agl@golang.org>
Austin Clements 9 年 前
コミット
77e80449e8
1 ファイル変更0 行追加2 行削除
  1. 0 2
      sha3/keccakf_amd64.s

+ 0 - 2
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