aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/typecheck/universe.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2021-03-02 10:27:18 -0500
committerCherry Zhang <cherryyz@google.com>2021-03-05 23:13:20 +0000
commitfb03be9d5577a3d22834a25b3b62916aee30db2a (patch)
tree2405dd64192e0196ceb9d3417aeed35000149b49 /src/cmd/compile/internal/typecheck/universe.go
parenta22bd3dc73bfcc9bf37cbd651933c54c82799c2a (diff)
downloadgo-fb03be9d5577a3d22834a25b3b62916aee30db2a.tar.gz
go-fb03be9d5577a3d22834a25b3b62916aee30db2a.zip
cmd/compile: use getcallersp for gorecover "fp" arg
Currently, the compiler synthesize a special ".fp" node, which points to the FP of the current frame, be to used to call gorecover. Later that node turns to an Arg in SSA that is not really an arg, causing problems for the new ABI work which changes the handling of Args, so we have to special-case that node. This CL changes the compiler to get the FP by using getcallersp, which is an intrinsic in SSA and works on all platforms. As we need the FP, not the caller SP, one drawback is that we have to add FixedFrameSize for LR machines. But it does allow us to remove that special node. Change-Id: Ie721d51efca8116c9d23cc4f79738fffcf847df8 Reviewed-on: https://go-review.googlesource.com/c/go/+/297930 Trust: Cherry Zhang <cherryyz@google.com> Reviewed-by: David Chase <drchase@google.com>
Diffstat (limited to 'src/cmd/compile/internal/typecheck/universe.go')
-rw-r--r--src/cmd/compile/internal/typecheck/universe.go5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/cmd/compile/internal/typecheck/universe.go b/src/cmd/compile/internal/typecheck/universe.go
index c4c034184b..f04dcb671c 100644
--- a/src/cmd/compile/internal/typecheck/universe.go
+++ b/src/cmd/compile/internal/typecheck/universe.go
@@ -354,9 +354,4 @@ func DeclareUniverse() {
s1.Def = s.Def
s1.Block = s.Block
}
-
- ir.RegFP = NewName(Lookup(".fp"))
- ir.RegFP.SetType(types.Types[types.TINT32])
- ir.RegFP.Class = ir.PPARAM
- ir.RegFP.SetUsed(true)
}