Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.270
 
1.271
 
MAIN:ragge:20110504180232
 
reader.c
_>9191 
 9292 static void gencode(NODE *p, int cookie);
 9393 static void genxasm(NODE *p);
<> 94+static void afree(void);
9495 
 9596 struct p2env p2env;
 9697 
     
 !
343344         }
 344345 #endif
 345346 
<> 347+        afree();
346348         p2e->epp = (struct interpass_prolog *)DLIST_PREV(&p2e->ipole, qelem);
 347349         p2maxautooff = p2autooff = p2e->epp->ipp_autos;
 348350 
     
 !
837839         putchar('\n');
 838840 }
 839841 
<> 842+/*
  843+ * Allocate temporary registers for use while emitting this table entry.
  844+ */
  845+static void
  846+allo(NODE *p, struct optab *q)
  847+{
  848+        extern int stktemp;
  849+        int i, n = ncnt(q->needs);
  850+
  851+        for (i = 0; i < NRESC; i++)
  852+                if (resc[i].n_op != FREE)
  853+                        comperr("allo: used reg");
  854+        if (n == 0 && (q->needs & NTMASK) == 0)
  855+                return;
  856+        for (i = 0; i < n+1; i++) {
  857+                resc[i].n_op = REG;
  858+                resc[i].n_type = p->n_type; /* XXX should be correct type */
  859+                resc[i].n_rval = DECRA(p->n_reg, i);
  860+                resc[i].n_su = p->n_su; /* ??? */
  861+        }
  862+        if (q->needs & NTMASK) {
  863+                resc[i].n_op = OREG;
  864+                resc[i].n_lval = stktemp;
  865+                resc[i].n_rval = FPREG;
  866+                resc[i].n_su = p->n_su; /* ??? */
  867+                resc[i].n_name = "";
  868+        }
  869+        if (i >= NRESC)
  870+                comperr("allo: too many allocs");
  871+}
  872+
  873+static void
  874+afree(void)
  875+{
  876+        int i;
  877+
  878+        for (i = 0; i < NRESC; i++)
  879+                resc[i].n_op = FREE;
  880+}
  881+
840882 void
 841883 gencode(NODE *p, int cookie)
 842884 {
     
 !
950992         if (TBLIDX(p->n_su) == 0)
 951993                 return;
 952994 
<> 995+        allo(p, q);
953996         expand(p, cookie, q->cstring);
<> 997+
954998 #ifdef FINDMOPS
 955999         if (ismops && DECRA(p->n_reg, 0) != regno(l) && cookie != FOREFF) {
 9561000                 CDEBUG(("gencode(%p) rmove\n", p));
     
 !
9901034         }
 9911035 #endif
 9921036         rewrite(p, q->rewrite, cookie);
<> 1037+        afree();
<_9931038 }
 9941039 
 9951040 int negrel[] = { NE, EQ, GT, GE, LT, LE, UGT, UGE, ULT, ULE } ;  /* negatives of relationals */
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-08-23 13:26 +0200