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 <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Austin Clements 2016-10-28 17:18:36 -04:00
parent bd640c882a
commit 1bd39e79db

View file

@ -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