OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_47/] [or1ksim/] [cuc/] [insn.c] - Diff between revs 1047 and 1059

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 1047 Rev 1059
Line 649... Line 649...
        }
        }
        f->INSN(ref) = cmov;
        f->INSN(ref) = cmov;
        f->INSN(ref2) = tmp;
        f->INSN(ref2) = tmp;
        if (cuc_debug >= 6) print_cuc_bb (f, "BBB");
        if (cuc_debug >= 6) print_cuc_bb (f, "BBB");
        cuc_check (f);
        cuc_check (f);
 
        return 1;
      }
      }
    }
    }
  }
  }
  return 0;
  return 0;
}
}
Line 755... Line 756...
          /* Is this just a move? */
          /* Is this just a move? */
          if (ii->index == II_ADD
          if (ii->index == II_ADD
           && !(ii->type & IT_MEMADD) && ii->op[2] == 0) {
           && !(ii->type & IT_MEMADD) && ii->op[2] == 0) {
            int b1, i1, j1;
            int b1, i1, j1;
            cucdebug (2, "%8x:link      %8x: ", REF(b, i), ii->op[1]);
            cucdebug (2, "%8x:link      %8x: ", REF(b, i), ii->op[1]);
 
            if (!(prev->type & (IT_OUTPUT | IT_VOLATILE))) {
 
              assert (ii->opt[0] & OPT_DEST);
 
              prev->op[0] = ii->op[0]; prev->opt[0] = ii->opt[0];
 
              prev->type |= ii->type & IT_OUTPUT;
            for (b1 = 0; b1 < f->num_bb; b1++) if (!(f->bb[b1].type & BB_DEAD))
            for (b1 = 0; b1 < f->num_bb; b1++) if (!(f->bb[b1].type & BB_DEAD))
              for (i1 = 0; i1 < f->bb[b1].ninsn; i1++)
              for (i1 = 0; i1 < f->bb[b1].ninsn; i1++)
                for (j1 = 0; j1 < MAX_OPERANDS; j1++)
                for (j1 = 0; j1 < MAX_OPERANDS; j1++)
                  if ((f->bb[b1].insn[i1].opt[j1] & OPT_REF)
                  if ((f->bb[b1].insn[i1].opt[j1] & OPT_REF)
                   && f->bb[b1].insn[i1].op[j1] == REF(b, i)) {
                   && f->bb[b1].insn[i1].op[j1] == REF(b, i)) {
                    cucdebug (2, "%x ", REF (b1, i1));
                    cucdebug (2, "%x ", REF (b1, i1));
                    f->bb[b1].insn[i1].op[j1] = ii->op[1];
                    f->bb[b1].insn[i1].op[j1] = ii->op[1];
                  }
                  }
            cucdebug (2, "\n");
            cucdebug (2, "\n");
            change_insn_type (ii, II_NOP);
            change_insn_type (ii, II_NOP);
 
            }
          } else if (prev->opt[2] & OPT_CONST) {
          } else if (prev->opt[2] & OPT_CONST) {
            /* Handle some common cases */
            /* Handle some common cases */
            /* add - add joining */
            /* add - add joining */
            if (ii->index == II_ADD && prev->index == II_ADD) {
            if (ii->index == II_ADD && prev->index == II_ADD) {
              ii->op[1] = prev->op[1]; ii->opt[1] = prev->opt[1];
              ii->op[1] = prev->op[1]; ii->opt[1] = prev->opt[1];

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.