aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/internal/obj/ppc64
diff options
context:
space:
mode:
authorClément Chigot <clement.chigot@atos.net>2019-01-09 14:05:17 +0100
committerIan Lance Taylor <iant@golang.org>2019-01-09 22:06:51 +0000
commit20ac64a2dd1f7993101d7e069eab3b84ab2c0bd2 (patch)
tree44cabd19b42991b488294b861f53afb0302c6b37 /src/cmd/internal/obj/ppc64
parenta5318bf5d676b3dfc10a1843668e3593cbdc87c5 (diff)
downloadgo-20ac64a2dd1f7993101d7e069eab3b84ab2c0bd2.tar.xz
cmd/dist, cmd/link, runtime: fix stack size when cross-compiling aix/ppc64
This commit allows to cross-compiling aix/ppc64. The nosplit limit must twice as large as on others platforms because of AIX syscalls. The stack limit, especially stackGuardMultiplier, was set by cmd/dist during the bootstrap and doesn't depend on GOOS/GOARCH target. Fixes #29572 Change-Id: Id51e38885e1978d981aa9e14972eaec17294322e Reviewed-on: https://go-review.googlesource.com/c/157117 Run-TryBot: Ian Lance Taylor <iant@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/cmd/internal/obj/ppc64')
-rw-r--r--src/cmd/internal/obj/ppc64/obj9.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/internal/obj/ppc64/obj9.go b/src/cmd/internal/obj/ppc64/obj9.go
index 2286916098..30a8414d4a 100644
--- a/src/cmd/internal/obj/ppc64/obj9.go
+++ b/src/cmd/internal/obj/ppc64/obj9.go
@@ -1041,7 +1041,7 @@ func (c *ctxt9) stacksplit(p *obj.Prog, framesize int32) *obj.Prog {
p = obj.Appendp(p, c.newprog)
p.As = AADD
p.From.Type = obj.TYPE_CONST
- p.From.Offset = objabi.StackGuard
+ p.From.Offset = int64(objabi.StackGuard)
p.Reg = REGSP
p.To.Type = obj.TYPE_REG
p.To.Reg = REG_R4
@@ -1056,7 +1056,7 @@ func (c *ctxt9) stacksplit(p *obj.Prog, framesize int32) *obj.Prog {
p = obj.Appendp(p, c.newprog)
p.As = AMOVD
p.From.Type = obj.TYPE_CONST
- p.From.Offset = int64(framesize) + objabi.StackGuard - objabi.StackSmall
+ p.From.Offset = int64(framesize) + int64(objabi.StackGuard) - objabi.StackSmall
p.To.Type = obj.TYPE_REG
p.To.Reg = REGTMP