]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: fix SP adjustment on amd64p32
authorAustin Clements <austin@google.com>
Fri, 28 Oct 2016 21:18:36 +0000 (17:18 -0400)
committerAustin Clements <austin@google.com>
Fri, 28 Oct 2016 21:39:17 +0000 (21:39 +0000)
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>
src/runtime/asm_amd64p32.s

index 3081ca7b12dab91c9452d1a328fb618fbc0e9ea0..c3c1c15f0c7c1b6d16860996a39f4d6b9c1565d8 100644 (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