]> Cypherpunks repositories - gostls13.git/commitdiff
5c: make alignment rules match 5g, just like 6c matches 6g
authorRuss Cox <rsc@golang.org>
Mon, 18 Apr 2011 22:50:31 +0000 (18:50 -0400)
committerRuss Cox <rsc@golang.org>
Mon, 18 Apr 2011 22:50:31 +0000 (18:50 -0400)
I should have done this a year ago in:

        changeset:   5137:686b18098944
        user:        Russ Cox <rsc@golang.org>
        date:        Thu Mar 25 14:05:54 2010 -0700
        files:       src/cmd/8c/swt.c
        description:
        make alignment rules match 8g, just like 6c matches 6g.

        R=ken2
        CC=golang-dev
        https://golang.org/cl/760042

R=ken2
CC=golang-dev
https://golang.org/cl/4437054

src/cmd/5c/swt.c

index d45aabc5e60b48c487336d0a668f67e2e2d9826d..431f0481731962226e2e9a4626d7bcdc4b14fb80 100644 (file)
@@ -665,7 +665,9 @@ align(int32 i, Type *t, int op, int32 *maxalign)
 
        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 align of automatic */