]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: regabi support for DWARF location expressions
authorThan McIntosh <thanm@google.com>
Tue, 27 Apr 2021 16:40:43 +0000 (12:40 -0400)
committerThan McIntosh <thanm@google.com>
Fri, 30 Apr 2021 19:38:07 +0000 (19:38 +0000)
commit162d4f9c92cb618e8b434e445a842351160fb84d
tree49ecd11cc1daf1d98243d318083acf3e5832093b
parent93200b98c75500b80a2bf7cc31c2a72deff2741c
cmd/compile: regabi support for DWARF location expressions

Revise the code that generates DWARF location expressions for input
parameters to get it to work properly with the new register ABI when
optimization is turned off.

The previously implementation assumed stack locations for all
input+output parameters when -N (disable optimization) was in effect.
In the new implementation, a register-resident input parameter is
given a 2-element location list, the first list element pointing to
the ABI register(s) containing the param, and the second element
pointing to the stack home once it has been spilled.

NB, this change fixes a bunch of the Delve pkg/proc unit tests (maybe
about half of the outstanding failures). Still a good number that need
to be investigated, however.

Updates #40724.
Updates #45720.

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