]> Cypherpunks repositories - gostls13.git/commitdiff
make alignment rules match 8g, just like 6c matches 6g.
authorRuss Cox <rsc@golang.org>
Thu, 25 Mar 2010 21:05:54 +0000 (14:05 -0700)
committerRuss Cox <rsc@golang.org>
Thu, 25 Mar 2010 21:05:54 +0000 (14:05 -0700)
R=ken2
CC=golang-dev
https://golang.org/cl/760042

src/cmd/8c/swt.c

index 72cebc00c81519bb763dc8d9b8b1555287aabe3f..534b30fef3275b62a8e0ef09ae5d60e9ed860395 100644 (file)
@@ -541,7 +541,7 @@ align(int32 i, Type *t, int op)
                }
                break;
 
-       case Aarg1:     /* initial allign of parameter */
+       case Aarg1:     /* initial align of parameter */
                w = ewidth[t->etype];
                if(w <= 0 || w >= SZ_LONG) {
                        w = SZ_LONG;
@@ -552,7 +552,9 @@ align(int32 i, Type *t, int op)
 
        case Aarg2:     /* width of a parameter */
                o += t->width;
-               w = SZ_LONG;
+               w = t->width;
+               if(w > SZ_LONG)
+                       w = SZ_LONG;
                break;
 
        case Aaut3:     /* total allign of automatic */