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.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/cmd/5g/ggen.c b/src/cmd/5g/ggen.c
index 3f5f47e7b..de100620b 100644
--- a/src/cmd/5g/ggen.c
+++ b/src/cmd/5g/ggen.c
@@ -4,6 +4,8 @@
#undef EXTERN
#define EXTERN
+#include <u.h>
+#include <libc.h>
#include "gg.h"
#include "opt.h"
@@ -12,7 +14,6 @@ defframe(Prog *ptxt)
{
// fill in argument size
ptxt->to.type = D_CONST2;
- ptxt->reg = 0; // flags
ptxt->to.offset2 = rnd(curfn->type->argwid, widthptr);
// fill in final stack size
@@ -28,10 +29,10 @@ markautoused(Prog* p)
{
for (; p; p = p->link) {
if (p->from.name == D_AUTO && p->from.node)
- p->from.node->used++;
+ p->from.node->used = 1;
if (p->to.name == D_AUTO && p->to.node)
- p->to.node->used++;
+ p->to.node->used = 1;
}
}
@@ -544,7 +545,7 @@ cgen_shift(int op, Node *nl, Node *nr, Node *res)
}
// test for shift being 0
- p1 = gins(ATST, &n1, N);
+ gins(ATST, &n1, N);
p3 = gbranch(ABEQ, T);
// test and fix up large shifts