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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_64/] [or1ksim/] [cuc/] [insn.c] - Diff between revs 926 and 927

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

Rev 926 Rev 927
Line 257... Line 257...
        ii->op[1] = 0; ii->opt[1] = OPT_CONST;
        ii->op[1] = 0; ii->opt[1] = OPT_CONST;
      }
      }
      ii->opt[3] = OPT_NONE;
      ii->opt[3] = OPT_NONE;
      return 1;
      return 1;
    }
    }
 
    if (ii->type & IT_COND) {
 
      if (ii->opt[1] & OPT_CONST && ii->opt[2] & OPT_CONST) {
 
        if (ii->op[1] && !ii->op[2]) {
 
          change_insn_type (ii, II_ADD);
 
          ii->op[1] = ii->op[3]; ii->opt[1] = ii->opt[3];
 
          ii->op[2] = 0; ii->opt[2] = OPT_CONST;
 
          ii->opt[3] = OPT_NONE;
 
          return 1;
 
        }
 
        if (ii->op[1] && ii->op[2]) {
 
          change_insn_type (ii, II_ADD);
 
          ii->op[1] = 1; ii->opt[1] = OPT_CONST;
 
          ii->op[2] = 0; ii->opt[2] = OPT_CONST;
 
          ii->opt[3] = OPT_NONE;
 
          return 1;
 
        }
 
        if (!ii->op[1] && !ii->op[2]) {
 
          change_insn_type (ii, II_ADD);
 
          ii->op[1] = 0; ii->opt[1] = OPT_CONST;
 
          ii->op[2] = 0; ii->opt[2] = OPT_CONST;
 
          ii->opt[3] = OPT_NONE;
 
          return 0;
 
        }
 
      }
 
    }
  }
  }
  return 0;
  return 0;
}
}
 
 
/* First primary input */
/* First primary input */

powered by: WebSVN 2.1.0

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