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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [or1ksim/] [mprofiler.c] - Diff between revs 19 and 88

Show entire file | Details | Blame | View Log

Rev 19 Rev 88
Line 262... Line 262...
  void *argtab[8];
  void *argtab[8];
  int nerrors;
  int nerrors;
 
 
  int mode = MODE_DETAIL;
  int mode = MODE_DETAIL;
 
 
  /* Specify each argument, with fallback values */
  /* Specify each argument, with fallback values.
 
 
 
     Bug 1710 (Vinay Patil) fixed. mode should allow REG_EXTENDED. */
  vercop = arg_lit0 ("v", "version", "version and copyright notice");
  vercop = arg_lit0 ("v", "version", "version and copyright notice");
  help = arg_lit0 ("h", "help", "print this help message");
  help = arg_lit0 ("h", "help", "print this help message");
  mode_arg = arg_rex0 ("m", "mode",
  mode_arg = arg_rex0 ("m", "mode",
                       "(detailed|d)|(pretty|p)|(access|a)|"
                       "(detailed|d)|(pretty|p)|(access|a)|"
                       "(width|w)", "<m>", REG_ICASE,
                       "(width|w)", "<m>", REG_ICASE | REG_EXTENDED,
                       "Output mode (detailed, pretty, access " "or width)");
                       "Output mode (detailed, pretty, access " "or width)");
  mode_arg->sval[0] = "detailed";
  mode_arg->sval[0] = "detailed";
  group = arg_int0 ("g", "group", "<n>",
  group = arg_int0 ("g", "group", "<n>",
                    "group 2^n bits successive addresses " "together");
                    "group 2^n bits successive addresses " "together");
  group->ival[0] = 0;
  group->ival[0] = 0;
Line 337... Line 339...
 
 
      arg_freetable (argtab, sizeof (argtab) / sizeof (argtab[0]));
      arg_freetable (argtab, sizeof (argtab) / sizeof (argtab[0]));
      return 1;
      return 1;
    }
    }
 
 
  /* If version or help is requested, that is all that is printed out */
  /* If version or help is requested, that is all that is printed out
  /* Sort out the mode */
     Sort out the mode.
 
 
 
     Bug 1710 fixed (Vinay Patil). Modes now set correctly (were all set to
 
     detail). */
  if ((0 == strcmp (mode_arg->sval[0], "detail")) ||
  if ((0 == strcmp (mode_arg->sval[0], "detail")) ||
      (0 == strcmp (mode_arg->sval[0], "d")))
      (0 == strcmp (mode_arg->sval[0], "d")))
    {
    {
      mode = MODE_DETAIL;
      mode = MODE_DETAIL;
    }
    }
  else if ((0 == strcmp (mode_arg->sval[0], "pretty")) ||
  else if ((0 == strcmp (mode_arg->sval[0], "pretty")) ||
           (0 == strcmp (mode_arg->sval[0], "p")))
           (0 == strcmp (mode_arg->sval[0], "p")))
    {
    {
      mode = MODE_DETAIL;
      mode = MODE_PRETTY;
    }
    }
  else if ((0 == strcmp (mode_arg->sval[0], "access")) ||
  else if ((0 == strcmp (mode_arg->sval[0], "access")) ||
           (0 == strcmp (mode_arg->sval[0], "a")))
           (0 == strcmp (mode_arg->sval[0], "a")))
    {
    {
      mode = MODE_DETAIL;
      mode = MODE_ACCESS;
    }
    }
  else if ((0 == strcmp (mode_arg->sval[0], "width")) ||
  else if ((0 == strcmp (mode_arg->sval[0], "width")) ||
           (0 == strcmp (mode_arg->sval[0], "w")))
           (0 == strcmp (mode_arg->sval[0], "w")))
    {
    {
      mode = MODE_DETAIL;
      mode = MODE_WIDTH;
    }
    }
  else
  else
    {
    {
      fprintf (stderr, "Impossible mode: %s\n", mode_arg->sval[0]);
      fprintf (stderr, "Impossible mode: %s\n", mode_arg->sval[0]);
    }
    }

powered by: WebSVN 2.1.0

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