/[gxemul]/trunk/src/main.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 9 by dpavlin, Mon Oct 8 16:18:11 2007 UTC revision 10 by dpavlin, Mon Oct 8 16:18:27 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: main.c,v 1.236 2005/05/25 06:40:18 debug Exp $   *  $Id: main.c,v 1.238 2005/06/25 13:25:33 debug Exp $
29   */   */
30    
31  #include <stdio.h>  #include <stdio.h>
# Line 218  static void usage(int longusage) Line 218  static void usage(int longusage)
218    
219          printf("\nOther options:\n");          printf("\nOther options:\n");
220  #ifdef BINTRANS  #ifdef BINTRANS
221          printf("  -B        disable dynamic binary translation completely\n");          printf("  -B        disable dynamic binary translation. (translation"
222          printf("  -b        use the OLD binary translation subsystem\n");              " is turned on\n            by default, if the host "
223                "supports it)\n");
224  #endif  #endif
225          printf("  -C x      try to emulate a specific CPU. (Use -H to get a "          printf("  -C x      try to emulate a specific CPU. (Use -H to get a "
226              "list of types.)\n");              "list of types.)\n");
# Line 337  int get_cmd_args(int argc, char *argv[], Line 338  int get_cmd_args(int argc, char *argv[],
338          int msopts = 0;         /*  Machine-specific options used  */          int msopts = 0;         /*  Machine-specific options used  */
339          struct machine *m = emul_add_machine(emul, "default");          struct machine *m = emul_add_machine(emul, "default");
340    
341          while ((ch = getopt(argc, argv, "BbC:Dd:E:e:HhI:iJj:KM:m:"          while ((ch = getopt(argc, argv, "BC:Dd:E:e:HhI:iJj:KM:m:"
342              "Nn:Oo:p:QqRrSsTtUu:VvW:XxY:y:Z:z:")) != -1) {              "Nn:Oo:p:QqRrSsTtUu:VvW:XxY:y:Z:z:")) != -1) {
343                  switch (ch) {                  switch (ch) {
344                  case 'B':                  case 'B':
345                          m->bintrans_enable = 0;                          m->bintrans_enable = 0;
346                          msopts = 1;                          msopts = 1;
347                          break;                          break;
                 case 'b':  
                         m->old_bintrans_enable = 1;  
                         msopts = 1;  
                         break;  
348                  case 'C':                  case 'C':
349                          m->cpu_name = strdup(optarg);                          m->cpu_name = strdup(optarg);
350                          msopts = 1;                          msopts = 1;
# Line 544  int get_cmd_args(int argc, char *argv[], Line 541  int get_cmd_args(int argc, char *argv[],
541                          msopts = 1;                          msopts = 1;
542                          break;                          break;
543                  default:                  default:
544                          fprintf(stderr, "Invalid option.\n");                          fprintf(stderr, "Run  %s -h  for help on command "
545                          usage(0);                              "line options.\n", progname);
546                          exit(1);                          exit(1);
547                  }                  }
548          }          }
# Line 566  int get_cmd_args(int argc, char *argv[], Line 563  int get_cmd_args(int argc, char *argv[],
563          extra_argv = argv;          extra_argv = argv;
564    
565    
         if (!m->bintrans_enable && m->old_bintrans_enable) {  
                 fprintf(stderr, "You cannot both select old bintrans and"  
                     " disable bintrans at the same time.\n");  
                 exit(1);  
         }  
   
         /*  TODO: Remove this once there is a new bintrans system.  */  
         if (m->bintrans_enable && !m->old_bintrans_enable) {  
                 m->bintrans_enable = 0;  
         }  
   
566          if (m->machine_type == MACHINE_NONE && msopts) {          if (m->machine_type == MACHINE_NONE && msopts) {
567                  fprintf(stderr, "Machine specific options used directly on "                  fprintf(stderr, "Machine specific options used directly on "
568                      "the command line, but no machine\nemulation specified?\n");                      "the command line, but no machine\nemulation specified?\n");
# Line 607  int get_cmd_args(int argc, char *argv[], Line 593  int get_cmd_args(int argc, char *argv[],
593                  quiet_mode = 0;                  quiet_mode = 0;
594          }          }
595    
596            if ((m->instruction_trace || m->register_dump || m->show_trace_tree)
597                && m->bintrans_enable) {
598                    fprintf(stderr, "Implicitly turning off bintrans.\n");
599                    m->bintrans_enable = 0;
600            }
601    
602    
603          /*          /*
604           *  Usually, an executable filename must be supplied.           *  Usually, an executable filename must be supplied.

Legend:
Removed from v.9  
changed lines
  Added in v.10

  ViewVC Help
Powered by ViewVC 1.1.26