From: Austin Clements Date: Fri, 28 Oct 2016 21:18:36 +0000 (-0400) Subject: runtime: fix SP adjustment on amd64p32 X-Git-Tag: go1.8beta1~476 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1bd39e79dbc146ae953284f82febf7d1fb461f4e;p=gostls13.git runtime: fix SP adjustment on amd64p32 On amd64p32, rt0_go attempts to reserve 128 bytes of scratch space on the stack, but due to a register mixup this ends up being a no-op. Fix this so we actually reserve the stack space. Change-Id: I04dbfbeb44f3109528c8ec74e1136bc00d7e1faa Reviewed-on: https://go-review.googlesource.com/32331 Run-TryBot: Austin Clements TryBot-Result: Gobot Gobot Reviewed-by: Ian Lance Taylor --- diff --git a/src/runtime/asm_amd64p32.s b/src/runtime/asm_amd64p32.s index 3081ca7b12..c3c1c15f0c 100644 --- a/src/runtime/asm_amd64p32.s +++ b/src/runtime/asm_amd64p32.s @@ -12,7 +12,7 @@ TEXT runtime·rt0_go(SB),NOSPLIT,$0 MOVL argc+0(FP), AX MOVL argv+4(FP), BX MOVL SP, CX - SUBL $128, SP // plenty of scratch + SUBL $128, CX // plenty of scratch ANDL $~15, CX MOVL CX, SP