]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: correct argument area size for typedmemmove/typedmemclr
authorCherry Zhang <cherryyz@google.com>
Wed, 7 Apr 2021 04:06:06 +0000 (00:06 -0400)
committerDavid Chase <drchase@google.com>
Wed, 7 Apr 2021 13:14:57 +0000 (13:14 +0000)
commitb55d90052918024caf331b35b209e434e3b7d176
tree1efa1436caf85dd7919b3849a853af6fc1b8ddaa
parentd6aa162f30d63f21f5f4db75e302dbb90595bbe2
cmd/compile: correct argument area size for typedmemmove/typedmemclr

When the write barrier pass emits typedmemmove/typedmemclr calls,
even the arguments are in registers, we still need to leave space
for the spill slots. Count that space. Otherwise when the callee
spills arguments it may clobber locals on the caller's frame.

Change-Id: I5326943427feaf66cab7658a5bef55b3baf5d345
Reviewed-on: https://go-review.googlesource.com/c/go/+/307824
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/writebarrier.go