mirror of
https://github.com/golang/go
synced 2024-11-05 18:36:10 -07:00
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 <minux@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
76ace947ae
commit
931328b8b8
@ -2396,7 +2396,7 @@ func Ginscall(f *Node, proc int) {
|
|||||||
if HasLinkRegister() {
|
if HasLinkRegister() {
|
||||||
stk.Xoffset += int64(Ctxt.Arch.Ptrsize)
|
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)
|
// FuncVal* at 8(SP)
|
||||||
stk.Xoffset = int64(Widthptr)
|
stk.Xoffset = int64(Widthptr)
|
||||||
|
Loading…
Reference in New Issue
Block a user