summaryrefslogtreecommitdiff
path: root/src/cmd/5g/ggen.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/5g/ggen.c')
-rw-r--r--src/cmd/5g/ggen.c5
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;