diff options
author | Ori Bernstein <orib@google.com> | 2013-02-06 14:02:33 -0500 |
---|---|---|
committer | Ori Bernstein <orib@google.com> | 2013-02-06 14:02:33 -0500 |
commit | 8b1de0f225eab90b377e521de437718d2587b383 (patch) | |
tree | 23b5e4e473e81ac305f3e5922486d22a52dc0ade | |
parent | f635856c50c2a640c3765af746ee23a8d4282373 (diff) | |
download | mc-8b1de0f225eab90b377e521de437718d2587b383.tar.gz |
Rename 'locs' to 'stkoff', which is a better name.
-rw-r--r-- | 6/asm.h | 2 | ||||
-rw-r--r-- | 6/isel.c | 4 | ||||
-rw-r--r-- | 6/simp.c | 10 |
3 files changed, 8 insertions, 8 deletions
@@ -120,7 +120,7 @@ struct Isel { Htab *spillslots; /* reg id => int stkoff */ Htab *reglocs; /* decl id => Loc *reg */ Htab *stkoff; /* decl id => int stkoff */ - Htab *_globls; /* decl id => char *globlname */ + Htab *globls; /* decl id => char *globlname */ /* increased when we spill */ Loc *stksz; @@ -87,12 +87,12 @@ static Loc *loc(Isel *s, Node *n) if (hthas(s->stkoff, n)) { stkoff = (ssize_t)htget(s->stkoff, n); l = locmem(-stkoff, locphysreg(Rrbp), NULL, mode(n)); - } else if (hthas(s->_globls, n)) { + } else if (hthas(s->globls, n)) { if (tybase(exprtype(n))->type == Tyfunc) rip = NULL; else rip = locphysreg(Rrip); - l = locmeml(htget(s->_globls, n), rip, NULL, mode(n)); + l = locmeml(htget(s->globls, n), rip, NULL, mode(n)); } else { if (!hthas(s->reglocs, n)) htput(s->reglocs, n, locreg(mode(n))); @@ -44,7 +44,7 @@ struct Simp { size_t stksz; size_t argsz; Htab *globls; - Htab *locs; + Htab *stkoff; }; static Node *simp(Simp *s, Node *n); @@ -1208,7 +1208,7 @@ static void declarelocal(Simp *s, Node *n) s->stksz = align(s->stksz, min(size(n), Ptrsz)); if (debugopt['i']) printf("declare %s:%s(%zd) at %zd\n", declname(n), tystr(decltype(n)), n->decl.did, s->stksz); - htput(s->locs, n, (void*)s->stksz); + htput(s->stkoff, n, (void*)s->stksz); } static void declarearg(Simp *s, Node *n) @@ -1217,7 +1217,7 @@ static void declarearg(Simp *s, Node *n) s->argsz = align(s->argsz, min(size(n), Ptrsz)); if (debugopt['i']) printf("declare %s(%zd) at %zd\n", declname(n), n->decl.did, -(s->argsz + 2*Ptrsz)); - htput(s->locs, n, (void*)-(s->argsz + 2*Ptrsz)); + htput(s->stkoff, n, (void*)-(s->argsz + 2*Ptrsz)); s->argsz += size(n); } @@ -1352,7 +1352,7 @@ static Func *simpfn(Simp *s, char *name, Node *n, int export) fn->name = strdup(name); fn->isexport = export; fn->stksz = align(s->stksz, 8); - fn->locs = s->locs; + fn->stkoff = s->stkoff; fn->ret = s->ret; fn->cfg = cfg; return fn; @@ -1387,7 +1387,7 @@ static void simpdcl(Node *dcl, Htab *globls, Func ***fn, size_t *nfn, Node ***bl Func *f; name = asmname(dcl->decl.name); - s.locs = mkht(dclhash, dcleq); + s.stkoff = mkht(dclhash, dcleq); s.globls = globls; s.blobs = *blob; s.nblobs = *nblob; |