Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.272
 
1.273
 
MAIN:ragge:20110529131906
 
reader.c
_>117117 
 118118         if (p->n_op > MAXOP)
 119119                 cerror("%p) op %d slipped through", p, p->n_op);
<> 120+#ifndef FIELDOPS
  121+        if (p->n_op == FLD)
  122+                cerror("%p) FLD slipped through", p);
  123+#endif
120124         if (BTYPE(p->n_type) > MAXTYPES)
 121125                 cerror("%p) type %x slipped through", p, p->n_type);
 122126         if (p->n_op == CBRANCH) {
     
 !
11151119 }
 11161120 #endif
 11171121 
<>1118 -#ifndef FIELDOPS
11191122 /*
<>1120 - * do this if there is no special hardware support for fields
 1121 - */
 1122 -static void
 1123 -ffld(NODE *p, int down, int *down1, int *down2 )
 1124 -{
 1125 -        /*
 1126 -         * look for fields that are not in an lvalue context,
 1127 -         * and rewrite them...
 1128 -         */
 1129 -        NODE *shp;
 1130 -        int s, o, v, ty;
 1131 -
 1132 -        *down1asgop( p->n_op );
 1133 -        *down2 = 0;
 1134 -
 1135 -        if( !down && p->n_op == FLD ){ /* rewrite the node */
 1136 -
 1137 -                if( !rewfld(p) ) return;
 1138 -
 1139 -                ty = p->n_type;
 1140 -                v = p->n_rval;
 1141 -                s = UPKFSZ(v);
 1142 -# ifdef RTOLBYTES
 1143 -                o = UPKFOFF(v);  /* amount to shift */
 1144 -# else
 1145 -                o = szty(p->n_type)*SZINT - s - UPKFOFF(v);  /* amount to shift */
 1146 -#endif
 1147 -                /* make & mask part */
 1148 -
 1149 -                if (ISUNSIGNED(ty)) {
 1150 -
 1151 -                        p->n_left->n_type = ty;
 1152 -                        p->n_op = AND;
 1153 -                        p->n_right = mklnode(ICON, ((CONSZ)1 << s)-1, 0, ty);
 1154 -
 1155 -                        /* now, if a shift is needed, do it */
 1156 -                        if( o != 0 ){
 1157 -                                shp = mkbinode(RS, p->n_left,
 1158 -                                    mklnode(ICON, o, 0, INT), ty);
 1159 -                                p->n_left = shp;
 1160 -                                /* whew! */
 1161 -                        }
 1162 -                } else {
 1163 -                        int mz;
 1164 -
 1165 -                        mz = 0;
 1166 -#define SZT(x) case x: mz = SZ ## x; break;
 1167 -                        switch (ty) {
 1168 -                        SZT(CHAR) SZT(SHORT) SZT(INT) SZT(LONG)
 1169 -                        SZT(LONGLONG)
 1170 -                        }
 1171 -                        /* must sign-extend, assume RS will do */
 1172 -                        /* if not, arch must use rewfld() */
 1173 -                        p->n_left->n_type = ty;
 1174 -                        p->n_op = RS;
 1175 -                        p->n_right = mklnode(ICON, mz-s, 0, INT);
 1176 -                        p->n_left = mkbinode(LS, p->n_left,
 1177 -                            mklnode(ICON, mz-s-o, 0, INT), ty);
 1178 -                }
 1179 -        }
 1180 -}
 1181 -#endif
 1182 -
 1183 -/*
11841123  * change left TEMPs into OREGs
 11851124  */
 11861125 void
     
 !
13481287 
 13491288         walkf(p, setleft, 0);   /* ptrs at left node for arithmetic */
 13501289         walkf(p, oreg2, 0);     /* look for and create OREG nodes */
<>1351 -#ifndef FIELDOPS
 1352 -        fwalk(p, ffld, 0);      /* look for field operators */
 1353 -# endif
13541290         mycanon(p);             /* your own canonicalization routine(s) */
 13551291 
 13561292 }
     
 !
13941330 #ifndef BACKTEMP
 13951331         int t;
 13961332 
<>1397 -        if (k > 1)
  1333+        if (k > 1) {
13981334                 SETOFF(p2autooff, ALDOUBLE/ALCHAR);
<> 1335+        } else {
  1336+                SETOFF(p2autooff, ALINT/ALCHAR);
  1337+        }
13991338 
 14001339         t = p2autooff;
 14011340         p2autooff += k*(SZINT/SZCHAR);
     
 !
14051344 
 14061345 #else
 14071346         p2autooff += k*(SZINT/SZCHAR);
<>1408 -        if (k > 1)
  1347+        if (k > 1) {
14091348                 SETOFF(p2autooff, ALDOUBLE/ALCHAR);
<> 1349+        } else {
  1350+                SETOFF(p2autooff, ALINT/ALCHAR);
  1351+        }
<_14101352 
 14111353         if (p2autooff > p2maxautooff)
 14121354                 p2maxautooff = p2autooff;
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-07-10 19:21 +0200