]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: round gohash stack frame to multiple of 8 on amd64p32
authorRuss Cox <rsc@golang.org>
Mon, 21 Jul 2014 21:38:30 +0000 (17:38 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 21 Jul 2014 21:38:30 +0000 (17:38 -0400)
Even though pointers are 4 bytes the stack frame should be kept
a multiple of 8 bytes so that return addresses pushed on the stack
are properly aligned.

Fixes #8379.

LGTM=dvyukov, minux
R=minux, bradfitz, dvyukov, dave
CC=golang-codereviews
https://golang.org/cl/115840048

src/pkg/runtime/asm_amd64p32.s

index 7facd10b38da37d5b7344a17dd6ee62d5a90f9b1..097cacb607dbb75467e0f176a2dd89bd07fa4aa7 100644 (file)
@@ -1139,7 +1139,7 @@ TEXT runtime·fastrand2(SB), NOSPLIT, $0-4
 //   func (alg unsafe.Pointer, p unsafe.Pointer, size uintpr, seed uintptr) uintptr
 // to:
 //   func (hash *uintptr, size uintptr, p unsafe.Pointer)
-TEXT runtime·gohash(SB), NOSPLIT, $12-20
+TEXT runtime·gohash(SB), NOSPLIT, $16-20
        FUNCDATA $FUNCDATA_ArgsPointerMaps,gcargs_gohash<>(SB)
        FUNCDATA $FUNCDATA_LocalsPointerMaps,gclocals_gohash<>(SB)
        MOVL    a+0(FP), AX