summaryrefslogtreecommitdiff
path: root/src/cmd/8c
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2010-03-25 14:05:54 -0700
committerRuss Cox <rsc@golang.org>2010-03-25 14:05:54 -0700
commit039da1a7bf464109c5907aae5e4616e11493ef12 (patch)
treef248b35bab4d5dff89e9645cb446989b5f4b802e /src/cmd/8c
parente035919ba168c1b4aeab561826f815b0c1b3e813 (diff)
downloadgo-039da1a7bf464109c5907aae5e4616e11493ef12.tar.gz
make alignment rules match 8g, just like 6c matches 6g.
R=ken2 CC=golang-dev http://codereview.appspot.com/760042
Diffstat (limited to 'src/cmd/8c')
-rw-r--r--src/cmd/8c/swt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cmd/8c/swt.c b/src/cmd/8c/swt.c
index 72cebc00c..534b30fef 100644
--- a/src/cmd/8c/swt.c
+++ b/src/cmd/8c/swt.c
@@ -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 */