Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.155
 
1.156
 
MAIN:ragge:20051112082742
 
reader.c
_>805805         p->n_op = REG;
 806806         p->n_lval = 0;
 807807         p->n_name = "";
<>808 -#ifdef MULTICLASS
 809 -#define n_rall  n_reg
 810 -#endif
811808 #if 0
 812809         if (xnewreg && (q->needs & NSPECIAL)) {
 813810                 int left, right, res, mask;
     
 !
820817                 if (l->n_op != REG)
 821818                         comperr("rewrite left");
 822819 #endif
<> 820+#ifdef MULTICLASS
  821+                p->n_reg = p->n_rval = l->n_rval;
  822+#else
823823                 p->n_rall = p->n_rval = l->n_rval;
<> 824+#endif
824825         } else if (rewrite & RRIGHT) {
 825826 #ifdef PCC_DEBUG
 826827                 if (r->n_op != REG)
 827828                         comperr("rewrite right");
 828829 #endif
<>829 -                p->n_rall = p->n_rval = r->n_rval;
 830 -        } else if (rewrite & RESC1)
  830+#ifdef MULTICLASS
  831+                p->n_reg = p->n_rval = r->n_rval;
  832+#else
  833+                p->n_rall = p->n_rval = l->n_rval;
  834+#endif
  835+        } else if (rewrite & RESC1) {
  836+#ifdef MULTICLASS
  837+                p->n_reg = p->n_rval = DECRA1(p->n_reg);
  838+#else
831839                 p->n_rval = p->n_rall;
<>832 -        else if (rewrite & RESC2)
  840+#endif
  841+        } else if (rewrite & RESC2)
  842+#ifdef MULTICLASS
  843+                p->n_reg = p->n_rval = DECRA2(p->n_reg);
  844+#else
833845                 p->n_rval = p->n_rall + szty(p->n_type);
<> 846+#endif
834847         else if (rewrite & RESC3)
<> 848+#ifdef MULTICLASS
  849+                p->n_rval = 0; /* XXX */
  850+#else
835851                 p->n_rval = p->n_rall + 2*szty(p->n_type);
<> 852+#endif
836853         else if (p->n_su == DORIGHT)
<> 854+#ifdef MULTICLASS
  855+                p->n_reg = p->n_rval = l->n_rval; /* XXX special */
  856+#else
837857                 p->n_rall = p->n_rval = l->n_rval; /* XXX special */
<> 858+#endif
838859         if (optype(o) != LTYPE)
 839860                 tfree(l);
 840861         if (optype(o) == BITYPE)
     
 !
849870         if (p->n_su == -1) /* For OREGs and similar */
 850871                 return gencode(p->n_left, cookie);
 851872 
<> 873+#ifdef MULTICLASS
  874+        if (p->n_op == REG && p->n_reg == p->n_rval)
  875+                return; /* meaningless move to itself */
  876+        if (p->n_op == ASSIGN && p->n_left->n_op == REG &&
  877+            p->n_left->n_rval == p->n_reg &&
  878+            (p->n_su & RMASK) &&
  879+            p->n_right->n_reg == p->n_reg) {
  880+                gencode(p->n_right, INREGS);
  881+                return; /* meaningless assign */
  882+        }
  883+#else
852884         if (p->n_op == REG && p->n_rall == p->n_rval)
 853885                 return; /* meaningless move to itself */
 854886         if (p->n_op == ASSIGN && p->n_left->n_op == REG &&
 855887             p->n_left->n_rval == p->n_rall &&
 856888             (p->n_su & RMASK) &&
 857889             p->n_right->n_rall == p->n_rall) {
<>858 -#ifdef MULTICLASS
 859 -                gencode(p->n_right, INREGS);
 860 -#else
861890                 gencode(p->n_right, INTAREG|INTBREG);
<>862 -#endif
863891                 return; /* meaningless assign */
 864892         }
<> 893+#endif
865894 
 866895         if (p->n_su & DORIGHT) {
 867896 #ifdef MULTICLASS
     
 !
894923                 if (q->needs & NSPECIAL) {
 895924                         struct rspecial *s = nspecial(q);
 896925 
<> 926+#ifdef MULTICLASS
  927+                        if (s->right && s->right[0] != p->n_right->n_reg) {
  928+                                rmove(p->n_right->n_reg,
  929+                                    s->right[0], TCLASS(p->n_right->n_su));
  930+#else
897931                         if (s->right && s->right[0] != p->n_right->n_rall) {
 898932                                 rmove(p->n_right->n_rall,
 899933                                     s->right[0], p->n_type);
<>900 -                                p->n_right->n_rall = s->right[0];
  934+#endif
  935+// XXX                          p->n_right->n_rall = s->right[0];
901936                                 p->n_right->n_rval = s->right[0];
 902937                         }
 903938                 } else if ((q->rewrite & RRIGHT) &&
<> 939+#ifdef MULTICLASS
  940+                    p->n_right->n_reg != p->n_reg) {
  941+                        rmove(p->n_right->n_reg, p->n_reg, TCLASS(p->n_su));
  942+                        p->n_right->n_reg = p->n_reg;
  943+                        p->n_right->n_reg = p->n_reg;
  944+#else
904945                     p->n_right->n_rall != p->n_rall) {
 905946                         rmove(p->n_right->n_rall, p->n_rall, p->n_type);
 906947                         p->n_right->n_rall = p->n_rall;
 907948                         p->n_right->n_rval = p->n_rall;
<> 949+#endif
908950                 }
 909951         }
 910952         if ((p->n_su & LMASK) == LREG) {
 911953                 if (q->needs & NSPECIAL) {
 912954                         struct rspecial *s = nspecial(q);
 913955 
<> 956+#ifdef MULTICLASS
  957+                        if (s->left && s->left[0] != p->n_left->n_reg) {
  958+                                rmove(p->n_left->n_reg, s->left[0],
  959+                                    TCLASS(p->n_left->n_su));
  960+#else
914961                         if (s->left && s->left[0] != p->n_left->n_rall) {
 915962                                 rmove(p->n_left->n_rall, s->left[0], p->n_type);
<>916 -                                p->n_left->n_rall = s->left[0];
  963+#endif
  964+// XXX                          p->n_left->n_rall = s->left[0];
917965                                 p->n_left->n_rval = s->left[0];
 918966                         }
 919967                 } else if ((q->rewrite & RLEFT) &&
<> 968+#ifdef MULTICLASS
  969+                    p->n_left->n_reg != p->n_reg) {
  970+                        rmove(p->n_left->n_reg, p->n_reg, TCLASS(p->n_su));
  971+                        p->n_left->n_reg = p->n_reg;
  972+                        p->n_left->n_rval = p->n_reg;
  973+#else
920974                     p->n_left->n_rall != p->n_rall) {
 921975                         rmove(p->n_left->n_rall, p->n_rall, p->n_type);
 922976                         p->n_left->n_rall = p->n_rall;
 923977                         p->n_left->n_rval = p->n_rall;
<> 978+#endif
924979                 }
 925980         }
 926981 
 927982         expand(p, cookie, q->cstring);
<>928 -        if (callop(p->n_op) && p->n_rall != RETREG)
  983+#ifdef MULTICLASS
  984+        if (callop(p->n_op) && p->n_reg != RETREG) {
  985+                rmove(RETREG, p->n_reg, TCLASS(p->n_su));
  986+#else
  987+        if (callop(p->n_op) && p->n_rall != RETREG) {
929988                 rmove(RETREG, p->n_rall, p->n_type);
<>930 -        else if (q->needs & NSPECIAL) {
  989+#endif
  990+        } else if (q->needs & NSPECIAL) {
931991                 struct rspecial *s = nspecial(q);
 932992 
<> 993+#ifdef MULTICLASS
  994+                if (s->res && p->n_reg != s->res[0])
  995+                        rmove(s->res[0], p->n_reg, TCLASS(p->n_su));
  996+#else
933997                 if (s->res && p->n_rall != s->res[0])
 934998                         rmove(s->res[0], p->n_rall, p->n_type);
<> 999+#endif
9351000         }
 9361001         rewrite(p, q->rewrite);
 9371002 }
     
 !
9861051         fprintf(prfil, ", " );
 9871052         tprint(prfil, p->n_type, p->n_qual);
 9881053         fprintf(prfil, ", " );
<> 1054+#ifndef MULTICLASS
9891055         if( p->n_rall == NOPREF ) fprintf(prfil, "NOPREF" );
<>990 -        else {
  1056+        else
  1057+#endif
  1058+        {
9911059 #ifdef MULTICLASS
<>992 -                if (p->n_reg < 100) /* XXX */
 993 -                        fprintf(prfil, "PREF %s", rnames[p->n_reg]);
  1060+                int gregn(struct regw *);
  1061+                if (p->n_reg < 100000) /* XXX */
  1062+                        fprintf(prfil, "REG %s", rnames[DECRD(p->n_reg)]);
9941063                 else
<>995 -                        fprintf(prfil, "REGW %p", p->n_regw);
  1064+                        fprintf(prfil, "TEMP %d", gregn(p->n_regw));
<_9961065 #else
 9971066                 if( p->n_rall & MUSTDO ) fprintf(prfil, "MUSTDO " );
 9981067                 else fprintf(prfil, "PREF " );
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-17 01:29 +0200