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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_52/] [or1ksim/] [cuc/] [load.c] - Diff between revs 1060 and 1061

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

Rev 1060 Rev 1061
Line 232... Line 232...
  for (i = 0; i < num_insn; i++) if (insn[i].type & IT_BRANCH) num_bra++;
  for (i = 0; i < num_insn; i++) if (insn[i].type & IT_BRANCH) num_bra++;
 
 
  d = num_insn + num_bra;
  d = num_insn + num_bra;
  assert (d < MAX_INSNS);
  assert (d < MAX_INSNS);
 
 
  /* Split memory commands */
  /* Add nop before branch */
  for (i = num_insn - 1; i >= 0; i--) if (insn[i].type & IT_BRANCH) {
  for (i = num_insn - 1; i >= 0; i--) if (insn[i].type & IT_BRANCH) {
    insn[--d] = insn[i];
    insn[--d] = insn[i];
    insn[--d] = insn[i];
    insn[--d] = insn[i];
    reloc[i] = d;
    reloc[i] = d;
    change_insn_type (&insn[d], II_NOP);
    change_insn_type (&insn[d], II_NOP);
Line 271... Line 271...
    case II_SB:
    case II_SB:
              insn[d + 1].op[1] = d; insn[d + 1].opt[1] = OPT_REF; /* sw rx,(t($-1)) */
              insn[d + 1].op[1] = d; insn[d + 1].opt[1] = OPT_REF; /* sw rx,(t($-1)) */
              insn[d + 1].op[0] = insn[i].op[2]; insn[d + 1].opt[0] = insn[d + 1].opt[2];
              insn[d + 1].op[0] = insn[i].op[2]; insn[d + 1].opt[0] = insn[d + 1].opt[2];
              insn[d + 1].opt[2] = OPT_NONE;
              insn[d + 1].opt[2] = OPT_NONE;
              insn[d + 1].type &= ~IT_BBSTART;
              insn[d + 1].type &= ~IT_BBSTART;
 
              insn[d].op[2] = insn[d].op[0]; insn[d].opt[2] = insn[d].opt[0];
              insn[d].op[0] = -1; insn[d].opt[0] = OPT_REGISTER | OPT_DEST; /* add rd, ra, rb */
              insn[d].op[0] = -1; insn[d].opt[0] = OPT_REGISTER | OPT_DEST; /* add rd, ra, rb */
              insn[d].op[2] = insn[i].op[0]; insn[d].opt[2] = insn[i].opt[0];
 
              insn[d].opt[3] = OPT_NONE;
              insn[d].opt[3] = OPT_NONE;
              insn[d].type &= IT_INDELAY | IT_BBSTART;
              insn[d].type &= IT_INDELAY | IT_BBSTART;
              insn[d].type |= IT_MEMADD;
              insn[d].type |= IT_MEMADD;
              change_insn_type (&insn[d], II_ADD);
              change_insn_type (&insn[d], II_ADD);
              break;
              break;

powered by: WebSVN 2.1.0

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