Skip to content

Commit a9ecc67

Browse files
aclementscherrymui
authored andcommitted
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 <[email protected]> Run-TryBot: Austin Clements <[email protected]> Reviewed-by: Cherry Zhang <[email protected]>
1 parent 77e8044 commit a9ecc67

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

blake2s/blake2s_386.s

+2-2
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ GLOBL counter<>(SB), (NOPTR+RODATA), $16
290290
MOVL t, 8*4+off+576(dst)
291291

292292
// func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
293-
TEXT ·hashBlocksSSE2(SB), 4, $672-24 // frame = 656 + 16 byte alignment
293+
TEXT ·hashBlocksSSE2(SB), 0, $672-24 // frame = 656 + 16 byte alignment
294294
MOVL h+0(FP), AX
295295
MOVL c+4(FP), BX
296296
MOVL flag+8(FP), CX
@@ -359,7 +359,7 @@ loop:
359359
RET
360360

361361
// func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
362-
TEXT ·hashBlocksSSSE3(SB), 4, $704-24 // frame = 688 + 16 byte alignment
362+
TEXT ·hashBlocksSSSE3(SB), 0, $704-24 // frame = 688 + 16 byte alignment
363363
MOVL h+0(FP), AX
364364
MOVL c+4(FP), BX
365365
MOVL flag+8(FP), CX

blake2s/blake2s_amd64.s

+3-3
Original file line numberDiff line numberDiff line change
@@ -423,17 +423,17 @@ GLOBL counter<>(SB), (NOPTR+RODATA), $16
423423
MOVQ BP, SP
424424

425425
// func hashBlocksSSE2(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
426-
TEXT ·hashBlocksSSE2(SB), 4, $672-48 // frame = 656 + 16 byte alignment
426+
TEXT ·hashBlocksSSE2(SB), 0, $672-48 // frame = 656 + 16 byte alignment
427427
HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSE2)
428428
RET
429429

430430
// func hashBlocksSSSE3(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
431-
TEXT ·hashBlocksSSSE3(SB), 4, $672-48 // frame = 656 + 16 byte alignment
431+
TEXT ·hashBlocksSSSE3(SB), 0, $672-48 // frame = 656 + 16 byte alignment
432432
HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSSE3)
433433
RET
434434

435435
// func hashBlocksSSE4(h *[8]uint32, c *[2]uint32, flag uint32, blocks []byte)
436-
TEXT ·hashBlocksSSE4(SB), 4, $16-48 // frame = 0 + 16 byte alignment
436+
TEXT ·hashBlocksSSE4(SB), 0, $16-48 // frame = 0 + 16 byte alignment
437437
HASH_BLOCKS(h+0(FP), c+8(FP), flag+16(FP), blocks_base+24(FP), blocks_len+32(FP), BLAKE2s_SSE4)
438438
RET
439439

0 commit comments

Comments
 (0)