Quick Search:

Mode

Context

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

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.237
 
1.238
 
MAIN:ragge:20140607140204
 
regs.c
     
 !
_> 301+#if 0
  302+        /* XXX - need something more clever when large left trees */
     
 !
<> 306+#endif
     
 !
<> 2459+/*
  2460+ * Check if this node is just something directly addressable.
  2461+ * XXX - should use target canaddr() when we knows that it is OK
  2462+ * for all targets. Can currently be a little too optimistic.
  2463+ */
  2464+static int
  2465+regcanaddr(NODE *p)
  2466+{
  2467+        int o = p->n_op;
  2468+
  2469+        if (o==NAME || o==ICON || o==OREG )
  2470+                return 1;
  2471+        if (o == UMUL) {
  2472+                if (p->n_left->n_op == REG)
  2473+                        return 1;
  2474+                if ((p->n_left->n_op == PLUS || p->n_left->n_op == MINUS) &&
  2475+                    p->n_left->n_left->n_op == REG &&
  2476+                    p->n_left->n_right->n_op == ICON)
  2477+                        return 1;
  2478+        }
  2479+        return 0;
  2480+}
  2481+
     
 !
<>2474 -                /* XXX - use canaddr() */
 2475 -                if (p->n_op == OREG || p->n_op == NAME) {
  2500+                if (regcanaddr(p)) {
     
 !
<> 2517+                 * Be careful not to store a node that do not involve
  2518+                 * any evaluation (meaningless).
     
 !
<>2495 -                    (q->rewrite & RLEFT && (p->n_su & DORIGHT) == 0)) {
  2522+                    (q->rewrite & RLEFT && (p->n_su & DORIGHT) == 0) &&
  2523+                    regcanaddr(p->n_left) == 0) {
     
 !
<_2500 -                    (q->rewrite & RRIGHT && (p->n_su & DORIGHT) != 0)) {
  2528+                    (q->rewrite & RRIGHT && (p->n_su & DORIGHT) != 0) &&
  2529+                    regcanaddr(p->n_right) == 0) {
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-10-31 05:54 +0100