]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/ssa: fix DWARF location expr for .closureptr
authorThan McIntosh <thanm@google.com>
Mon, 10 Jun 2024 14:25:22 +0000 (14:25 +0000)
committerThan McIntosh <thanm@google.com>
Mon, 10 Jun 2024 19:44:43 +0000 (19:44 +0000)
commita130fb63091bf3103bb7baabbd2484f7e560edae
treedf8b565eec238ae8821aeb1b1d3a39ecfc64e47c
parent4256ec16616827b8ef5a19f74599aa44ffe6111a
cmd/compile/internal/ssa: fix DWARF location expr for .closureptr

CL 586975 added support to the compiler back end to emit a synthetic
".closureptr" variable in range func bodies, plus code to spill the
incoming context pointer to that variable's location on the stack.

This patch fixes up the code in the back end that generates DWARF
location lists for incoming parameters (which sometimes arrive in
registers) in the "-l -N" no-optimization case to also create a
correct DWARF location list for ".closureptr", a two-piece list
reflecting the fact that its value arrives in a register and then is
spilled to the stack in the prolog.

Fixes #67918.

Change-Id: I029305b5248b8140253fdeb6821b877916fbb87a
Reviewed-on: https://go-review.googlesource.com/c/go/+/591595
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Alessandro Arzilli <alessandro.arzilli@gmail.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
src/cmd/compile/internal/ssa/debug.go
src/cmd/compile/internal/ssa/func.go
src/cmd/compile/internal/ssagen/ssa.go