allo.c
Files allo.c and /u/nbc/nbccom/allo.c are identical
atof.c
Files atof.c and /u/nbc/nbccom/atof.c are identical
caloff.h
Files caloff.h and /u/nbc/nbccom/caloff.h are identical
cgram.y
Files cgram.y and /u/nbc/nbccom/cgram.y are identical
code.c
Files code.c and /u/nbc/nbccom/code.c are identical
comm1.c
Files comm1.c and /u/nbc/nbccom/comm1.c are identical
comm2.c
Files comm2.c and /u/nbc/nbccom/comm2.c are identical
common.h
Files common.h and /u/nbc/nbccom/common.h are identical
error.h
Files error.h and /u/nbc/nbccom/error.h are identical
fixcall.c
Files fixcall.c and /u/nbc/nbccom/fixcall.c are identical
limits.h
Files limits.h and /u/nbc/nbccom/limits.h are identical
local.c
Files local.c and /u/nbc/nbccom/local.c are identical
local2.c
654a655
>                 int         xr=0;
656d656
<                 char        *a1, *a2, *ar, *al, *alhs;
658d657
<                 int         scratchreg;
660,662c659
<                 NODE        tempnode, tempnodelt, tempnodert;
<                 NODE        saver0node;
<                 int         left_is_name;       /* boolean */
---
>                 NODE        tempnode;
762,789c759
<                 if(size > 128) {
<                     /*
<                      *  AL is left side 
<                      *  AR is right side (register)
<                      *  A1 is temp register, points to lhs during loop
<                                 OR
<                      *  A2 is temp register, points to lhs during loop
<                      *
<                      *  ar, al, a1 are hand-coded versions of AR, AL, A1,
<                      *  to be used when not practical to call expand().
<                      */
<                     
<                     if(allo(p, psuedocook)) {
< 
<                     if (busy[R0]) {
<                         /* allocate temp space on stack */
<                         saver0node.in.op = OREG;
<                         saver0node.in.type = INT;
<                         saver0node.in.name = "";
<                         saver0node.tn.rval = TMPREG;
<                         saver0node.tn.lval = BITOOR(freetemp(1)); /* 1 word */
< #ifdef MPX
<                         printf("\tstw   r%d,",R0);
< #else
<                         printf("\tmovw  r%d,",R0);
< #endif /* MPX */
<                         adrput(&saver0node);    
<                     }
---
>                 if ((size/inc) > 4) {
791,798c761,766
<                     a1 = rnames[resc[0].tn.rval];
<                     a2 = rnames[resc[1].tn.rval];
<                     ar = rnames[p->in.right->tn.rval];
<                     al = rnames[p->in.left->tn.rval];  /* Just use reg nbr */
<                     /* Save the register value if the right operand   *
<                      * is a register variable (R7-R4), and restore    *
<                      * upon completing the structure assignment.      *
<                      * This problem affected the port of INGRES to NP */
---
>                 /* need to transfer structure address that is in
>                  * a reg variable made into an OREG to x1 or x2 so
>                  * we can move the structure.  I can't seem to make
>                  * local or trees not optimize away the UNARY MUL
>                  * required to transfer the reg variable to an SAREG. 
>                  */
800,816c768,776
<                     if (p->in.left->tn.rval == R7 ||
<                         p->in.left->tn.rval == R6 ||
<                         p->in.left->tn.rval == R5 ||
<                         p->in.left->tn.rval == R4) {
<                         /* allocate temp space on stack */
<                         tempnodelt.in.op = OREG;
<                         tempnodelt.in.type = INT;
<                         tempnodelt.in.name = "";
<                         tempnodelt.tn.rval = TMPREG;
<                         tempnodelt.tn.lval = BITOOR(freetemp(1)); /* 1 word */
< #ifdef MPX
<                         printf("\tstw   %s,",al);
< #else
<                         printf("\tmovw  %s,",al);
< #endif /* MPX */
<                         adrput(&tempnodelt);    
<                     }
---
> #ifdef JUNK
> printf ("rt found op %s\n", opst[r->in.op]);
> printf ("rt reg = %d\n", r->tn.rval);
> printf ("lf found op %s\n", opst[l->in.op]);
> printf ("dr reg = %d\n", dr);
> if (busy[R0])printf("R0 busy\n");
> if (busy[R1])printf("R1 busy\n");
> if (busy[R2])printf("R2 busy\n");
> #endif
818,833c778,790
<                     if (p->in.right->tn.rval == R7 ||
<                         p->in.right->tn.rval == R6 ||
<                         p->in.right->tn.rval == R5 ||
<                         p->in.right->tn.rval == R4) {
<                         /* allocate temp space on stack */
<                         tempnodert.in.op = OREG;
<                         tempnodert.in.type = INT;
<                         tempnodert.in.name = "";
<                         tempnodert.tn.rval = TMPREG;
<                         tempnodert.tn.lval = BITOOR(freetemp(1)); /* 1 word */
< #ifdef MPX
<                         printf("\n\tstw\t%s,",ar);
< #else
<                         printf("\n\tmovw        %s,",ar);
< #endif /* MPX */
<                         adrput(&tempnodert);    
---
>                 if (r->in.op==OREG && (r->tn.rval >= R4 && r->tn.rval <= R7)) {
>                     sr = r->tn.rval;
>                     if (!busy[R1]) dr = R1;
>                     else if (!busy[R2]) dr = R2;
>                     else cerror ("Index reg not available for struct move"); 
>                     expand(r, FOREFF|INAREG, "\ttrr\t");
>                     printf("r%d,r%d\n", sr, dr); 
>                     r->tn.rval = dr;
>                 } else if ((l->in.op == NAME) || (isfakereg (l->tn.rval) &&
>                     (l->in.op == OREG))) {
>                     if (!busy[R1]) dr = R1;
>                     else if (!busy[R2]) dr = R2;
>                     else cerror ("Index reg not available for struct move"); 
836,837c793
<                     scratchreg = resc[0].tn.rval;
< 
---
>                 if (busy[R4]) {         /* use R4 for bib reg */
845,860c801,804
<                     left_is_name = (p->in.left->in.op == NAME);
< 
<                     if(scratchreg == R0) {
<                         alhs = a2;      /* use second reg to index lhs */
<                         if(isfakereg(p->in.left->tn.rval) || 
<                            left_is_name || p->in.left->in.op == OREG) {
< #ifdef MPX
<                            printf("\n\tla       %s,", a2);
<                         } else {
<                            printf("\n\tlw       %s,", a2);
<                         }
<                         adrput(p->in.left);
< #else
<                            printf("\n\tmovea    ");
<                         } else {
<                            printf("\n\tmovw     ");
---
>                     /* save bib register */
>                     printf("\tstw\tr4,");
>                     adrput(&tempnode);  
>                     printf("\n");
862,865d805
<                         adrput(p->in.left); printf(",%s", a2);
< #endif /* MPX */
<                     } else
<                         alhs = a1;      /* use scratch reg to index lhs */
867,870c807,808
<                     if(isfakereg(p->in.left->tn.rval) || 
<                         left_is_name || p->in.left->in.op == OREG) {
< #ifdef MPX
<                            printf("\n\tla       %s,",a1);
---
>                 if ((size & 3) == 0) {
>                     printf("\tli\tr4,%dw\n", size/(SZINT/SZCHAR));
872c810
<                            printf("\n\tlw       %s,",a1);
---
>                     printf("\tli\tr4,%d\n", size);
874,876c812,835
<                     adrput(p->in.left); printf("\n", a1);
< #else
<                         printf("\n\tmovea       ");
---
> 
>                 r->tn.lval = size-inc;
> 
>                 if (l->in.op == NAME) {
>                     l->tn.lval = size-inc;
>                     if (dr == 1) {
>                         xr = 1;
>                         printf ("\tla\tr1,");
>                     } else if (dr == 2) {
>                         xr = 2;
>                         printf ("\tla\tr2,");
>                     } else
>                          cerror ("Unavailable reg for struct move, reg = %d", dr); 
>                     expand(l, FOREFF, "AL\n");
>                 } else if ((isfakereg (l->tn.rval) && (l->in.op == OREG))) {
>                     if (dr == 1) {
>                         xr = 1;
>                         printf ("\tla\tr1,");
>                     } else if (dr == 2) {
>                         xr = 2;
>                         printf ("\tla\tr2,");
>                     } else
>                          cerror ("Unavailable reg for struct move, reg = %d", dr); 
>                     expand(l, FOREFF, "AL\n");
878c837,838
<                         printf("\n\tmovw        ");
---
>                 if (l->in.op != NAME && l->in.op != OREG)
> cerror ("left op NOT NAME OR OREG, found op %s\n", opst[l->in.op]);
880,888d839
<                     adrput(p->in.left); printf(",%s\n", a1);
< #endif /* MPX */
< #ifdef MPX
<                     printf("\tstw       %s,", a1); adrput(&tempnode);  
<                     
<                     printf("\n  lw      %s,=%d\n", a1, size - inc);
< 
<                     printf("\tadr\t%s,%s\n",a1,alhs);
<                     printf("\tadr\t%s,%s\n",a1,ar);
889a841
>                 l->tn.lval = size-inc;
892,899d843
<                     printf("\tl%c       r0,0%c,%s\n", ilchar, ilchar, ar);
<                     printf("\tst%c      r0,0%c,%s\n", ilchar, ilchar, alhs);
<                     printf("\tsumw      %s,#%d\n", alhs, inc);
<                     printf("\tsumw      %s,#%d\n", ar, inc);
< #else
<                     printf("\tmovw      %s,", a1); adrput(&tempnode);  
<                     
<                     printf("\n\tmovw    #%d,%s\n", size - inc, a1);
901,902c845,847
<                     printf("\taddw\t%s,%s\n",a1,alhs);
<                     printf("\taddw\t%s,%s\n",a1,ar);
---
>                 expand(p, FOREFF, "\tlZP\tr0,");
>                 expand(r, FOREFF, "AR\n");
>                 expand(p, FOREFF, "\tstZP\tr0,");
904,923c849,862
<                     looplab = getlab();
<                     printf("L%d:\n", looplab);
<                     printf("\tmov%c     [%s],r0,[%s]\n", ilchar, ar, alhs);
<                     printf("\tsubw      #%d,%s\n", inc, alhs);
<                     printf("\tsubw      #%d,%s\n", inc, ar);
< #endif /* MPX */
<                     if(scratchreg == R0
<                         || isfakereg(p->in.left->tn.rval) || left_is_name ) {
< #ifdef MPX
<                         printf("\tlw    r%s,",al);
<                         adrput(&tempnodert);    
<                         printf("\n");
<                     } else {
<                         printf("\tcar   %s,%s\n", al, alhs);
<                     }
<                     printf("\tblt       L%d\n", looplab);
< #else
<                         printf("\tcmpw  ");
<                         adrput(&tempnode);
<                         printf(",%s\n", alhs);
---
>                 if (l->in.op == NAME) {
>                     if (((size-inc) & 3) == 0)
>                         printf("0w,r%d\n", xr);
>                     else
>                         printf("0,%d\n", xr);
>                     printf("\tsui\tr%d,%x\n", r->tn.rval, inc);
>                     printf("\tsui\tr%d,%x\n", xr, inc);
>                 } else if ((isfakereg (l->tn.rval) && (l->in.op == OREG))) {
>                     if (((size-inc) & 3) == 0)
>                         printf("%dw,r%d\n", (size-inc)/(SZINT/SZCHAR), xr);
>                     else
>                         printf("%d,%d\n", (size-inc), xr);
>                     printf("\tsui\tr%d,%x\n", r->tn.rval, inc);
>                     printf("\tsui\tr%d,%x\n", xr, inc);
925,942c864,866
<                         printf("\tcmpw  %s,%s\n", al, alhs);
<                     }
<                     printf("\tjge       L%d\n", looplab);
< #endif /* MPX */
< 
<                     if (p->in.left->tn.rval == R7 ||
<                         p->in.left->tn.rval == R6 ||
<                         p->in.left->tn.rval == R5 ||
<                         p->in.left->tn.rval == R4) {
< #ifdef MPX
<                         printf("\tlw    r%s,",al);
<                         adrput(&tempnodert);    
<                         printf("\n");
< #else
<                         printf("\tmovw  ");
<                         adrput(&tempnodelt);    
<                         printf(",%s\n",al);
< #endif /* MPX */
---
>                     expand(l, FOREFF, "AL\n");
>                     printf("\tsui\tr%d,%x\n", r->tn.rval, inc);
>                     printf("\tsui\tr%d,%x\n", l->tn.rval, inc);
943a868
>                 printf("\tbi%c\tr4,L%d\n", ilchar, looplab);
945,951c870,873
<                     if (p->in.right->tn.rval == R7 ||
<                         p->in.right->tn.rval == R6 ||
<                         p->in.right->tn.rval == R5 ||
<                         p->in.right->tn.rval == R4) {
< #ifdef MPX
<                         printf("\tlw    r%s,",ar);
<                         adrput(&tempnodert);    
---
>                 if (busy[R4]) {
>                     /* restore bib reg */
>                     printf("\tlw\tr%d,",sr);
>                     adrput(&tempnode);  
953,957d874
< #else
<                         printf("\tmovw  ");
<                         adrput(&tempnodert);    
<                         printf(",%s\n",ar);
< #endif
960,970c877,878
<                     if (busy[R0]) {
< #ifdef MPX
<                         printf("\tstw   r%d,",R0);      /* FEB17 was lw */
<                         adrput(&saver0node);    
<                         printf("\n");
< #else
<                         printf("\tmovw  ");
<                         adrput(&saver0node);    
<                         printf(",r%d\n",R0);
< #endif
<                     }
---
>                 if(sr)
>                     r->tn.rval = sr;
974d881
<                     }
977d883
< 
984d889
< #ifdef UAS
986,988d890
< #else
<                     expand(r, FOREFF, " movb    AR,r0,");
< #endif
992d893
< #ifdef MPX
1015d915
< #endif
1020c920
< #ifdef UAS
---
> 
1024,1027d923
< #else
<                     expand(p, FOREFF, " movZP");
<                     expand(r, FOREFF, " AR,r0,");
< #endif
1030c926
< #ifdef MPX
---
>  
1033d928
< #endif
1053,1061d947
< #ifdef JUNK
< if (p->in.op == INCR)printf("short INCR op found\n");
< else printf("short INCR op not found\n");
< if (p->in.left->in.op == REG )printf("short left REG op found\n");
< else printf("short left REG op not found\n");
< if (p->in.op == OR)printf("short INCR op found\n");
< else printf("short OR op not found\n");
< printf ("doing Zn short\n");
< #endif
1068,1076d953
< #ifdef JUNK
< if (p->in.op == INCR)printf("char INCR op found\n");
< else printf("char INCR op not found\n");
< if (p->in.left->in.op == REG )printf("char left REG op found\n");
< else printf("char left REG op not found\n");
< if (p->in.op == OR)printf("char INCR op found\n");
< else printf("char OR op not found\n");
< printf ("doing Zn char\n");
< #endif
1088a966
> #ifdef NOT_FOR_NOW
1119a998
> #endif /* NOT_FOR_NOW */
mac2defs.h
Files mac2defs.h and /u/nbc/nbccom/mac2defs.h are identical
macdefs.h
Files macdefs.h and /u/nbc/nbccom/macdefs.h are identical
manifest.h
197a198
> #ifndef JCB073091_JUNK
200a202,205
> #else
> #define TNULL 0         /* JCB NEW */
> #define TVOID FTN       /* function returning UNDEF (for void) */
> #endif
215a221,224
> #ifdef JCB073091_JUNK
> #define VOID 16
> #define UNDEF 17
> #endif
match.c
307a308,312
> #ifdef JCB073091_JUNK
>         case VOID:
>             return(tword & TVOID);
> #endif
> 
mfile1.h
Files mfile1.h and /u/nbc/nbccom/mfile1.h are identical
mfile2.h
146a147,149
> #ifdef JCB073091_JUNK
> #define TVOID   040000  /* JCB New */
> #endif
opdesc.h
Files opdesc.h and /u/nbc/nbccom/opdesc.h are identical
optim.c
Files optim.c and /u/nbc/nbccom/optim.c are identical
order.c
Files order.c and /u/nbc/nbccom/order.c are identical
pftn.c
2500c2500
<                 uerror("%s undefined", p -> sname);
---
>                 uerror("%s undefined_pftn", p -> sname); /* VOID 07/29/91 JCB */
print.h
Files print.h and /u/nbc/nbccom/print.h are identical
reader.c
Files reader.c and /u/nbc/nbccom/reader.c are identical
scan.c
Files scan.c and /u/nbc/nbccom/scan.c are identical
stab.c
Files stab.c and /u/nbc/nbccom/stab.c are identical
switch.c
Files switch.c and /u/nbc/nbccom/switch.c are identical
table.c
286c286,287
<         "       zr      A1\n    zr      U1\n    ormw    U1,AL\n",
---
> /* JCB 07/29/91 changed ormw to ormh */
>         "       zr      A1\n    zr      U1\n    ormh    U1,AL\n",
treemgr.h
Files treemgr.h and /u/nbc/nbccom/treemgr.h are identical
trees.c
211a212,234
> #ifdef JCB073091_JUNK
>         /* patch up enum casts here instead of mucking through cgram */
>         if ( o==CAST && BTYPE( p->in.left->in.type) == ENUMTY ) 
>                 econvert(p->in.left);
> 
>         /* check for VOID type in unfortunate places */
> 
>         switch( o ) {
>         case CM:                        /* handled better by OTHER case */
>         case COMOP:
>         case QUEST:
>         case COLON:
>         case CAST:
>             break;                      /* let parent handle these */
> 
>         default:
>             if (   (optype(o) != LTYPE && l->in.type == VOID)
>                 || (optype(o) == BITYPE && r->in.type == VOID)
>                 )
>                 uerror("void type illegal in expression, op %s", opst[o]);
>         }
> #endif
> 
276c299,305
<                     uerror("%s undefined", sp -> sname);
---
> #ifdef JUNK
>                     printf("buildtree(1): p->tn.lval=%d\n", p->tn.lval);
>                     fwalk(p, eprint, 0);
>                     if(p->tn.rval > 0)
>                         prstab(p->tn.rval);
> #endif
>                     uerror("%s undefined", sp->sname); /* VOID 07/29/91 JCB */
600a630
> #ifndef JCB073091_JUNK
604a635,643
> #else
>                         /* structure or void colon */
> 
>                         if( l->in.type == VOID) /* both sides are void */
>                             p->in.type = VOID;  /* force type of COLON */
>                         else if( l->fn.csiz != r->fn.csiz )
>                                 uerror( "type clash in conditional" );
>                         break;
> #endif
607a647
> #ifndef JCB073091_JUNK
608a649,661
> #else
>                     {
>                         NODE * temp;
> 
>                         p->in.right = r = strargs( p->in.right);
>                         /* check first argument for VOID-ness; others tested by , */
>                         temp = r;
>                         if (temp->in.op == CM)
>                             temp = temp->in.left;
>                         if (temp->in.type == VOID || temp->in.type == UNDEF)
>                             uerror("void type illegal as argument");
>                     }
> #endif
633a687,744
> #ifdef JCB073091_JUNK
>                 case ANDAND :
>                 case OROR :
>                         /* change array or function operand to pointer constant */
>                         if ( ISARY( r->in.type) )
>                         {
>                                 r->in.type = DECREF( r->in.type );
>                                 ++r->fn.cdim;
>                                 p->in.right =  buildtree( UNARY AND, r, NIL );
>                         }
>                         else if ( ISFTN( r->in.type) )
>                                 p->in.right = buildtree( UNARY AND, r, NIL );
>                 case CBRANCH :
>                 case NOT :
>                         /* change array or function operand to pointer constant */
>                         if ( ISARY( l->in.type) )
>                         {
>                                 l->in.type = DECREF( l->in.type );
>                                 ++l->fn.cdim;
>                                 p->in.left =  buildtree( UNARY AND, l, NIL );
>                         }
>                         else if ( ISFTN( l->in.type) )
>                                 p->in.left = buildtree( UNARY AND, l, NIL );
>                         else if (! isscalar( l ))
>                                 uerror("scalar required in conditional context");
> 
>                         break;
> 
>                 case INCR:
>                 case DECR:
>                         /* The only thing we care about here is fixing up the
>                         ** types on INCR and DECR of type float.  Normally they
>                         ** get built as (++[f] (CONV[d] obj[f]) FCON[d]).
>                         ** Make the type of the ++/-- into [d] (since its operands
>                         ** are) and put conversion above.
>                         */
>                         if (p->in.type == FLOAT) {
>                             p->in.type = DOUBLE;
>                             p->fn.csiz = DOUBLE;
>                             p->fn.cdim = 0;
>                             p = makety(p, FLOAT, 0, FLOAT);
>                         }
>                 case ASG PLUS:
>                 case ASG MINUS:
>                         break;
>                 case CM:                        /* must have a value */
>                         if (l->in.type == VOID || l->in.type == UNDEF
>                             || r->in.type == VOID || r->in.type == UNDEF )
>                                 uerror("void type illegal as argument");
>                         break;
> 
>                 case QUEST:                     /* must have scalar on left */
>                         if (! isscalar( l ))
>                                 uerror("scalar required in conditional context");
>                         break;
> 
> #endif
> 
1768a1880
> #ifndef JCB073091
1792a1905,1911
> #else
>         else if (mt12 == 0) break;
>         else if (mt1 & MPTR)
>             return(LVAL + PTMATCH + PUN);
>         else if (mt12 & MPTI)
>             return(TYPL + LVAL + TYMATCH + PUN);
> #endif
1862a1982
> #ifndef JCB073091_JUNK
1863a1984,1986
> #else
>         case VOID:
> #endif
2068a2192,2209
> 
> #ifdef JCB073091_JUNK
> int                     /* return 1 if type of node is a scalar */
> isscalar( p )
> NODE * p;
> {
>     switch( p->in.type) {
>     case CHAR:  case UCHAR:
>     case SHORT: case USHORT:
>     case INT:   case UNSIGNED:
>     case LONG:  case ULONG:
>     case FLOAT: case DOUBLE:
>     case ENUMTY:
>         return( 1 );
>     }
>     return( ISPTR( p->in.type ));
> }
> #endif
treewalk.h
Files treewalk.h and /u/nbc/nbccom/treewalk.h are identical
udiv.S
urem.S
version.c
1c1
< char version[] = "@(#)Encore/J B Systems Non-Base C Compiler - Mon Feb 18 11:05:29 MST 1991";
---
> char version[] = "@(#)J B Systems Non-Base C Compiler - Mon Jul 29 15:15:00 MDT 1991";
xdefs.c
Files xdefs.c and /u/nbc/nbccom/xdefs.c are identical
