Commit 1bd39e79 authored by Austin Clements's avatar Austin Clements

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: default avatarIan Lance Taylor <iant@golang.org>
parent bd640c88
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment