diff options
author | Ondřej Surý <ondrej@sury.org> | 2012-04-06 15:14:11 +0200 |
---|---|---|
committer | Ondřej Surý <ondrej@sury.org> | 2012-04-06 15:14:11 +0200 |
commit | 505c19580e0f43fe5224431459cacb7c21edd93d (patch) | |
tree | 79e2634c253d60afc0cc0b2f510dc7dcbb48497b /src/cmd/5g/ggen.c | |
parent | 1336a7c91e596c423a49d1194ea42d98bca0d958 (diff) | |
download | golang-505c19580e0f43fe5224431459cacb7c21edd93d.tar.gz |
Imported Upstream version 1upstream/1
Diffstat (limited to 'src/cmd/5g/ggen.c')
-rw-r--r-- | src/cmd/5g/ggen.c | 9 |
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 |