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

Subversion Repositories or1k

[/] [or1k/] [branches/] [stable_0_2_x/] [or1ksim/] [cuc/] [insn.c] - Diff between revs 1350 and 1557

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

Rev 1350 Rev 1557
Line 912... Line 912...
 
 
  for (b = 0; b < f->num_bb; b++)
  for (b = 0; b < f->num_bb; b++)
    for (i = 0; i < f->bb[b].ninsn; i++) {
    for (i = 0; i < f->bb[b].ninsn; i++) {
      cuc_insn *ii = &f->bb[b].insn[i];
      cuc_insn *ii = &f->bb[b].insn[i];
      if (ii->type & IT_VOLATILE || ii->type & IT_OUTPUT
      if (ii->type & IT_VOLATILE || ii->type & IT_OUTPUT
       || II_IS_LOAD (ii->index) && (f->memory_order == MO_NONE || f->memory_order == MO_WEAK)
       || (II_IS_LOAD (ii->index) && (f->memory_order == MO_NONE || f->memory_order == MO_WEAK))
       || II_IS_STORE (ii->index)) {
       || II_IS_STORE (ii->index)) {
        unmark_tree (f, REF (b, i));
        unmark_tree (f, REF (b, i));
        cucdebug (5, "\n");
        cucdebug (5, "\n");
      }
      }
    }
    }
Line 975... Line 975...
        }
        }
  }
  }
}
}
 
 
/* relocate all accesses inside of BB b to back/fwd */
/* relocate all accesses inside of BB b to back/fwd */
 
#if 0
static void relocate_bb (cuc_bb *bb, int b, int back, int fwd)
static void relocate_bb (cuc_bb *bb, int b, int back, int fwd)
{
{
  int i, j;
  int i, j;
  for (i = 0; i < bb->ninsn; i++)
  for (i = 0; i < bb->ninsn; i++)
    for (j = 0; j < MAX_OPERANDS; j++)
    for (j = 0; j < MAX_OPERANDS; j++)
Line 987... Line 988...
        int t = REF_I (bb->insn[i].op[j]);
        int t = REF_I (bb->insn[i].op[j]);
        if (t < i) bb->insn[i].op[j] = REF (back, t);
        if (t < i) bb->insn[i].op[j] = REF (back, t);
        else bb->insn[i].op[j] = REF (fwd, t);
        else bb->insn[i].op[j] = REF (fwd, t);
      }
      }
}
}
 
#endif
 
 
/* Latch outputs in loops */
/* Latch outputs in loops */
void add_latches (cuc_func *f)
void add_latches (cuc_func *f)
{
{
  int b, i, j;
  int b, i, j;
Line 1409... Line 1411...
   we are going to share, but we are going to do this on whole function, not just one BB.
   we are going to share, but we are going to do this on whole function, not just one BB.
   We can find sequence in reference function, as pointed from "shared" */
   We can find sequence in reference function, as pointed from "shared" */
void csm_gen (cuc_func *f, cuc_func *rf, cuc_shared_item *shared, int nshared)
void csm_gen (cuc_func *f, cuc_func *rf, cuc_shared_item *shared, int nshared)
{
{
  int b, i, cnt = 0;
  int b, i, cnt = 0;
#warning   some code here (2)
  /* FIXME: some code here (2) */
  PRINTF ("Replacing: ");
  PRINTF ("Replacing: ");
  print_shared (rf, shared, nshared);
  print_shared (rf, shared, nshared);
 
 
  for (b = 0; b < f->num_bb; b++)
  for (b = 0; b < f->num_bb; b++)
    for (i = 0; i < f->bb[b].ninsn; i++) {
    for (i = 0; i < f->bb[b].ninsn; i++) {

powered by: WebSVN 2.1.0

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