1
0
mirror of https://github.com/golang/go synced 2024-11-22 05:54:40 -07:00

fixed alignment issue resulting from confusion around the

meaning of out args.

go/test: passes 68% (231/339)

R=rsc
APPROVED=rsc
DELTA=13  (7 added, 0 deleted, 6 changed)
OCL=35072
CL=35080
This commit is contained in:
Kai Backman 2009-09-29 07:27:49 -07:00
parent 326ef13976
commit 8ccf8240f4
2 changed files with 11 additions and 4 deletions

View File

@ -351,7 +351,7 @@ nodarg(Type *t, int fp)
fatal("nodarg: bad struct");
if(first->width == BADWIDTH)
fatal("nodarg: offset not computed for %T", t);
n->xoffset = first->width + 4;
n->xoffset = first->width;
n->addable = 1;
goto fp;
}
@ -364,7 +364,7 @@ nodarg(Type *t, int fp)
n->sym = t->sym;
if(t->width == BADWIDTH)
fatal("nodarg: offset not computed for %T", t);
n->xoffset = t->width + 4;
n->xoffset = t->width;
n->addable = 1;
fp:
@ -372,12 +372,13 @@ fp:
default:
fatal("nodarg %T %d", t, fp);
case 0: // output arg
case 0: // output arg for calling another function
n->op = OINDREG;
n->val.u.reg = REGSP;
n->xoffset += 4;
break;
case 1: // input arg
case 1: // input arg to current function
n->class = PPARAM;
break;
}

View File

@ -8,6 +8,7 @@ bugs/bug193.go
bugs/bug196.go
bugs/bug198.go
chan/perm.go
cmp1.go
cmp2.go
cmp3.go
cmp4.go
@ -41,6 +42,7 @@ fixedbugs/bug022.go
fixedbugs/bug023.go
fixedbugs/bug024.go
fixedbugs/bug026.go
fixedbugs/bug028.go
fixedbugs/bug030.go
fixedbugs/bug031.go
fixedbugs/bug035.go
@ -161,6 +163,7 @@ fixedbugs/bug175.go
fixedbugs/bug176.go
fixedbugs/bug178.go
fixedbugs/bug179.go
fixedbugs/bug180.go
fixedbugs/bug181.go
fixedbugs/bug182.go
fixedbugs/bug183.go
@ -173,6 +176,7 @@ fixedbugs/bug192.go
fixedbugs/bug194.go
fixedbugs/bug195.go
fixedbugs/bug197.go
fixedbugs/bug199.go
fixedbugs/bug200.go
fixedbugs/bug201.go
fixedbugs/bug202.go
@ -209,6 +213,7 @@ ken/mfunc.go
ken/robfor.go
ken/robif.go
ken/simpbool.go
ken/simpfun.go
ken/simpprint.go
ken/simpswitch.go
ken/simpvar.go
@ -220,6 +225,7 @@ parentype.go
printbig.go
rename1.go
sieve.go
simassign.go
switch.go
test0.go
varinit.go