Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.44
 
1.45
 
MAIN:ragge:20070127082637
 
local.c
_>362362 
 363363 /*
 364364  * Allocate off bits on the stack.  p is a tree that when evaluated
<>365 - * is the multiply count for off, t is a NAME node where to write
  365+ * is the multiply count for off, t is a storeable node where to write
366366  * the allocated address.
 367367  */
 368368 void
 369369 spalloc(NODE *t, NODE *p, OFFSZ off)
 370370 {
 371371         NODE *sp;
 372372 
<>373 -        if ((off % SZINT) == 0)
 374 -                pbuildtree(MUL, p, bcon(off/SZINT));
 375 -        else if ((off % SZSHORT) == 0) {
 376 -                p = buildtree(MUL, p, bcon(off/SZSHORT));
 377 -                p = buildtree(PLUS, p, bcon(1));
 378 -                p = buildtree(RS, p, bcon(1));
 379 -        } else if ((off % SZCHAR) == 0) {
 380 -                p = buildtree(MUL, p, bcon(off/SZCHAR));
 381 -                p = buildtree(PLUS, p, bcon(3));
 382 -                p = buildtree(RS, p, bcon(2));
 383 -        } else
 384 -                cerror("roundsp");
  373+        p = buildtree(MUL, p, bcon(off/SZCHAR)); /* XXX word alignment? */
385374 
<> 375+        /* sub the size from sp */
  376+        sp = block(REG, NIL, NIL, p->n_type, 0, 0);
  377+        sp->n_lval = 0;
  378+        sp->n_rval = STKREG;
  379+        ecomp(buildtree(MINUSEQ, sp, p));
  380+
386381         /* save the address of sp */
 387382         sp = block(REG, NIL, NIL, PTR+INT, t->n_df, t->n_sue);
 388383         sp->n_lval = 0;
 389384         sp->n_rval = STKREG;
 390385         t->n_type = sp->n_type;
 391386         ecomp(buildtree(ASSIGN, t, sp)); /* Emit! */
 392387 
<>393 -        /* add the size to sp */
 394 -        sp = block(REG, NIL, NIL, p->n_type, 0, 0);
 395 -        sp->n_lval = 0;
 396 -        sp->n_rval = STKREG;
 397 -        ecomp(buildtree(PLUSEQ, sp, p));
<_398388 }
 399389 
 400390 /*
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-21 07:54 +0100