]> Cypherpunks repositories - gostls13.git/commit
cmd/internal/obj/x86: simplify huge frame prologue
authorAustin Clements <austin@google.com>
Fri, 2 Apr 2021 19:57:46 +0000 (15:57 -0400)
committerAustin Clements <austin@google.com>
Mon, 5 Apr 2021 16:22:10 +0000 (16:22 +0000)
commitef3122e909f8c14a6bddcd77092d36710e16989f
tree14821c2316ac417faea039c055808e68860dbaed
parentaf1789a61c02fa769fcd4ab8addcbb9a160b987b
cmd/internal/obj/x86: simplify huge frame prologue

For stack frames larger than StackBig, the stack split prologue needs
to guard against potential wraparound. Currently, it carefully
arranges to avoid underflow, but this is complicated and requires a
special check for StackPreempt. StackPreempt is no longer the only
stack poison value, so this check will incorrectly succeed if the
stack bound is poisoned with any other value.

This CL simplifies the logic of the check, reduces its length, and
accounts for any possible poison value by directly checking for
underflow.

Change-Id: I917a313102d6a21895ef7c4b0f304fb84b292c81
Reviewed-on: https://go-review.googlesource.com/c/go/+/307010
Trust: Austin Clements <austin@google.com>
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
src/cmd/internal/obj/x86/obj6.go
src/runtime/stack.go