Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.59
 
1.60
 
MAIN:ragge:20030909093655
 
reader.c
_>293293 void
 294294 order(NODE *p, int cook)
 295295 {
<> 296+        struct optab *q;
296297         int o, ty, m, rv;
 297298         int cookie;
 298299         NODE *p1, *p2;
     
 !
336337         case MUL:
 337338         case LS:
 338339         case RS:
<>339 -                {
 340 -                        struct optab *q;
341340 
<>342 -                        /*
 343 -                         * Be sure that both sides are addressable.
 344 -                         */
  341+                /*
  342+                 * Be sure that both sides are addressable.
  343+                 */
345344 //printf("newstyle node %p\n", p);
<>346 -                        if (!canaddr(p->n_left)) {
 347 -                                if (p->n_left->n_op == UNARY MUL) {
 348 -                                        offstar(p->n_left->n_left);
 349 -                                        goto again;
 350 -                                }
 351 -                                order(p->n_left, INTAREG|INTBREG);
  345+                if (!canaddr(p->n_left)) {
  346+                        if (p->n_left->n_op == UNARY MUL) {
  347+                                offstar(p->n_left->n_left);
  348+                                goto again;
352349                         }
<> 350+                        order(p->n_left, INTAREG|INTBREG);
  351+                }
353352 //printf("newstyle addrl %p\n", p);
<>354 -                        if (!canaddr(p->n_right)) {
 355 -                                if (p->n_right->n_op == UNARY MUL) {
 356 -                                        offstar(p->n_right->n_left);
 357 -                                        goto again;
 358 -                                }
 359 -                                order(p->n_right, INTAREG|INTBREG);
  353+                if (!canaddr(p->n_right)) {
  354+                        if (p->n_right->n_op == UNARY MUL) {
  355+                                offstar(p->n_right->n_left);
  356+                                goto again;
360357                         }
<> 358+                        order(p->n_right, INTAREG|INTBREG);
  359+                }
361360 //printf("newstyle addrr %p\n", p);
 362361 
<>363 -                        /*
 364 -                         *
 365 -                         */
  362+                /*
  363+                 *
  364+                 */
366365 #define LTMP    1
 367366 #define RTMP    2
<>368 -                        m = INTAREG|INTBREG;
 369 -                        rv = findops(p);
 370 -foo:                    if (rv < 0) {
 371 -                                if (setnbin(p))
 372 -                                        goto again;
 373 -                                goto nomat;
 374 -                        }
 375 -                        if (rv & LTMP)
 376 -                                order(p->n_left, INTAREG|INTBREG);
  367+                m = INTAREG|INTBREG;
  368+                rv = findops(p);
  369+foo:            if (rv < 0) {
  370+                        if (setnbin(p))
  371+                                goto again;
  372+                        goto nomat;
  373+                }
  374+                if (rv & LTMP)
  375+                        order(p->n_left, INTAREG|INTBREG);
377376 //printf("newstyle ltmp %p\n", p);
<>378 -                        if (rv & RTMP)
 379 -                                order(p->n_right, INTAREG|INTBREG);
  377+                if (rv & RTMP)
  378+                        order(p->n_right, INTAREG|INTBREG);
380379 //printf("newstyle rtmp %p\n", p);
 381380                 
 382381 
<>383 -                        q = &table[rv >> 2];
 384 -                        if (!allo(p, q)) {
 385 -                                /*
 386 -                                 * Ran out of suitable temp regs.
 387 -                                 * Force everything onto stack.
 388 -                                 * Be careful to avoid loops.
 389 -                                 * XXX - this is bad code!
 390 -                                 */
 391 -                                if ((rv & LTMP) == 0 && istnode(p->n_left)) {
 392 -                                        order(p->n_left, INTEMP);
 393 -                                        goto again;
 394 -                                } else if (!(rv & RTMP) &&istnode(p->n_right)) {
 395 -                                        order(p->n_right, INTEMP);
 396 -                                        goto again;
 397 -                                }
 398 -                                cerror("allo failed");
  382+                q = &table[rv >> 2];
  383+                if (!allo(p, q)) {
  384+                        /*
  385+                         * Ran out of suitable temp regs.
  386+                         * Force everything onto stack.
  387+                         * Be careful to avoid loops.
  388+                         * XXX - this is bad code!
  389+                         */
  390+                        if ((rv & LTMP) == 0 && istnode(p->n_left)) {
  391+                                order(p->n_left, INTEMP);
  392+                                goto again;
  393+                        } else if (!(rv & RTMP) &&istnode(p->n_right)) {
  394+                                order(p->n_right, INTEMP);
  395+                                goto again;
399396                         }
<>400 -                        expand(p, m, q->cstring);
 401 -                        reclaim(p, q->rewrite, m);
 402 -//printf("newstyle ute %p\n", p);
  397+                        cerror("allo failed");
403398                 }
<> 399+                expand(p, m, q->cstring);
  400+                reclaim(p, q->rewrite, m);
  401+//printf("newstyle ute %p\n", p);
404402                 goto cleanup;
 405403 
 406404                 /*
     
 !
417415         case ULT:
 418416         case UGE:
 419417         case UGT:
<>420 -if (0) {
  418+
421419                 if (!canaddr(p->n_left)) {
 422420                         if (p->n_left->n_op == UNARY MUL) {
 423421                                 offstar(p->n_left->n_left);
 424422                                 goto again;
 425423                         }
<>426 -                        order(p->n_left, INTAREG|INTBREG);
  424+                        order(p->n_left, INTAREG|INTBREG|INAREG|INBREG);
427425                 }
 428426                 if (!canaddr(p->n_right)) {
 429427                         if (p->n_right->n_op == UNARY MUL) {
 430428                                 offstar(p->n_right->n_left);
 431429                                 goto again;
 432430                         }
<>433 -                        order(p->n_right, INTAREG|INTBREG);
  431+                        order(p->n_right, INTAREG|INTBREG|INAREG|INBREG);
434432                 }
 435433                 rv = relops(p);
 436434                 m = FORCC;
 437435                 goto foo;
<>438 -}
<_439436 
 440437         default:
 441438                 /* look for op in table */
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-24 04:27 +0200