Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.28
 
1.29
 
MAIN:ragge:20030730094858
 
reader.c
_>3333 } *templst;
 3434 
 3535 int e2print(NODE *p, int down, int *a, int *b);
<> 36+void cbranch(NODE *p, int false);
3637 
 3738 #ifdef PCC_DEBUG
 3839 static void
     
 !
337338 
 338339         case CBRANCH:
 339340                 o = p2->n_lval;
<>340 -                cbranch( p1, -1, o );
  341+                cbranch( p1, o );
341342                 nfree(p2);
 342343                 nfree(p);
 343344                 return;
     
 !
642643  */
 643644 
 644645 void
<>645 -cbranch(NODE *p, int true, int false)
  646+cbranch(NODE *p, int false)
646647 {
<>647 -        int o, lab;
  648+        switch (p->n_op) {
648649 
<>649 -        lab = -1;
 650 -
 651 -        switch( o=p->n_op ){
 652 -
653650         case ULE:
 654651         case ULT:
 655652         case UGE:
     
 !
660657         case LT:
 661658         case GE:
 662659         case GT:
<>663 -                if( true < 0 ){
 664 -                        o = p->n_op = negrel[ o-EQ ];
 665 -                        true = false;
 666 -                        false = -1;
 667 -                        }
 668 -#ifndef NOOPT
 669 -                if( p->n_right->n_op == ICON && p->n_right->n_lval == 0 && p->n_right->n_name[0] == '\0' ){
 670 -                        switch( o ){
 671 -
 672 -                        case UGT:
 673 -                        case ULE:
 674 -                                o = p->n_op = (o==UGT)?NE:EQ;
 675 -                        case EQ:
 676 -                        case NE:
 677 -                        case LE:
 678 -                        case LT:
 679 -                        case GE:
 680 -                        case GT:
 681 -                                if( logop(p->n_left->n_op) ){
 682 -                                        /* strange situation: e.g., (a!=0) == 0 */
 683 -                                        /* must prevent reference to p->n_left->lable, so get 0/1 */
 684 -                                        /* we could optimize, but why bother */
 685 -                                        codgen( p->n_left, INAREG|INBREG );
 686 -                                        }
 687 -                                codgen( p->n_left, FORCC );
 688 -                                cbgen( o, true, 'I' );
 689 -                                break;
 690 -
 691 -                        case UGE:
 692 -                                codgen(p->n_left, FORCC);
 693 -                                cbgen( 0, true, 'I' );  /* unconditional branch */
 694 -                                break;
 695 -                        case ULT:
 696 -                                codgen(p->n_left, FORCC);
 697 -                                }
 698 -                        }
 699 -                else
 700 -#endif
 701 -                        {
 702 -                        p->n_label = true;
 703 -                        codgen( p, FORCC );
 704 -                        }
 705 -                if( false>=0 ) cbgen( 0, false, 'I' );
 706 -                reclaim( p, RNULL, 0 );
  660+                p->n_op = negrel[p->n_op - EQ];
  661+                p->n_label = false;
  662+                codgen(p, FORCC);
  663+                reclaim(p, RNULL, 0);
707664                 return;
 708665 
 709666         case ICON:
<>710 -                if( p->n_type != FLOAT && p->n_type != DOUBLE ){
 711 -
 712 -                        if( p->n_lval || p->n_name[0] ){
 713 -                                /* addresses of C objects are never 0 */
 714 -                                if( true>=0 ) cbgen( 0, true, 'I' );
 715 -                                }
 716 -                        else if( false>=0 ) cbgen( 0, false, 'I' );
  667+                if (p->n_type != FLOAT && p->n_type != DOUBLE) {
  668+                        if ((p->n_lval == 0) && (p->n_name[0] == 0))
  669+                                cbgen(0, false, 'I');
717670                         nfree(p);
 718671                         return;
 719672                 }
 720673                 /* fall through to default with other strange constants */
 721674 
 722675         default:
 723676                 /* get condition codes */
<>724 -                codgen( p, FORCC );
 725 -                if( true >= 0 ) cbgen( NE, true, 'I' );
 726 -                if( false >= 0 ) cbgen( true >= 0 ? 0 : EQ, false, 'I' );
 727 -                reclaim( p, RNULL, 0 );
  677+                codgen(p, FORCC);
  678+                cbgen(EQ, false, 'I');
  679+                reclaim(p, RNULL, 0);
728680                 return;
 729681 
<>730 -                }
 731 -
732682         }
<> 683+}
<_733684 
 734685 void
 735686 rcount()
FishEye: Open Source License registered to PCC.
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-12-23 02:35 +0100