diff mbox

sim: iq2000/m32r/lm32/sh64: delete dead option code [committed]

Message ID 1451749315-3785-1-git-send-email-vapier@gentoo.org
State Committed
Headers show

Commit Message

Mike Frysinger Jan. 2, 2016, 3:41 p.m. UTC
The iq2000/m32r/sh64 option parsing logic appears to have always been
dead.  At least iq2000/sh64 are simply copy & paste rot from m32r.

The lm32 option parsing hack here hasn't been needed for a while -- this
was fixed back in commit 11409fac6b95d71a92848a4499b02d60a4f4c5bb in the
common code.
---
 sim/iq2000/ChangeLog |  4 ++++
 sim/iq2000/sim-if.c  |  8 --------
 sim/lm32/ChangeLog   |  6 ++++++
 sim/lm32/sim-if.c    | 31 -------------------------------
 sim/m32r/ChangeLog   |  4 ++++
 sim/m32r/sim-if.c    |  8 --------
 sim/sh64/ChangeLog   |  4 ++++
 sim/sh64/sim-if.c    |  8 --------
 8 files changed, 18 insertions(+), 55 deletions(-)
diff mbox

Patch

diff --git a/sim/iq2000/ChangeLog b/sim/iq2000/ChangeLog
index d2584e9..07c6ef6 100644
--- a/sim/iq2000/ChangeLog
+++ b/sim/iq2000/ChangeLog
@@ -1,5 +1,9 @@ 
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
+	* sim-if.c (sim_open): Delete #if 0 sim_add_option_table call.
+
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
 	* sim-if.c (current_state): Delete.
 	(sim_open): Delete current_state assignment.
 
diff --git a/sim/iq2000/sim-if.c b/sim/iq2000/sim-if.c
index d21ec1b..fefa764 100644
--- a/sim/iq2000/sim-if.c
+++ b/sim/iq2000/sim-if.c
@@ -82,14 +82,6 @@  sim_open (kind, callback, abfd, argv)
       return 0;
     }
 
-#if 0 /* FIXME: 'twould be nice if we could do this */
-  /* These options override any module options.
-     Obviously ambiguity should be avoided, however the caller may wish to
-     augment the meaning of an option.  */
-  if (extra_options != NULL)
-    sim_add_option_table (sd, extra_options);
-#endif
-
   /* getopt will print the error message so we just have to exit if this fails.
      FIXME: Hmmm...  in the case of gdb we need getopt to call
      print_filtered.  */
diff --git a/sim/lm32/ChangeLog b/sim/lm32/ChangeLog
index eda8a23..5aaab31 100644
--- a/sim/lm32/ChangeLog
+++ b/sim/lm32/ChangeLog
@@ -1,5 +1,11 @@ 
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
+	* sim-if.c (free_state, print_lm32_misc_cpu): Delete prototypes.
+	(lm32_option_handler, OPTION_ENDIAN, lm32_options): Delete.
+	(sim_open): Delete sim_add_option_table call.
+
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
 	* sim-if.c (current_state): Delete.
 	(sim_open): Delete current_state assignment.
 
diff --git a/sim/lm32/sim-if.c b/sim/lm32/sim-if.c
index 3f65c93..6786024 100644
--- a/sim/lm32/sim-if.c
+++ b/sim/lm32/sim-if.c
@@ -26,23 +26,6 @@ 
 #ifdef HAVE_STDLIB_H
 #include <stdlib.h>
 #endif
-
-static void free_state (SIM_DESC);
-static void print_lm32_misc_cpu (SIM_CPU * cpu, int verbose);
-static DECLARE_OPTION_HANDLER (lm32_option_handler);
-
-enum
-{
-  OPTION_ENDIAN = OPTION_START,
-};
-
-/* GDB passes -E, even though it's fixed, so we have to handle it here. common code only handles it if SIM_HAVE_BIENDIAN is defined, which it isn't for lm32.  */
-static const OPTION lm32_options[] = {
-  {{"endian", required_argument, NULL, OPTION_ENDIAN},
-   'E', "big", "Set endianness",
-   lm32_option_handler},
-  {{NULL, no_argument, NULL, 0}, '\0', NULL, NULL, NULL}
-};
 
 /* Cover function of sim_state_free to free the cpu buffers as well.  */
 
@@ -111,19 +94,6 @@  find_limit (bfd *prog_bfd)
   return 0;
 }
 
-/* Handle lm32 specific options.  */
-
-static SIM_RC
-lm32_option_handler (sd, cpu, opt, arg, is_command)
-     SIM_DESC sd;
-     sim_cpu *cpu;
-     int opt;
-     char *arg;
-     int is_command;
-{
-  return SIM_RC_OK;
-}
-
 /* Create an instance of the simulator.  */
 
 SIM_DESC
@@ -150,7 +120,6 @@  sim_open (kind, callback, abfd, argv)
       free_state (sd);
       return 0;
     }
-  sim_add_option_table (sd, NULL, lm32_options);
 
   /* getopt will print the error message so we just have to exit if this fails.
      FIXME: Hmmm...  in the case of gdb we need getopt to call
diff --git a/sim/m32r/ChangeLog b/sim/m32r/ChangeLog
index 5b3d70e..8b65bb9 100644
--- a/sim/m32r/ChangeLog
+++ b/sim/m32r/ChangeLog
@@ -1,5 +1,9 @@ 
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
+	* sim-if.c (sim_open): Delete #if 0 sim_add_option_table call.
+
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
 	* sim-if.c (current_state): Delete.
 	(sim_open): Delete current_state assignment.
 
diff --git a/sim/m32r/sim-if.c b/sim/m32r/sim-if.c
index 2ed6934..2777f61 100644
--- a/sim/m32r/sim-if.c
+++ b/sim/m32r/sim-if.c
@@ -84,14 +84,6 @@  sim_open (kind, callback, abfd, argv)
       return 0;
     }
 
-#if 0 /* FIXME: 'twould be nice if we could do this */
-  /* These options override any module options.
-     Obviously ambiguity should be avoided, however the caller may wish to
-     augment the meaning of an option.  */
-  if (extra_options != NULL)
-    sim_add_option_table (sd, extra_options);
-#endif
-
   /* getopt will print the error message so we just have to exit if this fails.
      FIXME: Hmmm...  in the case of gdb we need getopt to call
      print_filtered.  */
diff --git a/sim/sh64/ChangeLog b/sim/sh64/ChangeLog
index 06ce139..74f89bc 100644
--- a/sim/sh64/ChangeLog
+++ b/sim/sh64/ChangeLog
@@ -1,5 +1,9 @@ 
 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
 
+	* sim-if.c (sim_open): Delete #if 0 sim_add_option_table call.
+
+2016-01-02  Mike Frysinger  <vapier@gentoo.org>
+
 	* sim-if.c (current_state): Delete.
 	(sim_open): Delete current_state assignment.
 
diff --git a/sim/sh64/sim-if.c b/sim/sh64/sim-if.c
index a74f1e5..ba8feb8 100644
--- a/sim/sh64/sim-if.c
+++ b/sim/sh64/sim-if.c
@@ -79,14 +79,6 @@  sim_open (kind, callback, abfd, argv)
       return 0;
     }
 
-#if 0 /* FIXME: 'twould be nice if we could do this */
-  /* These options override any module options.
-     Obviously ambiguity should be avoided, however the caller may wish to
-     augment the meaning of an option.  */
-  if (extra_options != NULL)
-    sim_add_option_table (sd, extra_options);
-#endif
-
   /* getopt will print the error message so we just have to exit if this fails.
      FIXME: Hmmm...  in the case of gdb we need getopt to call
      print_filtered.  */