diff options
author | Kai Backman <kaib@golang.org> | 2009-10-02 09:06:51 -0700 |
---|---|---|
committer | Kai Backman <kaib@golang.org> | 2009-10-02 09:06:51 -0700 |
commit | e4dc97f71b0e6e3cd18d489e612d7a927045611c (patch) | |
tree | ecbccb61f16436ac9e240573564214c0618d3c91 /src/cmd/5g/ggen.c | |
parent | 0123e9ab32cf607bac1dd51b815eeda0f2e1647f (diff) | |
download | golang-e4dc97f71b0e6e3cd18d489e612d7a927045611c.tar.gz |
a few more code generation bugs and an interface alignment issue.
go/test: passes 74% (251/339)
R=rsc
APPROVED=rsc
DELTA=40 (34 added, 0 deleted, 6 changed)
OCL=35254
CL=35275
Diffstat (limited to 'src/cmd/5g/ggen.c')
-rw-r--r-- | src/cmd/5g/ggen.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cmd/5g/ggen.c b/src/cmd/5g/ggen.c index 34c8bdd8c..13b587906 100644 --- a/src/cmd/5g/ggen.c +++ b/src/cmd/5g/ggen.c @@ -211,13 +211,14 @@ cgen_callinter(Node *n, Node *res, int proc) agen(i, &nodr); // REG = &inter nodindreg(&nodsp, types[tptr], REGSP); + nodsp.xoffset = 4; nodo.xoffset += widthptr; - cgen(&nodo, &nodsp); // 0(SP) = 8(REG) -- i.s + cgen(&nodo, &nodsp); // 4(SP) = 8(REG) -- i.s nodo.xoffset -= widthptr; cgen(&nodo, &nodr); // REG = 0(REG) -- i.m - nodo.xoffset = n->left->xoffset + 4*widthptr; + nodo.xoffset = n->left->xoffset + 3*widthptr + 8; cgen(&nodo, &nodr); // REG = 32+offset(REG) -- i.m->fun[f] // BOTCH nodr.type = fntype; |