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

Subversion Repositories or1k

[/] [or1k/] [tags/] [nog_patch_66/] [gen_or1k_isa/] [sources/] [opcode/] [or32.c] - Diff between revs 706 and 709

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

Rev 706 Rev 709
Line 728... Line 728...
 
 
  automata = (unsigned long *) malloc (MAX_AUTOMATA_SIZE * sizeof (unsigned long));
  automata = (unsigned long *) malloc (MAX_AUTOMATA_SIZE * sizeof (unsigned long));
  ti = (struct temp_insn_struct *) malloc (sizeof (struct temp_insn_struct) * num_opcodes);
  ti = (struct temp_insn_struct *) malloc (sizeof (struct temp_insn_struct) * num_opcodes);
 
 
  nuncovered = num_opcodes;
  nuncovered = num_opcodes;
 
 
 
#ifdef HAS_EXECUTION
  printf("Building automata... ");
  printf("Building automata... ");
 
#endif
 
 
  /* Build temporary information about instructions.  */
  /* Build temporary information about instructions.  */
  for (i = 0; i < num_opcodes; i++)
  for (i = 0; i < num_opcodes; i++)
    {
    {
      unsigned long ones, zeros;
      unsigned long ones, zeros;
      char *encoding = or32_opcodes[i].encoding;
      char *encoding = or32_opcodes[i].encoding;
Line 750... Line 754...
  if (end - automata > MAX_AUTOMATA_SIZE)
  if (end - automata > MAX_AUTOMATA_SIZE)
    {
    {
      fprintf (stderr, "Automata too large. Increase MAX_AUTOMATA_SIZE.");
      fprintf (stderr, "Automata too large. Increase MAX_AUTOMATA_SIZE.");
      exit (1);
      exit (1);
    }
    }
 
#ifdef HAS_EXECUTION
  printf("done, num uncovered: %i/%i.\n", nuncovered, num_opcodes);
  printf("done, num uncovered: %i/%i.\n", nuncovered, num_opcodes);
 
#endif
 
 
 
#ifdef HAS_EXECUTION
  printf("Parsing operands data... ");
  printf("Parsing operands data... ");
 
#endif
  op_data = (struct insn_op_struct *) malloc (MAX_OP_TABLE_SIZE * sizeof (struct insn_op_struct));
  op_data = (struct insn_op_struct *) malloc (MAX_OP_TABLE_SIZE * sizeof (struct insn_op_struct));
  op_start = (struct insn_op_struct **) malloc (num_opcodes * sizeof (struct insn_op_struct *));
  op_start = (struct insn_op_struct **) malloc (num_opcodes * sizeof (struct insn_op_struct *));
  cur = op_data;
  cur = op_data;
  for (i = 0; i < num_opcodes; i++)
  for (i = 0; i < num_opcodes; i++)
    {
    {
Line 766... Line 774...
        {
        {
          fprintf (stderr, "Operands table too small, increase MAX_OP_TABLE_SIZE.\n");
          fprintf (stderr, "Operands table too small, increase MAX_OP_TABLE_SIZE.\n");
          exit (1);
          exit (1);
        }
        }
    }
    }
 
#ifdef HAS_EXECUTION
  printf("done.\n");
  printf("done.\n");
 
#endif
}
}
 
 
void destruct_automata ()
void destruct_automata ()
{
{
  free (ti);
  free (ti);

powered by: WebSVN 2.1.0

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