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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [cpu/] [common/] [parse.c] - Diff between revs 220 and 230

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

Rev 220 Rev 230
Line 183... Line 183...
}
}
 
 
static void
static void
check_insn (uint32_t insn)
check_insn (uint32_t insn)
{
{
  int insn_index = insn_decode (insn);
  int insn_index = or1ksim_insn_decode (insn);
  struct insn_op_struct *opd = op_start[insn_index];
  struct insn_op_struct *opd = or1ksim_op_start[insn_index];
  uint32_t data = 0;
  uint32_t data = 0;
  int dis = 0;
  int dis = 0;
  const char *name;
  const char *name;
  if (!insn || insn_index < 0)
  if (!insn || insn_index < 0)
    return;
    return;
  name = insn_name (insn_index);
  name = or1ksim_insn_name (insn_index);
  if (strcmp (name, "l.nop") == 0 || strcmp (name, "l.sys") == 0)
  if (strcmp (name, "l.nop") == 0 || strcmp (name, "l.sys") == 0)
    return;
    return;
 
 
  while (1)
  while (1)
    {
    {
Line 235... Line 235...
                }
                }
              else
              else
                {
                {
                  data |= movhi;
                  data |= movhi;
                  //PRINTF ("%08x %s\n", data, name);
                  //PRINTF ("%08x %s\n", data, name);
                  if (!(or32_opcodes[insn_index].flags & OR32_IF_DELAY))
                  if (!(or1ksim_or32_opcodes[insn_index].flags & OR32_IF_DELAY))
                    {
                    {
                      bcnt[bits (data)][0]++;
                      bcnt[bits (data)][0]++;
                      bsum[0]++;
                      bsum[0]++;
                    }
                    }
                  else
                  else
Line 299... Line 299...
  check_insn (insn);
  check_insn (insn);
#endif
#endif
 
 
  if (runtime.sim.filename)
  if (runtime.sim.filename)
    {
    {
      freemem += insn_len (insn_decode (insn));
      freemem += or1ksim_insn_len (or1ksim_insn_decode (insn));
    }
    }
}       /* addprogram () */
}       /* addprogram () */
 
 
 
 
/*---------------------------------------------------------------------------*/
/*---------------------------------------------------------------------------*/
Line 382... Line 382...
        }
        }
      while (sectsize > 0
      while (sectsize > 0
             && (len = fread (&inputbuf, sizeof (inputbuf), 1, inputfs)))
             && (len = fread (&inputbuf, sizeof (inputbuf), 1, inputfs)))
        {
        {
          insn = COFF_LONG_H (inputbuf);
          insn = COFF_LONG_H (inputbuf);
          len = insn_len (insn_decode (insn));
          len = or1ksim_insn_len (or1ksim_insn_decode (insn));
          if (len == 2)
          if (len == 2)
            {
            {
              fseek (inputfs, -2, SEEK_CUR);
              fseek (inputfs, -2, SEEK_CUR);
            }
            }
 
 

powered by: WebSVN 2.1.0

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