summaryrefslogtreecommitdiff
path: root/src/cmd/5g/gsubr.c
diff options
context:
space:
mode:
authorKai Backman <kaib@golang.org>2009-07-12 22:12:33 -0700
committerKai Backman <kaib@golang.org>2009-07-12 22:12:33 -0700
commitff651150b8a77a79ceb50d63f9803b67e9a159d6 (patch)
treec5bca4dca43e03bcbed651f6c5242e1893703ee4 /src/cmd/5g/gsubr.c
parentcb2a52d0d8a970c7a53bd1c041d6e27c680f844b (diff)
downloadgolang-ff651150b8a77a79ceb50d63f9803b67e9a159d6.tar.gz
fixed typo where output arguments where pushed on to R0
instead of SP. R=rsc APPROVED=rsc DELTA=13 (3 added, 7 deleted, 3 changed) OCL=31488 CL=31501
Diffstat (limited to 'src/cmd/5g/gsubr.c')
-rw-r--r--src/cmd/5g/gsubr.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/cmd/5g/gsubr.c b/src/cmd/5g/gsubr.c
index aea27f18d..999592bf2 100644
--- a/src/cmd/5g/gsubr.c
+++ b/src/cmd/5g/gsubr.c
@@ -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;
+ n->xoffset = first->width + 4;
n->addable = 1;
goto fp;
}
@@ -364,26 +364,22 @@ 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;
+ n->xoffset = t->width + 4;
n->addable = 1;
fp:
switch(fp) {
+ default:
+ fatal("nodarg %T %d", t, fp);
+
case 0: // output arg
n->op = OINDREG;
- n->val.u.reg = REGRET;
+ n->val.u.reg = REGSP;
break;
case 1: // input arg
n->class = PPARAM;
break;
-
- case 2: // offset output arg
-fatal("shouldnt be used");
- n->op = OINDREG;
- n->val.u.reg = REGSP;
- n->xoffset += types[tptr]->width;
- break;
}
return n;
}