From a9ecc67d46e12a127b6b40b62d62b689cc511de4 Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 21 Oct 2016 16:03:57 -0400 Subject: [PATCH] blake2s: remove NOSPLIT from asm functions Now that the frame sizes of these functions are correct, the compiler is detecting that they overflow the NOSPLIT stack. They don't need to be NOSPLIT, so remove that flag. This fixes the 1.7 build. The build is not broken at tip because the stack guard is larger. Change-Id: Ie32779c819f63b27ec0a77a44b7d20ee2d550843 Reviewed-on: https://go-review.googlesource.com/31667 TryBot-Result: Gobot Gobot Run-TryBot: Austin Clements Reviewed-by: Cherry Zhang --- blake2s/blake2s_386.s | 4 ++-- blake2s/blake2s_amd64.s | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/blake2s/blake2s_386.s b/blake2s/blake2s_386.s index 8a80761..0154863 100644 --- a/blake2s/blake2s_386.s +++ b/blake2s/blake2s_386.s @@ -290,7 +290,7 @@ GLOBL counter<>(SB), (NOPTR+RODATA), $16 MOVL t, 8*4+off+576(dst) // func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -TEXT ·hashBlocksSSE2(SB), 4, $672-24 // frame = 656 + 16 byte alignment +TEXT ·hashBlocksSSE2(SB), 0, $672-24 // frame = 656 + 16 byte alignment MOVL h+0(FP), AX MOVL c+4(FP), BX MOVL flag+8(FP), CX @@ -359,7 +359,7 @@ loop: RET // func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -TEXT ·hashBlocksSSSE3(SB), 4, $704-24 // frame = 688 + 16 byte alignment +TEXT ·hashBlocksSSSE3(SB), 0, $704-24 // frame = 688 + 16 byte alignment MOVL h+0(FP), AX MOVL c+4(FP), BX MOVL flag+8(FP), CX diff --git a/blake2s/blake2s_amd64.s b/blake2s/blake2s_amd64.s index bbecdd3..f69b3aa 100644 --- a/blake2s/blake2s_amd64.s +++ b/blake2s/blake2s_amd64.s @@ -423,17 +423,17 @@ GLOBL counter<>(SB), (NOPTR+RODATA), $16 MOVQ BP, SP // func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -TEXT ·hashBlocksSSE2(SB), 4, $672-48 // frame = 656 + 16 byte alignment +TEXT ·hashBlocksSSE2(SB), 0, $672-48 // frame = 656 + 16 byte alignment HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSE2) RET // func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -TEXT ·hashBlocksSSSE3(SB), 4, $672-48 // frame = 656 + 16 byte alignment +TEXT ·hashBlocksSSSE3(SB), 0, $672-48 // frame = 656 + 16 byte alignment HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSSE3) RET // func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte) -TEXT ·hashBlocksSSE4(SB), 4, $16-48 // frame = 0 + 16 byte alignment +TEXT ·hashBlocksSSE4(SB), 0, $16-48 // frame = 0 + 16 byte alignment HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSE4) RET