]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: open up space for callee's arg spill slot in mcall (regabi version)
authorCherry Zhang <cherryyz@google.com>
Mon, 19 Apr 2021 17:58:07 +0000 (13:58 -0400)
committerCherry Zhang <cherryyz@google.com>
Mon, 19 Apr 2021 18:37:15 +0000 (18:37 +0000)
commitf8892147bdfd16fe7ef04eccf59c4abf774550f1
treecfdc56c6e3aa55edc8f528629b27df5fb53fcfc3
parent5780ab4f605fdf0ca7f12ebc08e80d3ac170e98a
runtime: open up space for callee's arg spill slot in mcall (regabi version)

mcall calls fn with an argument. Currently, in the regabi version
of mcall it does not reserve space for that argument's spill slot.
If the callee spills its argument, it may clobber things on the
g0 stack at 0(SP) (e.g. the old SP saved in cgocallback).

Reserve the space.

Change-Id: I85a314273cd996c7fac8fd0b03cd9033faae9c5a
Reviewed-on: https://go-review.googlesource.com/c/go/+/311489
Trust: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
src/runtime/asm_amd64.s