Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.335
 
1.336
 
MAIN:ragge:20140814082538
 
trees.c
_>26032603                 if (!ISUNSIGNED(p->n_type)) {
 26042604                         /* Correct value in case of signed bitfield.  */
 26052605                         t = p->n_type;
<>2606 -                        if (p->n_type == LONGLONG)
  2606+                        if (t == LONGLONG)
26072607                                 fsz = SZLONGLONG - fsz;
<>2608 -                        else if (p->n_type == LONG)
  2608+                        else if (t == LONG)
26092609                                 fsz = SZLONG - fsz;
 26102610                         else
 26112611                                 fsz = SZINT - fsz;
 26122612                         p = buildtree(LS, p, bcon(fsz));
 26132613 #ifdef RS_DIVIDES
 26142614                         p = buildtree(RS, p, bcon(fsz));
 26152615 #else
<>2616 -                        fsz = (1 << fsz);
 2617 -                        p = buildtree(DIV, p, bcon(fsz));
  2616+                        {
  2617+                                CONSZ dval;
  2618+                                int d2 = 0;
  2619+                                /* avoid wrong sign if divisor gets negative */
  2620+                                if ((t == LONGLONG && fsz == SZLONGLONG-1) ||
  2621+                                    (t == LONG && fsz == SZLONG-1) ||
  2622+                                    (t == INT && fsz == SZINT-1))
  2623+                                        d2 = 1;
  2624+                                dval = (1LL << fsz);
  2625+                                p = buildtree(DIV, p, xbcon(dval, 0, t));
  2626+                                if (d2)
  2627+                                        p = buildtree(UMINUS, p, NIL);
  2628+                        }
<_26182629 #endif
 26192630                 }
 26202631         }
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-18 22:41 +0100