Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.19
 
1.20
 
MAIN:ragge:20110713153350
 
local2.c
_>204204         { MVD, MVD, MVD, MVD, CVT, CVT, CSE, CSE, CVT, CVT },
 205205         { MVD, MVD, MVD, MVD, MVZ, MVZ, MZE, MZE, MZC, MZC },
 206206         { MVD, MVD, MVD, MVD, MVD, MVD, MLE, MLE, CVT, CVT },
<>207 -        { MVD, MVD, MVD, MVD, MVZ, MVZ, MLZ, MLZ, 'I', 'I' },
  207+        { MVD, MVD, MVD, MVD, MVD, MVD, MLZ, MLZ, 'I', 'I' },
208208         { MVD, MVD, MVD, MVD, MVD, MVD, MVD, MVD, 'J', 'K' },
 209209         { MVD, MVD, MVD, MVD, MVD, MVD, MVD, MVD, 'L', 'M' },
 210210         { CVT, CVT, CVT, CVT, CVT, CVT, 'N', 'O', MVD, CVT },
     
 !
234234         case MLE:
 235235         case MLZ:
 236236         case MVD:
<>237 -                expand(p, INAREG|INBREG, "\tmovZL AL,A1\n");
  237+                expand(p, INAREG|INBREG, "\tmovZL\tAL,A1\n");
238238                 break;
 239239 
 240240         case CSE:
<>241 -                expand(p, INAREG|INBREG, "\tcvtZLl AL,A1\n");
  241+                expand(p, INAREG|INBREG, "\tcvtZLl\tAL,A1\n");
242242                 break;
 243243 
 244244         case CVT:
<>245 -                expand(p, INAREG|INBREG, "\tcvtZLZR AL,A1\n");
  245+                expand(p, INAREG|INBREG, "\tcvtZLZR\tAL,A1\n");
246246                 break;
 247247 
 248248         case MZE:
<>249 -                expand(p, INAREG|INBREG, "\tmovzZLl AL,A1\n");
  249+                expand(p, INAREG|INBREG, "\tmovzZLl\tAL,A1\n");
250250                 break;
 251251 
 252252         case MVZ:
<>253 -                expand(p, INAREG|INBREG, "\tmovzZLZR AL,A1\n");
  253+                expand(p, INAREG|INBREG, "\tmovzZLZR\tAL,A1\n");
254254                 break;
 255255 
 256256         case MZC:
<>257 -                expand(p, INAREG|INBREG, "\tmovzZLl AL,A1\n");
 258 -                expand(p, INAREG|INBREG, "\tcvtlZR A1,A1\n");
  257+                expand(p, INAREG|INBREG, "\tmovzZLl\tAL,A1\n");
  258+                expand(p, INAREG|INBREG, "\tcvtlZR\tA1,A1\n");
259259                 break;
 260260 
 261261         default:
     
 !
264264         switch (o) {
 265265         case MLE:
 266266         case CSE:
<>267 -                expand(p, INBREG, "\tashl $-31,A1,U1\n");
  267+                expand(p, INBREG, "\tashl\t$-31,A1,U1\n");
268268                 break;
 269269         case MLZ:
 270270         case MZE:
<>271 -                expand(p, INAREG|INBREG, "\tclrl U1\n");
  271+                expand(p, INAREG|INBREG, "\tclrl\tU1\n");
272272                 break;
 273273         }
 274274 }
     
 !
11201120 {
 11211121         /* do local tree transformations and optimizations */
 11221122 
<>1123 -        register NODE *r;
  1123+        NODE *r, *s;
11241124 
<>1125 -        switch( p->n_op ) {
  1125+        switch (p->n_op) {
11261126 
 11271127         case AND:
 11281128                 /* commute L and R to eliminate compliments and constants */
<>1129 -                if( (p->n_left->n_op==ICON&&p->n_left->n_name[0]==0) || p->n_left->n_op==COMPL ) {
  1129+                if ((p->n_left->n_op == ICON && p->n_left->n_name[0] == 0) ||
  1130+                    p->n_left->n_op==COMPL) {
11301131                         r = p->n_left;
 11311132                         p->n_left = p->n_right;
 11321133                         p->n_right = r;
<>1133 -                        }
 1134 -#if 0
 1135 -        case ASG AND:
  1134+                }
11361135                 /* change meaning of AND to ~R&L - bic on pdp11 */
 11371136                 r = p->n_right;
<>1138 -                if( r->op==ICON && r->name[0]==0 ) { /* compliment constant */
 1139 -                        r->lval = ~r->lval;
 1140 -                        }
 1141 -                else if( r->op==COMPL ) { /* ~~A => A */
 1142 -                        r->op = FREE;
 1143 -                        p->right = r->left;
 1144 -                        }
 1145 -                else { /* insert complement node */
 1146 -                        p->right = talloc();
 1147 -                        p->right->op = COMPL;
 1148 -                        p->right->rall = NOPREF;
 1149 -                        p->right->type = r->type;
 1150 -                        p->right->left = r;
 1151 -                        p->right->right = NULL;
 1152 -                        }
 1153 -                break;
 1154 -#endif
  1137+                if (r->n_op == ICON && r->n_name[0] == 0) {
  1138+                        /* compliment constant */
  1139+                        r->n_lval = ~r->n_lval;
  1140+                } else if (r->n_op == COMPL) { /* ~~A => A */
  1141+                        s = r->n_left;
  1142+                        nfree(r);
  1143+                        p->n_right = s;
  1144+                } else { /* insert complement node */
  1145+                        p->n_right = mkunode(COMPL, r, 0, r->n_type);
11551146                 }
<> 1147+                break;
  1148+
11561149         }
<> 1150+}
<_11571151 
 11581152 void
 11591153 myreader(struct interpass *ipole)
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-21 02:26 +0200