aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/mips
diff options
context:
space:
mode:
authorKeith Randall <keithr@alum.mit.edu>2018-12-04 07:58:18 -0800
committerKeith Randall <khr@golang.org>2018-12-28 20:55:36 +0000
commit69c2c56453cdea1ad32d50fc82193f06b1b33f93 (patch)
tree68923304deca5d767ceff2dca690faffb7b58616 /src/cmd/compile/internal/mips
parentc043fc4f655ce34f67a0e7fe2833139f6313a3f0 (diff)
downloadgo-69c2c56453cdea1ad32d50fc82193f06b1b33f93.tar.gz
go-69c2c56453cdea1ad32d50fc82193f06b1b33f93.zip
cmd/compile,runtime: redo mid-stack inlining tracebacks
Work involved in getting a stack trace is divided between runtime.Callers and runtime.CallersFrames. Before this CL, runtime.Callers returns a pc per runtime frame. runtime.CallersFrames is responsible for expanding a runtime frame into potentially multiple user frames. After this CL, runtime.Callers returns a pc per user frame. runtime.CallersFrames just maps those to user frame info. Entries in the result of runtime.Callers are now pcs of the calls (or of the inline marks), not of the instruction just after the call. Fixes #29007 Fixes #28640 Update #26320 Change-Id: I1c9567596ff73dc73271311005097a9188c3406f Reviewed-on: https://go-review.googlesource.com/c/152537 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/mips')
-rw-r--r--src/cmd/compile/internal/mips/ggen.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/mips/ggen.go b/src/cmd/compile/internal/mips/ggen.go
index acbe4a91de..eab60756ba 100644
--- a/src/cmd/compile/internal/mips/ggen.go
+++ b/src/cmd/compile/internal/mips/ggen.go
@@ -59,10 +59,11 @@ func zeroAuto(pp *gc.Progs, n *gc.Node) {
}
}
-func ginsnop(pp *gc.Progs) {
+func ginsnop(pp *gc.Progs) *obj.Prog {
p := pp.Prog(mips.ANOR)
p.From.Type = obj.TYPE_REG
p.From.Reg = mips.REG_R0
p.To.Type = obj.TYPE_REG
p.To.Reg = mips.REG_R0
+ return p
}