aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/mips64
diff options
context:
space:
mode:
authorJosh Bleecher Snyder <josharian@gmail.com>2017-03-17 07:49:22 -0700
committerJosh Bleecher Snyder <josharian@gmail.com>2017-03-17 23:45:22 +0000
commitda8e939ba9707108d5a4100824546b8f26e9c6c3 (patch)
treee97c60d8840d34e0967e6e768cdd5c8120d91b44 /src/cmd/compile/internal/mips64
parentce584e516e79c2b4a3fc9570db695d2d4629485a (diff)
downloadgo-da8e939ba9707108d5a4100824546b8f26e9c6c3.tar.gz
go-da8e939ba9707108d5a4100824546b8f26e9c6c3.zip
cmd/compile: thread Curfn through SSA
This is a first step towards eliminating the Curfn global in the backend. There's more to do. Passes toolstash -cmp. No compiler performance impact. Updates #15756 Change-Id: Ib09f550a001e279a5aeeed0f85698290f890939c Reviewed-on: https://go-review.googlesource.com/38232 Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
Diffstat (limited to 'src/cmd/compile/internal/mips64')
-rw-r--r--src/cmd/compile/internal/mips64/ggen.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/compile/internal/mips64/ggen.go b/src/cmd/compile/internal/mips64/ggen.go
index 5f146a7297..da900697c4 100644
--- a/src/cmd/compile/internal/mips64/ggen.go
+++ b/src/cmd/compile/internal/mips64/ggen.go
@@ -10,11 +10,11 @@ import (
"cmd/internal/obj/mips"
)
-func defframe(ptxt *obj.Prog) {
+func defframe(ptxt *obj.Prog, fn *gc.Node) {
// fill in argument size, stack size
ptxt.To.Type = obj.TYPE_TEXTSIZE
- ptxt.To.Val = int32(gc.Rnd(gc.Curfn.Type.ArgWidth(), int64(gc.Widthptr)))
+ ptxt.To.Val = int32(gc.Rnd(fn.Type.ArgWidth(), int64(gc.Widthptr)))
frame := uint32(gc.Rnd(gc.Stksize+gc.Maxarg, int64(gc.Widthreg)))
ptxt.To.Offset = int64(frame)
@@ -27,7 +27,7 @@ func defframe(ptxt *obj.Prog) {
lo := hi
// iterate through declarations - they are sorted in decreasing xoffset order.
- for _, n := range gc.Curfn.Func.Dcl {
+ for _, n := range fn.Func.Dcl {
if !n.Name.Needzero() {
continue
}