Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.115
 
1.116
 
MAIN:ragge:20050205143907
 
reader.c
_>971971 }
 972972 #endif
 973973 
<> 974+struct tmpsave {
  975+        struct tmpsave *next;
  976+        CONSZ tempaddr;
  977+        int tempno;
  978+} *tmpsave;
  979+
974980 /*
 975981  * change left TEMPs into OREGs
 976982  */
 977983 void
 978984 deltemp(NODE *p)
 979985 {
<> 986+        struct tmpsave *w;
980987         NODE *l, *r;
 981988 
<>982 -        if (p->n_op == ADDROF) {
  989+        if (p->n_op == TEMP) {
  990+                /* Check if already existing */
  991+                for (w = tmpsave; w; w = w->next)
  992+                        if (w->tempno == p->n_lval)
  993+                                break;
  994+                if (w == NULL) {
  995+                        /* new on stack */
  996+                        w = tmpalloc(sizeof(struct tmpsave));
  997+                        w->tempno = p->n_lval;
  998+                        w->tempaddr = BITOOR(freetemp(szty(p->n_type)));
  999+                        w->next = tmpsave;
  1000+                        tmpsave = w;
  1001+                }
  1002+                p->n_op = OREG;
  1003+                p->n_rval = FPREG;
  1004+                p->n_lval = w->tempaddr;
  1005+        } else if (p->n_op == ADDROF) {
9831006                 /* TEMPs are already converted to OREGs */
 9841007                 if ((l = p->n_left)->n_op != OREG)
 9851008                         comperr("bad U&");
     
 !
10251048         NODE *ql, *qr;
 10261049         CONSZ temp;
 10271050 
<>1028 -        if (Oflag == 0)
 1029 -                deltemp(p);
 1030 -
10311051         if (p->n_op == UMUL) {
 10321052                 q = p->n_left;
 10331053                 if (q->n_op == REG) {
     
 !
10861106 canon(p) NODE *p; {
 10871107         /* put p in canonical form */
 10881108 
<> 1109+        walkf(p, deltemp);
<_10891110         walkf(p, setleft);      /* ptrs at left node for arithmetic */
 10901111         walkf(p, oreg2);        /* look for and create OREG nodes */
 10911112 #ifndef FIELDOPS
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-09-21 20:13 +0200