]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/gc: enforce register-width alignment for stack sizes.
authorRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 7 Mar 2014 19:28:18 +0000 (20:28 +0100)
committerRémy Oudompheng <oudomphe@phare.normalesup.org>
Fri, 7 Mar 2014 19:28:18 +0000 (20:28 +0100)
This fixes the following amd64p32 issue:
    pkg/time/format.go:724: internal compiler error: twobitwalktype1: invalid initial alignment, Time

caused by the pointer zone ending on a 32-bit-aligned boundary.

LGTM=rsc
R=rsc, dave
CC=golang-codereviews
https://golang.org/cl/72270046

src/cmd/gc/pgen.c

index 37d603cb0f9d1246882ee0936832a93ad9077c81..3e1bff17941348c8fdf05a0ca8e83508d305a33d 100644 (file)
@@ -429,8 +429,8 @@ allocauto(Prog* ptxt)
                n->stkdelta = -stksize - n->xoffset;
        }
        stksize = rnd(stksize, widthreg);
-       stkptrsize = rnd(stkptrsize, widthptr);
-       stkzerosize = rnd(stkzerosize, widthptr);
+       stkptrsize = rnd(stkptrsize, widthreg);
+       stkzerosize = rnd(stkzerosize, widthreg);
 
        fixautoused(ptxt);