diff options
| author | Cherry Zhang <cherryyz@google.com> | 2021-03-17 19:15:38 -0400 |
|---|---|---|
| committer | Cherry Zhang <cherryyz@google.com> | 2021-03-19 23:21:21 +0000 |
| commit | 6ae3b70ef255cd7317764a12b7230f293683f2c5 (patch) | |
| tree | ba2d6362e17980c0123f9e1b37c3c3a54e4d4214 /src/cmd/compile/internal/base | |
| parent | 9f2a71b6e7b418182dd0467e7d054ccf8130c026 (diff) | |
| download | go-6ae3b70ef255cd7317764a12b7230f293683f2c5.tar.xz | |
cmd/compile: add clobberdeadreg mode
When -clobberdeadreg flag is set, the compiler inserts code that
clobbers integer registers at call sites. This may be helpful for
debugging register ABI.
Only implemented on AMD64 for now.
Change-Id: Ia203d3f891c30fd95d0103489056fe01d63a2899
Reviewed-on: https://go-review.googlesource.com/c/go/+/302809
Trust: Cherry Zhang <cherryyz@google.com>
Run-TryBot: Cherry Zhang <cherryyz@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/base')
| -rw-r--r-- | src/cmd/compile/internal/base/flag.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/cmd/compile/internal/base/flag.go b/src/cmd/compile/internal/base/flag.go index 751ab1b5c7..eb46ed99af 100644 --- a/src/cmd/compile/internal/base/flag.go +++ b/src/cmd/compile/internal/base/flag.go @@ -90,6 +90,7 @@ type CmdFlags struct { CPUProfile string "help:\"write cpu profile to `file`\"" Complete bool "help:\"compiling complete package (no C or assembly)\"" ClobberDead bool "help:\"clobber dead stack slots (for debugging)\"" + ClobberDeadReg bool "help:\"clobber dead registers (for debugging)\"" Dwarf bool "help:\"generate DWARF symbols\"" DwarfBASEntries *bool "help:\"use base address selection entries in DWARF\"" // &Ctxt.UseBASEntries, set below DwarfLocationLists *bool "help:\"add location lists to DWARF in optimized mode\"" // &Ctxt.Flag_locationlists, set below |
