summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@specifix.com>2003-06-05 02:17:29 +0000
committerMichael Snyder <msnyder@specifix.com>2003-06-05 02:17:29 +0000
commit5691a4e7d9a90f8ef313557975cb443ea6798a3c (patch)
tree01afdd6bd07d12ffdcb5054669ed457758cf81d7
parent9b7aa498d003fc414f3a4417e15df1e08cb76932 (diff)
downloadgdb-5691a4e7d9a90f8ef313557975cb443ea6798a3c.tar.gz
2003-06-04 Michael Snyder <msnyder@redhat.com>
* common/run.c (main): Remove SIM_H8300 ifdef. (usage): Ditto. * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX. (standard_options): Add '-x' for h8/300sx. (standard_option_handler): Add case for SIM_H8300SX.
-rw-r--r--sim/common/ChangeLog8
-rw-r--r--sim/common/run.c22
-rw-r--r--sim/common/sim-options.c17
3 files changed, 20 insertions, 27 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index fb3e1b786ea..71c3c38545f 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,11 @@
+2003-06-04 Michael Snyder <msnyder@redhat.com>
+
+ * common/run.c (main): Remove SIM_H8300 ifdef.
+ (usage): Ditto.
+ * common/sim-options.c (STANDARD_OPTIONS): Add SIM_H8300SX.
+ (standard_options): Add '-x' for h8/300sx.
+ (standard_option_handler): Add case for SIM_H8300SX.
+
2003-04-13 Michael Snyder <msnyder@redhat.com>
* Make-common.in (sim-events.o, sim-config.o): Depend on sim-main.h.
diff --git a/sim/common/run.c b/sim/common/run.c
index 4131dd79bbb..79642007618 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -119,11 +119,7 @@ main (ac, av)
/* FIXME: This is currently being rewritten to have each simulator
do all argv processing. */
-#ifdef SIM_H8300 /* FIXME: quick hack */
- while ((i = getopt (ac, av, "a:c:m:op:s:hStv")) != EOF)
-#else
while ((i = getopt (ac, av, "a:c:m:op:s:tv")) != EOF)
-#endif
switch (i)
{
case 'a':
@@ -176,14 +172,6 @@ main (ac, av)
/* sim_set_verbose (1); */
break;
/* FIXME: Quick hack, to be replaced by more general facility. */
-#ifdef SIM_H8300
- case 'h':
- set_h8300h (1, 0);
- break;
- case 'S':
- set_h8300h (1, 1);
- break;
-#endif
default:
usage ();
}
@@ -288,11 +276,6 @@ main (ac, av)
the signal that the simulator received; we want to return that to
indicate failure. */
-#ifdef SIM_H8300 /* FIXME: Ugh. grep for SLEEP in compile.c */
- if (sigrc == SIGILL)
- abort ();
- sigrc = 0;
-#else
/* Why did we stop? */
switch (reason)
{
@@ -311,7 +294,6 @@ main (ac, av)
break;
}
-#endif
return sigrc;
}
@@ -325,10 +307,6 @@ usage ()
#ifdef SIM_HAVE_SIMCACHE
fprintf (stderr, "-c size Set simulator cache size to `size'.\n");
#endif
-#ifdef SIM_H8300
- fprintf (stderr, "-h Executable is for H8/300H.\n");
- fprintf (stderr, "-S Executable is for H8S.\n");
-#endif
fprintf (stderr, "-m size Set memory size of simulator, in bytes.\n");
#ifdef SIM_HAVE_ENVIRONMENT
fprintf (stderr, "-o Select operating (kernel) environment.\n");
diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c
index aae0245613e..8c16d56cc75 100644
--- a/sim/common/sim-options.c
+++ b/sim/common/sim-options.c
@@ -109,8 +109,9 @@ typedef enum {
#endif
OPTION_HELP,
#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */
- OPTION_H8300,
+ OPTION_H8300H,
OPTION_H8300S,
+ OPTION_H8300SX,
#endif
OPTION_LOAD_LMA,
OPTION_LOAD_VMA,
@@ -152,12 +153,15 @@ static const OPTION standard_options[] =
standard_option_handler },
#ifdef SIM_H8300 /* FIXME: Should be movable to h8300 dir. */
- { {"h8300h", no_argument, NULL, OPTION_H8300},
+ { {"h8300h", no_argument, NULL, OPTION_H8300H},
'h', NULL, "Indicate the CPU is h8/300h",
standard_option_handler },
{ {"h8300s", no_argument, NULL, OPTION_H8300S},
'S', NULL, "Indicate the CPU is h8/300s",
standard_option_handler },
+ { {"h8300sx", no_argument, NULL, OPTION_H8300SX},
+ 'x', NULL, "Indicate the CPU is h8/300sx",
+ standard_option_handler },
#endif
#ifdef SIM_HAVE_FLATMEM
@@ -357,11 +361,14 @@ standard_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
break;
#ifdef SIM_H8300 /* FIXME: Can be moved to h8300 dir. */
- case OPTION_H8300:
- set_h8300h (1,0);
+ case OPTION_H8300H:
+ set_h8300h (bfd_mach_h8300h);
break;
case OPTION_H8300S:
- set_h8300h (1,1);
+ set_h8300h (bfd_mach_h8300s);
+ break;
+ case OPTION_H8300SX:
+ set_h8300h (bfd_mach_h8300sx);
break;
#endif