From: Shenghou Ma Date: Sat, 2 May 2015 08:36:53 +0000 (-0400) Subject: cmd/internal/gc: fix build on big endian systems X-Git-Tag: go1.5beta1~776 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=931328b8b837d0a827d05989f79f28725a704b71;p=gostls13.git cmd/internal/gc: fix build on big endian systems The siz argument to both runtime.newproc and runtime.deferproc is int32, not uintptr. This problem won't manifest on little-endian systems because that stack slot is uintptr sized anyway. However, on big-endian systems, it will make a difference. Change-Id: I2351d1ec81839abe25375cff95e327b80764c2b5 Reviewed-on: https://go-review.googlesource.com/9647 Run-TryBot: Minux Ma TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/src/cmd/internal/gc/cgen.go b/src/cmd/internal/gc/cgen.go index 574d24f302..15dca374a3 100644 --- a/src/cmd/internal/gc/cgen.go +++ b/src/cmd/internal/gc/cgen.go @@ -2396,7 +2396,7 @@ func Ginscall(f *Node, proc int) { if HasLinkRegister() { stk.Xoffset += int64(Ctxt.Arch.Ptrsize) } - Thearch.Ginscon(Thearch.Optoas(OAS, Types[Tptr]), int64(Argsize(f.Type)), &stk) + Thearch.Ginscon(Thearch.Optoas(OAS, Types[TINT32]), int64(Argsize(f.Type)), &stk) // FuncVal* at 8(SP) stk.Xoffset = int64(Widthptr)