diff options
| author | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-10-08 22:13:44 +1300 |
|---|---|---|
| committer | Michael Hudson-Doyle <michael.hudson@canonical.com> | 2015-10-18 22:19:06 +0000 |
| commit | 97055dc1f16ef430b85fb6f8d2bd07a2695afa69 (patch) | |
| tree | 47ad2b64b8af1f2d38e7d7e87046bd384c2c786e /src/cmd/internal/obj/ppc64/obj9.go | |
| parent | a4855812e259f91914328659a37dc3a2582da7ba (diff) | |
| download | go-97055dc1f16ef430b85fb6f8d2bd07a2695afa69.tar.xz | |
cmd/compile, cmd/internal/obj: centralize knowledge of size of fixed part of stack
Shared libraries on ppc64le will require a larger minimum stack frame (because
the ABI mandates that the TOC pointer is available at 24(R1)). Part 2a of
preparing for that is to have all bits of arch-independent and ppc64-specific
codegen that need to know call a function to find out.
Change-Id: I55899f73037e92227813c491049a3bd6f30bd41f
Reviewed-on: https://go-review.googlesource.com/15524
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/ppc64/obj9.go')
| -rw-r--r-- | src/cmd/internal/obj/ppc64/obj9.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cmd/internal/obj/ppc64/obj9.go b/src/cmd/internal/obj/ppc64/obj9.go index e1f3435393..e72832d445 100644 --- a/src/cmd/internal/obj/ppc64/obj9.go +++ b/src/cmd/internal/obj/ppc64/obj9.go @@ -337,7 +337,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { if p.From3.Offset&obj.NOFRAME == 0 { // If there is a stack frame at all, it includes // space to save the LR. - autosize += 8 + autosize += int32(ctxt.FixedFrameSize()) } p.To.Offset = int64(autosize) @@ -445,7 +445,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { q = obj.Appendp(ctxt, q) q.As = AADD q.From.Type = obj.TYPE_CONST - q.From.Offset = int64(autosize) + 8 + q.From.Offset = int64(autosize) + ctxt.FixedFrameSize() q.Reg = REGSP q.To.Type = obj.TYPE_REG q.To.Reg = REG_R5 @@ -465,7 +465,7 @@ func preprocess(ctxt *obj.Link, cursym *obj.LSym) { q = obj.Appendp(ctxt, q) q.As = AADD q.From.Type = obj.TYPE_CONST - q.From.Offset = 8 + q.From.Offset = ctxt.FixedFrameSize() q.Reg = REGSP q.To.Type = obj.TYPE_REG q.To.Reg = REG_R6 |
