Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.15
 
1.16
 
MAIN:ragge:20110628093331
 
local2.c
_>4747 void
 4848 prologue(struct interpass_prolog *ipp)
 4949 {
<>50 -        printf("        .word 0x%x\n", ipp->ipp_regs[0]);
  50+        printf("        .word 0x%llx\n", (unsigned long long)ipp->ipp_regs[0]);
5151         if (p2maxautooff)
 5252                 printf("        subl2 $%d,%%sp\n", p2maxautooff);
 5353 }
     
 !
192192                 }
 193193 }
 194194 
<> 195+/*
  196+ * Emit code to compare two longlong numbers.
  197+ */
  198+static void
  199+twollcomp(NODE *p)
  200+{
  201+        int u;
  202+        int s = getlab2();
  203+        int e = p->n_label;
  204+        int cb1, cb2;
  205+
  206+        u = p->n_op;
  207+        switch (p->n_op) {
  208+        case NE:
  209+                cb1 = 0;
  210+                cb2 = NE;
  211+                break;
  212+        case EQ:
  213+                cb1 = NE;
  214+                cb2 = 0;
  215+                break;
  216+        case LE:
  217+        case LT:
  218+                u += (ULE-LE);
  219+                /* FALLTHROUGH */
  220+        case ULE:
  221+        case ULT:
  222+                cb1 = GT;
  223+                cb2 = LT;
  224+                break;
  225+        case GE:
  226+        case GT:
  227+                u += (ULE-LE);
  228+                /* FALLTHROUGH */
  229+        case UGE:
  230+        case UGT:
  231+                cb1 = LT;
  232+                cb2 = GT;
  233+                break;
  234+        
  235+        default:
  236+                cb1 = cb2 = 0; /* XXX gcc */
  237+        }
  238+        if (p->n_op >= ULE)
  239+                cb1 += 4, cb2 += 4;
  240+        expand(p, 0, "  cmpl UR,UL\n");
  241+        if (cb1) cbgen(cb1, s);
  242+        if (cb2) cbgen(cb2, e);
  243+        expand(p, 0, "  cmpl AL,AR\n");
  244+        cbgen(u, e);
  245+        deflab(s);
  246+}
  247+
  248+
195249 void
 196250 zzzcode( p, c ) register NODE *p; {
 197251         int m;
     
 !
276330                 return;
 277331                 }
 278332 
<> 333+        case 'B': /* long long compare */
  334+                twollcomp(p);
  335+                break;
  336+
279337         case 'C':       /* num words pushed on arg stack */
 280338                 printf("$%d", p->n_qual);
 281339                 break;
     
 !
555613         return( p->n_op==NAME || p->n_op ==ICON || p->n_op == OREG || (p->n_op==UMUL && shumul(p->n_left, STARNM|SOREG)) );
 556614         }
 557615 
<> 616+/*
  617+ * Shape matches for UMUL.  Cooperates with offstar().
  618+ */
558619 int
<> 620+shumul(NODE *p, int shape)
  621+{
  622+
  623+        if (x2debug)
  624+                printf("shumul(%p)\n", p);
  625+
  626+        /* Turns currently anything into OREG on vax */
  627+        if (shape & SOREG)
  628+                return SROREG;
  629+        return SRNOPE;
  630+}
  631+
  632+
  633+#ifdef notdef
  634+int
559635 shumul( p, shape ) register NODE *p; int shape; {
 560636         register int o;
 561637         extern int xdebug;
     
 !
571647                 if (shape & STARNM)
 572648                         return SRDIR;
 573649 
<>574 -#ifdef notyet
575650         if( ( o == INCR || o == ASG MINUS ) &&
 576651             ( p->n_left->n_op == REG && p->n_right->n_op == ICON ) &&
 577652             p->n_right->n_name[0] == '\0' )
     
 !
609684                         }
 610685                 return( p->n_right->n_lval == o ? STARREG : 0);
 611686                 }
<>612 -#endif
613687 
 614688         return( SRNOPE );
 615689         }
<> 690+#endif
616691 
 617692 void
 618693 adrcon( val ) CONSZ val; {
     
 !
643718         cerror( "insput" );
 644719         }
 645720 
<> 721+/*
  722+ * Write out the upper address, like the upper register of a 2-register
  723+ * reference, or the next memory location.
  724+ */
646725 void
<>647 -upput( p , size) register NODE *p; {
 648 -        cerror( "upput" );
  726+upput(NODE *p, int size)
  727+{
  728+
  729+        size /= SZCHAR;
  730+        switch (p->n_op) {
  731+        case REG:
  732+                fprintf(stdout, "%s", rnames[regno(p)-16+1]);
  733+                break;
  734+
  735+        case NAME:
  736+        case OREG:
  737+                p->n_lval += size;
  738+                adrput(stdout, p);
  739+                p->n_lval -= size;
  740+                break;
  741+        case ICON:
  742+                fprintf(stdout, "$" CONFMT, p->n_lval >> 32);
  743+                break;
  744+        default:
  745+                comperr("upput bad op %d size %d", p->n_op, size);
649746         }
<> 747+}
<_650748 
 651749 void
 652750 adrput(FILE *fp, NODE *p)
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-11-01 07:09 +0100