remove PARAMS from sim
authorTom Tromey <tromey@redhat.com>
Sun, 5 Jan 2014 04:43:21 +0000 (21:43 -0700)
committerTom Tromey <tromey@redhat.com>
Tue, 7 Jan 2014 16:17:05 +0000 (09:17 -0700)
This removes the last uses of PARAMS from sim.

2014-01-06  Tom Tromey  <tromey@redhat.com>

* README-HACKING: Don't use PARAMS.
* arm/wrapper.c: Don't use PARAMS.
* bfin/sim-main.h: Don't use PARAMS.
* common/callback.c: Don't use PARAMS.
* common/cgen-trace.c: Don't use PARAMS.
* common/run-sim.h: Don't use PARAMS.
* common/run.c: Don't use PARAMS.
* common/sim-base.h: Don't use PARAMS.
* common/sim-load.c: Don't use PARAMS.
* common/sim-options.h: Don't use PARAMS.
* common/sim-trace.c: Don't use PARAMS.
* common/sim-trace.h: Don't use PARAMS.
* common/sim-utils.h: Don't use PARAMS.
* cr16/cr16_sim.h: Don't use PARAMS.
* cr16/gencode.c: Don't use PARAMS.
* cr16/interp.c: Don't use PARAMS.
* cr16/simops.c: Don't use PARAMS.
* d10v/d10v_sim.h: Don't use PARAMS.
* d10v/gencode.c: Don't use PARAMS.
* d10v/interp.c: Don't use PARAMS.
* d10v/simops.c: Don't use PARAMS.
* erc32/erc32.c: Don't use PARAMS.
* erc32/exec.c: Don't use PARAMS.
* erc32/float.c: Don't use PARAMS.
* erc32/func.c: Don't use PARAMS.
* erc32/sis.c: Don't use PARAMS.
* erc32/sis.h: Don't use PARAMS.
* mips/interp.c: Don't use PARAMS.
* mips/sim-main.h: Don't use PARAMS.
* sh/interp.c: Don't use PARAMS.
* v850/sim-main.h: Don't use PARAMS.
* v850/v850_sim.h: Don't use PARAMS.

33 files changed:
sim/ChangeLog
sim/README-HACKING
sim/arm/wrapper.c
sim/bfin/sim-main.h
sim/common/callback.c
sim/common/cgen-trace.c
sim/common/run-sim.h
sim/common/run.c
sim/common/sim-base.h
sim/common/sim-load.c
sim/common/sim-options.h
sim/common/sim-trace.c
sim/common/sim-trace.h
sim/common/sim-utils.h
sim/cr16/cr16_sim.h
sim/cr16/gencode.c
sim/cr16/interp.c
sim/cr16/simops.c
sim/d10v/d10v_sim.h
sim/d10v/gencode.c
sim/d10v/interp.c
sim/d10v/simops.c
sim/erc32/erc32.c
sim/erc32/exec.c
sim/erc32/float.c
sim/erc32/func.c
sim/erc32/sis.c
sim/erc32/sis.h
sim/mips/interp.c
sim/mips/sim-main.h
sim/sh/interp.c
sim/v850/sim-main.h
sim/v850/v850_sim.h

index 13564c9555cbe61ced85c3d04e5c2eb194c4de22..04e5202f58142fcdcaa470c2501a760f775d53fd 100644 (file)
@@ -1,3 +1,38 @@
+2014-01-06  Tom Tromey  <tromey@redhat.com>
+
+       * README-HACKING: Don't use PARAMS.
+       * arm/wrapper.c: Don't use PARAMS.
+       * bfin/sim-main.h: Don't use PARAMS.
+       * common/callback.c: Don't use PARAMS.
+       * common/cgen-trace.c: Don't use PARAMS.
+       * common/run-sim.h: Don't use PARAMS.
+       * common/run.c: Don't use PARAMS.
+       * common/sim-base.h: Don't use PARAMS.
+       * common/sim-load.c: Don't use PARAMS.
+       * common/sim-options.h: Don't use PARAMS.
+       * common/sim-trace.c: Don't use PARAMS.
+       * common/sim-trace.h: Don't use PARAMS.
+       * common/sim-utils.h: Don't use PARAMS.
+       * cr16/cr16_sim.h: Don't use PARAMS.
+       * cr16/gencode.c: Don't use PARAMS.
+       * cr16/interp.c: Don't use PARAMS.
+       * cr16/simops.c: Don't use PARAMS.
+       * d10v/d10v_sim.h: Don't use PARAMS.
+       * d10v/gencode.c: Don't use PARAMS.
+       * d10v/interp.c: Don't use PARAMS.
+       * d10v/simops.c: Don't use PARAMS.
+       * erc32/erc32.c: Don't use PARAMS.
+       * erc32/exec.c: Don't use PARAMS.
+       * erc32/float.c: Don't use PARAMS.
+       * erc32/func.c: Don't use PARAMS.
+       * erc32/sis.c: Don't use PARAMS.
+       * erc32/sis.h: Don't use PARAMS.
+       * mips/interp.c: Don't use PARAMS.
+       * mips/sim-main.h: Don't use PARAMS.
+       * sh/interp.c: Don't use PARAMS.
+       * v850/sim-main.h: Don't use PARAMS.
+       * v850/v850_sim.h: Don't use PARAMS.
+
 2013-11-07  Will Newton  <will.newton@linaro.org>
 
        PR gdb/15508
index 77cad9427b62355671c7875235bf15ca3c6b7ef0..33b6ecb6cbcd2de5ffdb7c9607edc509ac532b86 100644 (file)
@@ -175,9 +175,7 @@ C Language Assumptions
 The programmer may assume that the simulator is being built using an
 ANSI C compiler that supports a 64 bit data type.  Consequently:
 
-       o       prototypes can be used (although using
-               PARAMS() and K&R declarations wouldn't
-               go astray).
+       o       prototypes can be used
 
        o       If sim-types.h is included, the two
                types signed64 and unsigned64 are
index 70e27f7567d3668528bb9b81507a3347713bbbae..0ea9ee1e314a3272f94f9997e813136ef1e21a34 100644 (file)
@@ -132,9 +132,9 @@ sim_size (size)
 }
 
 void
-ARMul_ConsolePrint VPARAMS ((ARMul_State * state,
-                            const char * format,
-                            ...))
+ARMul_ConsolePrint (ARMul_State * state,
+                   const char * format,
+                   ...)
 {
   va_list ap;
 
@@ -678,7 +678,7 @@ sim_fetch_register (sd, rn, memory, length)
 
 #ifdef SIM_TARGET_SWITCHES
 
-static void sim_target_parse_arg_array PARAMS ((char **));
+static void sim_target_parse_arg_array (char **);
 
 typedef struct
 {
index cc37e4e7b10d18e260027bfde39fecbe12ae547c..815b59bcf08fa4722982050101d49c88f660f88f 100644 (file)
@@ -99,10 +99,10 @@ struct sim_state {
       bfin_trace_queue (cpu, oldpc, newpc, hwloop); \
   } while (0)
 
-extern void trace_register PARAMS ((SIM_DESC sd,
-                                   sim_cpu *cpu,
-                                   const char *fmt,
-                                   ...))
+extern void trace_register (SIM_DESC sd,
+                           sim_cpu *cpu,
+                           const char *fmt,
+                           ...)
      __attribute__((format (printf, 3, 4)));
 #define TRACE_REGISTER(cpu, fmt, ...) \
   do { \
index f833f98f79500d7c1602867654010c75e74a36fb..d7a046cab0c596c532b107e375d5f8c25d22bedc 100644 (file)
 /* ??? sim_cb_printf should be cb_printf, but until the callback support is
    broken out of the simulator directory, these are here to not require
    sim-utils.h.  */
-void sim_cb_printf PARAMS ((host_callback *, const char *, ...));
-void sim_cb_eprintf PARAMS ((host_callback *, const char *, ...));
+void sim_cb_printf (host_callback *, const char *, ...);
+void sim_cb_eprintf (host_callback *, const char *, ...);
 
 extern CB_TARGET_DEFS_MAP cb_init_syscall_map[];
 extern CB_TARGET_DEFS_MAP cb_init_errno_map[];
 extern CB_TARGET_DEFS_MAP cb_init_open_map[];
 
-extern int system PARAMS ((const char *));
-
-static int os_init PARAMS ((host_callback *));
-static int os_shutdown PARAMS ((host_callback *));
-static int os_unlink PARAMS ((host_callback *, const char *));
-static long os_time PARAMS ((host_callback *, long *));
-static int os_system PARAMS ((host_callback *, const char *));
-static int os_rename PARAMS ((host_callback *, const char *, const char *));
-static int os_write_stdout PARAMS ((host_callback *, const char *, int));
-static void os_flush_stdout PARAMS ((host_callback *));
-static int os_write_stderr PARAMS ((host_callback *, const char *, int));
-static void os_flush_stderr PARAMS ((host_callback *));
-static int os_write PARAMS ((host_callback *, int, const char *, int));
-static int os_read_stdin PARAMS ((host_callback *, char *, int));
-static int os_read PARAMS ((host_callback *, int, char *, int));
-static int os_open PARAMS ((host_callback *, const char *, int));
-static int os_lseek PARAMS ((host_callback *, int, long, int));
-static int os_isatty PARAMS ((host_callback *, int));
-static int os_get_errno PARAMS ((host_callback *));
-static int os_close PARAMS ((host_callback *, int));
-static void os_vprintf_filtered PARAMS ((host_callback *, const char *, va_list));
-static void os_evprintf_filtered PARAMS ((host_callback *, const char *, va_list));
-static void os_error PARAMS ((host_callback *, const char *, ...))
+extern int system (const char *);
+
+static int os_init (host_callback *);
+static int os_shutdown (host_callback *);
+static int os_unlink (host_callback *, const char *);
+static long os_time (host_callback *, long *);
+static int os_system (host_callback *, const char *);
+static int os_rename (host_callback *, const char *, const char *);
+static int os_write_stdout (host_callback *, const char *, int);
+static void os_flush_stdout (host_callback *);
+static int os_write_stderr (host_callback *, const char *, int);
+static void os_flush_stderr (host_callback *);
+static int os_write (host_callback *, int, const char *, int);
+static int os_read_stdin (host_callback *, char *, int);
+static int os_read (host_callback *, int, char *, int);
+static int os_open (host_callback *, const char *, int);
+static int os_lseek (host_callback *, int, long, int);
+static int os_isatty (host_callback *, int);
+static int os_get_errno (host_callback *);
+static int os_close (host_callback *, int);
+static void os_vprintf_filtered (host_callback *, const char *, va_list);
+static void os_evprintf_filtered (host_callback *, const char *, va_list);
+static void os_error (host_callback *, const char *, ...)
 #ifdef __GNUC__
   __attribute__ ((__noreturn__))
 #endif
   ;
-static int fdmap PARAMS ((host_callback *, int));
-static int fdbad PARAMS ((host_callback *, int));
-static int wrap PARAMS ((host_callback *, int));
+static int fdmap (host_callback *, int);
+static int fdbad (host_callback *, int);
+static int wrap (host_callback *, int);
 
 /* Set the callback copy of errno from what we see now.  */
 
index 2f2821576a2808174c4d55403585946f9e0d286e..6e2f85605b58d572959ee9e6ecc5ff568792df20 100644 (file)
@@ -299,7 +299,7 @@ cgen_trace_printf (SIM_CPU *cpu, char *fmt, ...)
 /* sprintf to a "stream" */
 
 int
-sim_disasm_sprintf VPARAMS ((SFILE *f, const char *format, ...))
+sim_disasm_sprintf (SFILE *f, const char *format, ...)
 {
 #ifndef __STDC__
   SFILE *f;
index 6f0007d1e8a0b574080cac2f35f9feb6ea060d8b..be10d49e6ba537bee4f889439d8b3aad44e9ff56 100644 (file)
   /* Parse the command line, extracting any target specific switches
      before the generic simulator code gets a chance to complain
      about them.  Returns the adjusted value of argc.  */
-int sim_target_parse_command_line PARAMS ((int, char **));
+int sim_target_parse_command_line (int, char **);
 
   /* Display a list of target specific switches supported by this
      target.  */
-void sim_target_display_usage PARAMS ((int help));
+void sim_target_display_usage (int help);
 
 #endif
 
@@ -40,7 +40,7 @@ void sim_target_display_usage PARAMS ((int help));
    This procedure does not take a SIM_DESC argument as it is
    used before sim_open. */
 
-void sim_set_callbacks PARAMS ((struct host_callback_struct *));
+void sim_set_callbacks (struct host_callback_struct *);
 
 
 /* Set the size of the simulator memory array.
@@ -49,7 +49,7 @@ void sim_set_callbacks PARAMS ((struct host_callback_struct *));
    This procedure does not take a SIM_DESC argument as it is
    used before sim_open. */
 
-void sim_size PARAMS ((int i));
+void sim_size (int i);
 
 
 /* Single-step simulator with tracing enabled.
@@ -60,7 +60,7 @@ void sim_size PARAMS ((int i));
    be continued using sim_trace() calls; ``1'' indicating that the
    simulation has finished. */
 
-int sim_trace PARAMS ((SIM_DESC sd));
+int sim_trace (SIM_DESC sd);
 
 
 /* Enable tracing.
@@ -70,7 +70,7 @@ int sim_trace PARAMS ((SIM_DESC sd));
    be continued using sim_trace() calls; ``1'' indicating that the
    simulation has finished. */
 
-void sim_set_trace PARAMS ((void));
+void sim_set_trace (void);
 
 
 /* Configure the size of the profile buffer.
@@ -79,7 +79,7 @@ void sim_set_trace PARAMS ((void));
    This procedure does not take a SIM_DESC argument as it is
    used before sim_open. */
 
-void sim_set_profile_size PARAMS ((int n));
+void sim_set_profile_size (int n);
 
 
 /* Kill the running program.
@@ -88,6 +88,6 @@ void sim_set_profile_size PARAMS ((int n));
    This procedure will be replaced as part of the introduction of
    multi-cpu simulators. */
 
-void sim_kill PARAMS ((SIM_DESC sd));
+void sim_kill (SIM_DESC sd);
 
 #endif
index 191b512d7e6742ea6412a32792cb14fb36a91cc0..cae2cb3339b51ba42a5b233d3a6d0d636766311a 100644 (file)
@@ -50,8 +50,8 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "run-sim.h"
 #include "version.h"
 
-static void usage PARAMS ((int help));
-static void print_version PARAMS ((void));
+static void usage (int help);
+static void print_version (void);
 extern int optind;
 extern char *optarg;
 
@@ -63,7 +63,7 @@ extern int getopt ();
 
 #ifdef NEED_UI_LOOP_HOOK
 /* Gdb foolery. This is only needed for gdb using a gui.  */
-int (*deprecated_ui_loop_hook) PARAMS ((int signo));
+int (*deprecated_ui_loop_hook) (int signo);
 #endif
 
 static SIM_DESC sd;
index 76880fc128a6b1db4d050577d8e2a1047f00ad9b..043c37bde1459cc3cd0f6b9dd2bd57cf1bf806c2 100644 (file)
@@ -244,7 +244,7 @@ typedef struct {
 } sim_state_base;
 
 /* Functions for allocating/freeing a sim_state.  */
-SIM_DESC sim_state_alloc PARAMS ((SIM_OPEN_KIND kind, host_callback *callback));
-void sim_state_free PARAMS ((SIM_DESC));
+SIM_DESC sim_state_alloc (SIM_OPEN_KIND kind, host_callback *callback);
+void sim_state_free (SIM_DESC);
 
 #endif /* SIM_BASE_H */
index e6e4e90a0093b180b4bed1cba6218deaf4106ee9..2e2b804bf63b0edbeef8bff5d1beba9abb337d58 100644 (file)
@@ -36,11 +36,11 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
 #include "gdb/callback.h"
 #include "gdb/remote-sim.h"
 
-static void eprintf PARAMS ((host_callback *, const char *, ...));
-static void xprintf PARAMS ((host_callback *, const char *, ...));
+static void eprintf (host_callback *, const char *, ...);
+static void xprintf (host_callback *, const char *, ...);
 static void report_transfer_performance
-  PARAMS ((host_callback *, unsigned long, time_t, time_t));
-static void xprintf_bfd_vma PARAMS ((host_callback *, bfd_vma));
+  (host_callback *, unsigned long, time_t, time_t);
+static void xprintf_bfd_vma (host_callback *, bfd_vma);
 
 /* Load program PROG into the simulator using the function DO_LOAD.
    If PROG_BFD is non-NULL, the file has already been opened.
@@ -169,7 +169,7 @@ sim_load_file (sd, myname, callback, prog, prog_bfd, verbose_p, lma_p, do_write)
 }
 
 static void
-xprintf VPARAMS ((host_callback *callback, const char *fmt, ...))
+xprintf (host_callback *callback, const char *fmt, ...)
 {
   va_list ap;
 
@@ -181,7 +181,7 @@ xprintf VPARAMS ((host_callback *callback, const char *fmt, ...))
 }
 
 static void
-eprintf VPARAMS ((host_callback *callback, const char *fmt, ...))
+eprintf (host_callback *callback, const char *fmt, ...)
 {
   va_list ap;
 
index eea7e99898140b576ef785fcc3f99b283e829d95..778f4c15443ad839eb0563179020592b75c4cef0 100644 (file)
@@ -33,10 +33,10 @@ along with this program.  If not, see <http://www.gnu.org/licenses/>.  */
    argument, NULL if optional and missing; arg#5 is nonzero if a
    command is being interpreted. */
 
-typedef SIM_RC (OPTION_HANDLER) PARAMS ((SIM_DESC, sim_cpu *, int, char *, int));
+typedef SIM_RC (OPTION_HANDLER) (SIM_DESC, sim_cpu *, int, char *, int);
 
 /* Declare option handlers with a macro so it's usable on k&r systems.  */
-#define DECLARE_OPTION_HANDLER(fn) SIM_RC fn PARAMS ((SIM_DESC, sim_cpu *, int, char *, int))
+#define DECLARE_OPTION_HANDLER(fn) SIM_RC fn (SIM_DESC, sim_cpu *, int, char *, int)
 
 typedef struct {
 
@@ -129,20 +129,20 @@ typedef struct option_list {
 /* Add a set of options to the simulator.
    CPU is the cpu the options apply to or NULL for all cpus.
    TABLE is an array of OPTIONS terminated by a NULL `opt.name' entry.  */
-SIM_RC sim_add_option_table PARAMS ((SIM_DESC sd, sim_cpu *cpu, const OPTION *table));
+SIM_RC sim_add_option_table (SIM_DESC sd, sim_cpu *cpu, const OPTION *table);
 
 /* Install handler for the standard options.  */
 MODULE_INSTALL_FN standard_install;
 
 /* Called by sim_open to parse the arguments.  */
-SIM_RC sim_parse_args PARAMS ((SIM_DESC sd, char **argv));
+SIM_RC sim_parse_args (SIM_DESC sd, char **argv);
 
 /* Print help messages for the options.  IS_COMMAND is non-zero when
    this function is called from the command line interpreter. */
-void sim_print_help PARAMS ((SIM_DESC sd, int is_command));
+void sim_print_help (SIM_DESC sd, int is_command);
 
 /* Try to parse the command as if it is an option, Only fail when
    totally unsuccessful */
-SIM_RC sim_args_command PARAMS ((SIM_DESC sd, char *cmd));
+SIM_RC sim_args_command (SIM_DESC sd, char *cmd);
 
 #endif /* SIM_OPTIONS_H */
index b91cfec48f0265107e872590a044c69ec5ea491f..bb56db7acf50032011bcf93e2bbeb79d8470db46 100644 (file)
@@ -1300,7 +1300,7 @@ trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc,
 }
 
 void
-trace_printf VPARAMS ((SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...))
+trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)
 {
 #if !defined __STDC__ && !defined ALMOST_STDC
   SIM_DESC sd;
@@ -1322,7 +1322,7 @@ trace_printf VPARAMS ((SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...))
 }
 
 void
-debug_printf VPARAMS ((sim_cpu *cpu, const char *fmt, ...))
+debug_printf (sim_cpu *cpu, const char *fmt, ...)
 {
 #if !defined __STDC__ && !defined ALMOST_STDC
   sim_cpu *cpu;
index f8b50fc77e6c76a839316a8a89e793aa03b0ce01..5fb58e1a5477445c017f860ecd8394f4a6afcc25 100644 (file)
@@ -228,24 +228,24 @@ typedef struct _trace_data {
 
 /* Prime the trace buffers ready for any trace output.
    Must be called prior to any other trace operation */
-extern void trace_prefix PARAMS ((SIM_DESC sd,
-                                 sim_cpu *cpu,
-                                 sim_cia cia,
-                                 address_word pc,
-                                 int print_linenum_p,
-                                 const char *file_name,
-                                 int line_nr,
-                                 const char *fmt,
-                                 ...))
+extern void trace_prefix (SIM_DESC sd,
+                         sim_cpu *cpu,
+                         sim_cia cia,
+                         address_word pc,
+                         int print_linenum_p,
+                         const char *file_name,
+                         int line_nr,
+                         const char *fmt,
+                         ...)
        __attribute__((format (printf, 8, 9)));
 
 /* Generic trace print, assumes trace_prefix() has been called */
 
-extern void trace_generic PARAMS ((SIM_DESC sd,
-                                  sim_cpu *cpu,
-                                  int trace_idx,
-                                  const char *fmt,
-                                  ...))
+extern void trace_generic (SIM_DESC sd,
+                          sim_cpu *cpu,
+                          int trace_idx,
+                          const char *fmt,
+                          ...)
      __attribute__((format (printf, 4, 5)));
 
 typedef enum {
@@ -262,149 +262,149 @@ typedef enum {
 /* Trace a varying number of word sized inputs/outputs.  trace_result*
    must be called to close the trace operation. */
 
-extern void save_data PARAMS ((SIM_DESC sd,
-                               TRACE_DATA *data,
-                               data_fmt fmt,
-                               long size,
-                               const void *buf));
-
-extern void trace_input0 PARAMS ((SIM_DESC sd,
-                                 sim_cpu *cpu,
-                                 int trace_idx));
+extern void save_data (SIM_DESC sd,
+                      TRACE_DATA *data,
+                      data_fmt fmt,
+                      long size,
+                      const void *buf);
 
-extern void trace_input_word1 PARAMS ((SIM_DESC sd,
-                                      sim_cpu *cpu,
-                                      int trace_idx,
-                                      unsigned_word d0));
+extern void trace_input0 (SIM_DESC sd,
+                         sim_cpu *cpu,
+                         int trace_idx);
 
-extern void trace_input_word2 PARAMS ((SIM_DESC sd,
-                                      sim_cpu *cpu,
-                                      int trace_idx,
-                                      unsigned_word d0,
-                                      unsigned_word d1));
+extern void trace_input_word1 (SIM_DESC sd,
+                              sim_cpu *cpu,
+                              int trace_idx,
+                              unsigned_word d0);
 
-extern void trace_input_word3 PARAMS ((SIM_DESC sd,
-                                      sim_cpu *cpu,
-                                      int trace_idx,
-                                      unsigned_word d0,
-                                      unsigned_word d1,
-                                      unsigned_word d2));
+extern void trace_input_word2 (SIM_DESC sd,
+                              sim_cpu *cpu,
+                              int trace_idx,
+                              unsigned_word d0,
+                              unsigned_word d1);
 
-extern void trace_input_word4 PARAMS ((SIM_DESC sd,
+extern void trace_input_word(SIM_DESC sd,
                                       sim_cpu *cpu,
                                       int trace_idx,
                                       unsigned_word d0,
                                       unsigned_word d1,
-                                      unsigned_word d2,
-                                      unsigned_word d3));
-
-extern void trace_input_addr1 PARAMS ((SIM_DESC sd,
-                                      sim_cpu *cpu,
-                                      int trace_idx,
-                                      address_word d0));
-
-extern void trace_input_bool1 PARAMS ((SIM_DESC sd,
-                                      sim_cpu *cpu,
-                                      int trace_idx,
-                                      int d0));
-
-extern void trace_input_fp1 PARAMS ((SIM_DESC sd,
-                                    sim_cpu *cpu,
-                                    int trace_idx,
-                                    fp_word f0));
-
-extern void trace_input_fp2 PARAMS ((SIM_DESC sd,
-                                    sim_cpu *cpu,
-                                    int trace_idx,
-                                    fp_word f0,
-                                    fp_word f1));
-
-extern void trace_input_fp3 PARAMS ((SIM_DESC sd,
-                                    sim_cpu *cpu,
-                                    int trace_idx,
-                                    fp_word f0,
-                                    fp_word f1,
-                                    fp_word f2));
-
-extern void trace_input_fpu1 PARAMS ((SIM_DESC sd,
-                                    sim_cpu *cpu,
-                                    int trace_idx,
-                                    struct _sim_fpu *f0));
-
-extern void trace_input_fpu2 PARAMS ((SIM_DESC sd,
-                                    sim_cpu *cpu,
-                                    int trace_idx,
-                                    struct _sim_fpu *f0,
-                                    struct _sim_fpu *f1));
-
-extern void trace_input_fpu3 PARAMS ((SIM_DESC sd,
-                                    sim_cpu *cpu,
-                                    int trace_idx,
-                                    struct _sim_fpu *f0,
-                                    struct _sim_fpu *f1,
-                                    struct _sim_fpu *f2));
+                                      unsigned_word d2);
+
+extern void trace_input_word4 (SIM_DESC sd,
+                              sim_cpu *cpu,
+                              int trace_idx,
+                              unsigned_word d0,
+                              unsigned_word d1,
+                              unsigned_word d2,
+                              unsigned_word d3);
+
+extern void trace_input_addr1 (SIM_DESC sd,
+                              sim_cpu *cpu,
+                              int trace_idx,
+                              address_word d0);
+
+extern void trace_input_bool1 (SIM_DESC sd,
+                              sim_cpu *cpu,
+                              int trace_idx,
+                              int d0);
+
+extern void trace_input_fp1 (SIM_DESC sd,
+                            sim_cpu *cpu,
+                            int trace_idx,
+                            fp_word f0);
+
+extern void trace_input_fp2 (SIM_DESC sd,
+                            sim_cpu *cpu,
+                            int trace_idx,
+                            fp_word f0,
+                            fp_word f1);
+
+extern void trace_input_fp3 (SIM_DESC sd,
+                            sim_cpu *cpu,
+                            int trace_idx,
+                            fp_word f0,
+                            fp_word f1,
+                            fp_word f2);
+
+extern void trace_input_fpu1 (SIM_DESC sd,
+                             sim_cpu *cpu,
+                             int trace_idx,
+                             struct _sim_fpu *f0);
+
+extern void trace_input_fpu2 (SIM_DESC sd,
+                             sim_cpu *cpu,
+                             int trace_idx,
+                             struct _sim_fpu *f0,
+                             struct _sim_fpu *f1);
+
+extern void trace_input_fpu3 (SIM_DESC sd,
+                             sim_cpu *cpu,
+                             int trace_idx,
+                             struct _sim_fpu *f0,
+                             struct _sim_fpu *f1,
+                             struct _sim_fpu *f2);
 
 /* Other trace_input{_<fmt><nr-inputs>} functions can go here */
 
-extern void trace_result0 PARAMS ((SIM_DESC sd,
-                                  sim_cpu *cpu,
-                                  int trace_idx));
-
-extern void trace_result_word1 PARAMS ((SIM_DESC sd,
-                                       sim_cpu *cpu,
-                                       int trace_idx,
-                                       unsigned_word r0));
-
-extern void trace_result_word2 PARAMS ((SIM_DESC sd,
-                                       sim_cpu *cpu,
-                                       int trace_idx,
-                                       unsigned_word r0,
-                                       unsigned_word r1));
+extern void trace_result0 (SIM_DESC sd,
+                          sim_cpu *cpu,
+                          int trace_idx);
+
+extern void trace_result_word1 (SIM_DESC sd,
+                               sim_cpu *cpu,
+                               int trace_idx,
+                               unsigned_word r0);
+
+extern void trace_result_word2 (SIM_DESC sd,
+                               sim_cpu *cpu,
+                               int trace_idx,
+                               unsigned_word r0,
+                               unsigned_word r1);
+
+extern void trace_result_word4 (SIM_DESC sd,
+                               sim_cpu *cpu,
+                               int trace_idx,
+                               unsigned_word r0,
+                               unsigned_word r1,
+                               unsigned_word r2,
+                               unsigned_word r3);
+
+extern void trace_result_bool1 (SIM_DESC sd,
+                               sim_cpu *cpu,
+                               int trace_idx,
+                               int r0);
+
+extern void trace_result_addr1 (SIM_DESC sd,
+                               sim_cpu *cpu,
+                               int trace_idx,
+                               address_word r0);
+
+extern void trace_result_fp1 (SIM_DESC sd,
+                             sim_cpu *cpu,
+                             int trace_idx,
+                             fp_word f0);
+
+extern void trace_result_fp2 (SIM_DESC sd,
+                             sim_cpu *cpu,
+                             int trace_idx,
+                             fp_word f0,
+                             fp_word f1);
+
+extern void trace_result_fpu1 (SIM_DESC sd,
+                              sim_cpu *cpu,
+                              int trace_idx,
+                              struct _sim_fpu *f0);
+
+extern void trace_result_string1 (SIM_DESC sd,
+                                 sim_cpu *cpu,
+                                 int trace_idx,
+                                 char *str0);
 
-extern void trace_result_word4 PARAMS ((SIM_DESC sd,
+extern void trace_result_word1_string1 (SIM_DESC sd,
                                        sim_cpu *cpu,
                                        int trace_idx,
                                        unsigned_word r0,
-                                       unsigned_word r1,
-                                       unsigned_word r2,
-                                       unsigned_word r3));
-
-extern void trace_result_bool1 PARAMS ((SIM_DESC sd,
-                                       sim_cpu *cpu,
-                                       int trace_idx,
-                                       int r0));
-
-extern void trace_result_addr1 PARAMS ((SIM_DESC sd,
-                                       sim_cpu *cpu,
-                                       int trace_idx,
-                                       address_word r0));
-
-extern void trace_result_fp1 PARAMS ((SIM_DESC sd,
-                                     sim_cpu *cpu,
-                                     int trace_idx,
-                                     fp_word f0));
-
-extern void trace_result_fp2 PARAMS ((SIM_DESC sd,
-                                     sim_cpu *cpu,
-                                     int trace_idx,
-                                     fp_word f0,
-                                     fp_word f1));
-
-extern void trace_result_fpu1 PARAMS ((SIM_DESC sd,
-                                      sim_cpu *cpu,
-                                      int trace_idx,
-                                      struct _sim_fpu *f0));
-
-extern void trace_result_string1 PARAMS ((SIM_DESC sd,
-                                         sim_cpu *cpu,
-                                         int trace_idx,
-                                         char *str0));
-
-extern void trace_result_word1_string1 PARAMS ((SIM_DESC sd,
-                                               sim_cpu *cpu,
-                                               int trace_idx,
-                                               unsigned_word r0,
-                                               char *s0));
+                                       char *s0);
 
 /* Other trace_result{_<type><nr-results>} */
 
@@ -555,21 +555,21 @@ do { \
 \f
 /* The function trace_one_insn has been replaced by the function pair
    trace_prefix() + trace_generic() */
-extern void trace_one_insn PARAMS ((SIM_DESC sd,
-                                   sim_cpu * cpu,
-                                   address_word cia,
-                                   int print_linenum_p,
-                                   const char *file_name,
-                                   int line_nr,
-                                   const char *unit,
-                                   const char *fmt,
-                                   ...))
+extern void trace_one_insn (SIM_DESC sd,
+                           sim_cpu * cpu,
+                           address_word cia,
+                           int print_linenum_p,
+                           const char *file_name,
+                           int line_nr,
+                           const char *unit,
+                           const char *fmt,
+                           ...)
      __attribute__((format (printf, 8, 9)));
 
-extern void trace_printf PARAMS ((SIM_DESC, sim_cpu *, const char *, ...))
+extern void trace_printf (SIM_DESC, sim_cpu *, const char *, ...)
      __attribute__((format (printf, 3, 4)));
 
-extern void trace_vprintf PARAMS ((SIM_DESC, sim_cpu *, const char *, va_list));
+extern void trace_vprintf (SIM_DESC, sim_cpu *, const char *, va_list);
 
 /* Debug support.
    This is included here because there isn't enough of it to justify
@@ -583,7 +583,7 @@ extern void trace_vprintf PARAMS ((SIM_DESC, sim_cpu *, const char *, va_list));
 /* Non-zero if "--debug-insn" specified.  */
 #define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX)
 
-extern void debug_printf PARAMS ((sim_cpu *, const char *, ...))
+extern void debug_printf (sim_cpu *, const char *, ...)
      __attribute__((format (printf, 2, 3)));
 
 #endif /* SIM_TRACE_H */
index 3f61e500d34fbe2387409c110cd089fbb18a72b2..ddb19abe2523e6a504f93e371e3f306c62a44eec 100644 (file)
@@ -60,8 +60,8 @@ SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name,
    write the program sections at LMA interpreted as a virtual address.
    This is still accommodated for backward compatibility reasons. */
 
-typedef int sim_write_fn PARAMS ((SIM_DESC sd, SIM_ADDR mem,
-                                     const unsigned char *buf, int length));
+typedef int sim_write_fn (SIM_DESC sd, SIM_ADDR mem,
+                         const unsigned char *buf, int length);
 struct bfd *sim_load_file (SIM_DESC sd, const char *myname,
                           host_callback *callback, char *prog,
                           struct bfd *prog_bfd, int verbose_p,
index 257b6278be42784bc4d70743135b7b9df658210f..68e1261107d0876e23d17f5a2e933a00bd5aa838 100644 (file)
@@ -421,8 +421,8 @@ enum
 #define SEXT32(x)      ((((x)&0xffffffff)^(~0x7fffffff))+0x80000000)
 
 extern uint8 *dmem_addr (uint32 offset);
-extern uint8 *imem_addr PARAMS ((uint32));
-extern bfd_vma decode_pc PARAMS ((void));
+extern uint8 *imem_addr (uint32);
+extern bfd_vma decode_pc (void);
 
 #define        RB(x)   (*(dmem_addr(x)))
 #define SB(addr,data)  ( RB(addr) = (data & 0xff))
@@ -433,12 +433,12 @@ extern bfd_vma decode_pc PARAMS ((void));
 #undef ENDIAN_INLINE
 
 #else
-extern uint32 get_longword PARAMS ((uint8 *));
-extern uint16 get_word PARAMS ((uint8 *));
-extern int64 get_longlong PARAMS ((uint8 *));
-extern void write_word PARAMS ((uint8 *addr, uint16 data));
-extern void write_longword PARAMS ((uint8 *addr, uint32 data));
-extern void write_longlong PARAMS ((uint8 *addr, int64 data));
+extern uint32 get_longword (uint8 *);
+extern uint16 get_word (uint8 *);
+extern int64 get_longlong (uint8 *);
+extern void write_word (uint8 *addr, uint16 data);
+extern void write_longword (uint8 *addr, uint32 data);
+extern void write_longlong (uint8 *addr, int64 data);
 #endif
 
 #define SW(addr,data)          write_word(dmem_addr(addr),data)
index f90dcb11644b2dce1d857ef185c65e661952be5e..67f95ab803baa1e829852c501e8eedecd4d06bc8 100644 (file)
@@ -25,9 +25,9 @@
 #include "ansidecl.h"
 #include "opcode/cr16.h"
 
-static void write_header PARAMS ((void));
-static void write_opcodes PARAMS ((void));
-static void write_template PARAMS ((void));
+static void write_header (void);
+static void write_opcodes (void);
+static void write_template (void);
 
 int
 main (int argc, char *argv[])
@@ -53,7 +53,7 @@ write_header ()
   /* Loop over instruction table until a full match is found.  */
   for ( ; i < NUMOPCODES; i++)
   {
-   printf("void OP_%X_%X PARAMS ((void));\t\t/* %s */\n",cr16_instruction[i].match, (32 - cr16_instruction[i].match_bits), cr16_instruction[i].mnemonic);
+   printf("void OP_%X_%X (void);\t\t/* %s */\n",cr16_instruction[i].match, (32 - cr16_instruction[i].match_bits), cr16_instruction[i].mnemonic);
   }
 }
 
index 600696747a7f8ec02d80f4ea097bb3541c8f84eb..2ef14cb4496a0e024bfd8bf953b6e4ef88da4a52 100644 (file)
@@ -52,12 +52,12 @@ asection *text;
 bfd_vma text_start;
 bfd_vma text_end;
 
-static struct hash_entry *lookup_hash PARAMS ((uint64 ins, int size));
-static void get_operands PARAMS ((operand_desc *s, uint64 mcode, int isize, int nops));
-static int do_run PARAMS ((uint64 mc));
-static char *add_commas PARAMS ((char *buf, int sizeof_buf, unsigned long value));
-extern void sim_set_profile PARAMS ((int n));
-extern void sim_set_profile_size PARAMS ((int n));
+static struct hash_entry *lookup_hash (uint64 ins, int size);
+static void get_operands (operand_desc *s, uint64 mcode, int isize, int nops);
+static int do_run (uint64 mc);
+static char *add_commas (char *buf, int sizeof_buf, unsigned long value);
+extern void sim_set_profile (int n);
+extern void sim_set_profile_size (int n);
 static INLINE uint8 *map_memory (unsigned phys_addr);
 
 #ifdef NEED_UI_LOOP_HOOK
@@ -68,7 +68,7 @@ static INLINE uint8 *map_memory (unsigned phys_addr);
 static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
 
 /* Actual hook to call to run through gdb's gui event loop */
-extern int (*deprecated_ui_loop_hook) PARAMS ((int signo));
+extern int (*deprecated_ui_loop_hook) (int signo);
 #endif /* NEED_UI_LOOP_HOOK */
 
 #ifndef INLINE
index 55befb519274677b1e131444fe457f06cf64a6c6..2fa60c5a6f200ae6f7e67de5e816e2c7ccf9d97c 100644 (file)
@@ -189,10 +189,10 @@ move_to_cr (int cr, creg_t mask, creg_t val, int psw_hw_p)
 }
 
 #ifdef DEBUG
-static void trace_input_func PARAMS ((char *name,
-                                     enum op_types in1,
-                                     enum op_types in2,
-                                     enum op_types in3));
+static void trace_input_func (char *name,
+                             enum op_types in1,
+                             enum op_types in2,
+                             enum op_types in3);
 
 #define trace_input(name, in1, in2, in3) do { if (cr16_debug) trace_input_func (name, in1, in2, in3); } while (0)
 
index 09e0631126fb4c49acb2ab5769812e6082d198be..c541b41f72acfa62ada14a2de5d26249a9a769e2 100644 (file)
@@ -442,8 +442,8 @@ do \
 while (0)
 
 extern uint8 *dmem_addr (uint16 offset);
-extern uint8 *imem_addr PARAMS ((uint32));
-extern bfd_vma decode_pc PARAMS ((void));
+extern uint8 *imem_addr (uint32);
+extern bfd_vma decode_pc (void);
 
 #define        RB(x)   (*(dmem_addr(x)))
 #define SB(addr,data)  ( RB(addr) = (data & 0xff))
@@ -454,12 +454,12 @@ extern bfd_vma decode_pc PARAMS ((void));
 #undef ENDIAN_INLINE
 
 #else
-extern uint32 get_longword PARAMS ((uint8 *));
-extern uint16 get_word PARAMS ((uint8 *));
-extern int64 get_longlong PARAMS ((uint8 *));
-extern void write_word PARAMS ((uint8 *addr, uint16 data));
-extern void write_longword PARAMS ((uint8 *addr, uint32 data));
-extern void write_longlong PARAMS ((uint8 *addr, int64 data));
+extern uint32 get_longword (uint8 *);
+extern uint16 get_word (uint8 *);
+extern int64 get_longlong (uint8 *);
+extern void write_word (uint8 *addr, uint16 data);
+extern void write_longword (uint8 *addr, uint32 data);
+extern void write_longlong (uint8 *addr, int64 data);
 #endif
 
 #define SW(addr,data)          write_word(dmem_addr(addr),data)
index b66297d0146d7f4a67675243e66ccc2f34167a0b..c0a748ff566ec16fffb2be7bc786c1bdf9010f01 100644 (file)
@@ -5,9 +5,9 @@
 #include "ansidecl.h"
 #include "opcode/d10v.h"
 
-static void write_header PARAMS ((void));
-static void write_opcodes PARAMS ((void));
-static void write_template PARAMS ((void));
+static void write_header (void);
+static void write_opcodes (void);
+static void write_template (void);
 
 int
 main (argc, argv)
@@ -31,7 +31,7 @@ write_header ()
 
   for (opcode = (struct d10v_opcode *)d10v_opcodes; opcode->name; opcode++)
     if (opcode->format != OPCODE_FAKE)
-      printf("void OP_%X PARAMS ((void));\t\t/* %s */\n",opcode->opcode, opcode->name);
+      printf("void OP_%X (void);\t\t/* %s */\n",opcode->opcode, opcode->name);
 }
 
 
index 23db647a33c5e8f8eedb420dc8d96cf0cc22829c..a0b334ddb5125b44ec553e65e5ed7aa4730f51d8 100644 (file)
@@ -43,15 +43,15 @@ asection *text;
 bfd_vma text_start;
 bfd_vma text_end;
 
-static long hash PARAMS ((long insn, int format));
-static struct hash_entry *lookup_hash PARAMS ((uint32 ins, int size));
-static void get_operands PARAMS ((struct simops *s, uint32 ins));
-static void do_long PARAMS ((uint32 ins));
-static void do_2_short PARAMS ((uint16 ins1, uint16 ins2, enum _leftright leftright));
-static void do_parallel PARAMS ((uint16 ins1, uint16 ins2));
-static char *add_commas PARAMS ((char *buf, int sizeof_buf, unsigned long value));
-extern void sim_set_profile PARAMS ((int n));
-extern void sim_set_profile_size PARAMS ((int n));
+static long hash (long insn, int format);
+static struct hash_entry *lookup_hash (uint32 ins, int size);
+static void get_operands (struct simops *s, uint32 ins);
+static void do_long (uint32 ins);
+static void do_2_short (uint16 ins1, uint16 ins2, enum _leftright leftright);
+static void do_parallel (uint16 ins1, uint16 ins2);
+static char *add_commas (char *buf, int sizeof_buf, unsigned long value);
+extern void sim_set_profile (int n);
+extern void sim_set_profile_size (int n);
 static INLINE uint8 *map_memory (unsigned phys_addr);
 
 #ifdef NEED_UI_LOOP_HOOK
@@ -62,7 +62,7 @@ static INLINE uint8 *map_memory (unsigned phys_addr);
 static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL;
 
 /* Actual hook to call to run through gdb's gui event loop */
-extern int (*deprecated_ui_loop_hook) PARAMS ((int signo));
+extern int (*deprecated_ui_loop_hook) (int signo);
 #endif /* NEED_UI_LOOP_HOOK */
 
 #ifndef INLINE
index 0b58505762214581f6794f1e539e34ab5b24e2fd..ed3e570762eacdfde86cc038f93eee7c43d22bed 100644 (file)
@@ -122,10 +122,10 @@ move_to_cr (int cr, reg_t mask, reg_t val, int psw_hw_p)
 }
 
 #ifdef DEBUG
-static void trace_input_func PARAMS ((char *name,
-                                     enum op_types in1,
-                                     enum op_types in2,
-                                     enum op_types in3));
+static void trace_input_func (char *name,
+                             enum op_types in1,
+                             enum op_types in2,
+                             enum op_types in3);
 
 #define trace_input(name, in1, in2, in3) do { if (d10v_debug) trace_input_func (name, in1, in2, in3); } while (0)
 
index 3a5bd11561ed1f083e68783271e91efdde56b8d4..4d4177e8fd454d47128c330fcdcbf6b18218558c 100644 (file)
@@ -256,52 +256,52 @@ int erareg;
 
 /* Forward declarations */
 
-static void    decode_ersr PARAMS ((void));
+static void    decode_ersr (void);
 #ifdef ERRINJ
-static void    iucomperr PARAMS ((void));
+static void    iucomperr (void);
 #endif
-static void    mecparerror PARAMS ((void));
-static void    decode_memcfg PARAMS ((void));
-static void    decode_wcr PARAMS ((void));
-static void    decode_mcr PARAMS ((void));
-static void    close_port PARAMS ((void));
-static void    mec_reset PARAMS ((void));
-static void    mec_intack PARAMS ((int32 level));
-static void    chk_irq PARAMS ((void));
-static void    mec_irq PARAMS ((int32 level));
-static void    set_sfsr PARAMS ((uint32 fault, uint32 addr,
-                                 uint32 asi, uint32 read));
-static int32   mec_read PARAMS ((uint32 addr, uint32 asi, uint32 *data));
-static int     mec_write PARAMS ((uint32 addr, uint32 data));
-static void    port_init PARAMS ((void));
-static uint32  read_uart PARAMS ((uint32 addr));
-static void    write_uart PARAMS ((uint32 addr, uint32 data));
-static void    flush_uart PARAMS ((void));
-static void    uarta_tx PARAMS ((void));
-static void    uartb_tx PARAMS ((void));
-static void    uart_rx PARAMS ((caddr_t arg));
-static void    uart_intr PARAMS ((caddr_t arg));
-static void    uart_irq_start PARAMS ((void));
-static void    wdog_intr PARAMS ((caddr_t arg));
-static void    wdog_start PARAMS ((void));
-static void    rtc_intr PARAMS ((caddr_t arg));
-static void    rtc_start PARAMS ((void));
-static uint32  rtc_counter_read PARAMS ((void));
-static void    rtc_scaler_set PARAMS ((uint32 val));
-static void    rtc_reload_set PARAMS ((uint32 val));
-static void    gpt_intr PARAMS ((caddr_t arg));
-static void    gpt_start PARAMS ((void));
-static uint32  gpt_counter_read PARAMS ((void));
-static void    gpt_scaler_set PARAMS ((uint32 val));
-static void    gpt_reload_set PARAMS ((uint32 val));
-static void    timer_ctrl PARAMS ((uint32 val));
+static void    mecparerror (void);
+static void    decode_memcfg (void);
+static void    decode_wcr (void);
+static void    decode_mcr (void);
+static void    close_port (void);
+static void    mec_reset (void);
+static void    mec_intack (int32 level);
+static void    chk_irq (void);
+static void    mec_irq (int32 level);
+static void    set_sfsr (uint32 fault, uint32 addr,
+                         uint32 asi, uint32 read);
+static int32   mec_read (uint32 addr, uint32 asi, uint32 *data);
+static int     mec_write (uint32 addr, uint32 data);
+static void    port_init (void);
+static uint32  read_uart (uint32 addr);
+static void    write_uart (uint32 addr, uint32 data);
+static void    flush_uart (void);
+static void    uarta_tx (void);
+static void    uartb_tx (void);
+static void    uart_rx (caddr_t arg);
+static void    uart_intr (caddr_t arg);
+static void    uart_irq_start (void);
+static void    wdog_intr (caddr_t arg);
+static void    wdog_start (void);
+static void    rtc_intr (caddr_t arg);
+static void    rtc_start (void);
+static uint32  rtc_counter_read (void);
+static void    rtc_scaler_set (uint32 val);
+static void    rtc_reload_set (uint32 val);
+static void    gpt_intr (caddr_t arg);
+static void    gpt_start (void);
+static uint32  gpt_counter_read (void);
+static void    gpt_scaler_set (uint32 val);
+static void    gpt_reload_set (uint32 val);
+static void    timer_ctrl (uint32 val);
 static unsigned char *
-               get_mem_ptr PARAMS ((uint32 addr, uint32 size));
+               get_mem_ptr (uint32 addr, uint32 size);
 
-static void    fetch_bytes PARAMS ((int asi, unsigned char *mem,
-                                    uint32 *data, int sz));
+static void    fetch_bytes (int asi, unsigned char *mem,
+                            uint32 *data, int sz);
 
-static void    store_bytes PARAMS ((unsigned char *mem, uint32 *data, int sz));
+static void    store_bytes (unsigned char *mem, uint32 *data, int sz);
 
 extern int     ext_irl;
 
index 4fd2453635dff7a953bce483825e396562b2431c..dc86ba3b8a73cbc9c06461b0743224e3fc35becd 100644 (file)
@@ -220,14 +220,14 @@ int ext_irl = 0;
 
 /* Forward declarations */
 
-static uint32  sub_cc PARAMS ((uint32 psr, int32 operand1, int32 operand2,
-                               int32 result));
-static uint32  add_cc PARAMS ((uint32 psr, int32 operand1, int32 operand2,
-                               int32 result));
-static void    log_cc PARAMS ((int32 result, struct pstate *sregs));
-static int     fpexec PARAMS ((uint32 op3, uint32 rd, uint32 rs1, uint32 rs2,
-                               struct pstate *sregs));
-static int     chk_asi PARAMS ((struct pstate *sregs, uint32 *asi, uint32 op3));
+static uint32  sub_cc (uint32 psr, int32 operand1, int32 operand2,
+                       int32 result);
+static uint32  add_cc (uint32 psr, int32 operand1, int32 operand2,
+                       int32 result);
+static void    log_cc (int32 result, struct pstate *sregs);
+static int     fpexec (uint32 op3, uint32 rd, uint32 rs1, uint32 rs2,
+                       struct pstate *sregs);
+static int     chk_asi (struct pstate *sregs, uint32 *asi, uint32 op3);
 
 
 extern struct estate ebase;
index 1b8f0fc76cfe89c2f4b5b08cee8c8108b3e79000..598b7cce0daf3cc126a55ac2c2c19bcd3f1b5162 100644 (file)
@@ -36,9 +36,9 @@
 
 /* Forward declarations */
 
-extern uint32  _get_sw PARAMS ((void));
-extern uint32  _get_cw PARAMS ((void));
-static void    __setfpucw PARAMS ((unsigned short fpu_control));
+extern uint32  _get_sw (void);
+extern uint32  _get_cw (void);
+static void    __setfpucw (unsigned short fpu_control);
 
 /* This host dependent routine should return the accrued exceptions */
 int
index 881f26c8af0412f9fa9796aac91474c7af6319ef..d001c58b8b2f2ed859d4040c28eac7770af4c223 100644 (file)
@@ -63,16 +63,16 @@ uint32              errmec = 0;
 
 /* Forward declarations */
 
-static int     batch PARAMS ((struct pstate *sregs, char *fname));
-static void    set_rega PARAMS ((struct pstate *sregs, char *reg, uint32 rval));
-static void    disp_reg PARAMS ((struct pstate *sregs, char *reg));
-static uint32  limcalc PARAMS ((float32 freq));
-static void    int_handler PARAMS ((int32 sig));
-static void    init_event PARAMS ((void));
-static int     disp_fpu PARAMS ((struct pstate  *sregs));
-static void    disp_regs PARAMS ((struct pstate  *sregs, int cwp));
-static void    disp_ctrl PARAMS ((struct pstate *sregs));
-static void    disp_mem PARAMS ((uint32 addr, uint32 len));
+static int     batch (struct pstate *sregs, char *fname);
+static void    set_rega (struct pstate *sregs, char *reg, uint32 rval);
+static void    disp_reg (struct pstate *sregs, char *reg);
+static uint32  limcalc (float32 freq);
+static void    int_handler (int32 sig);
+static void    init_event (void);
+static int     disp_fpu (struct pstate  *sregs);
+static void    disp_regs (struct pstate  *sregs, int cwp);
+static void    disp_ctrl (struct pstate *sregs);
+static void    disp_mem (uint32 addr, uint32 len);
 
 static int 
 batch(sregs, fname)
index f40cd65de0c4396c8c44cb1bfc9814b8ce18a398..89e6f022ccd30911fcfd56d9159029c8c569ef63 100644 (file)
@@ -41,10 +41,10 @@ typedef struct {
   char *data;
 } HIST_ENTRY;
 
-extern char *  readline PARAMS ((char *prompt));
-extern void    using_history PARAMS ((void));
-extern void    add_history PARAMS ((char *string));
-extern HIST_ENTRY *remove_history PARAMS ((int which));
+extern char *  readline (char *prompt);
+extern void    using_history (void);
+extern void    add_history (char *string);
+extern HIST_ENTRY *remove_history (int which);
 
 
 
index a1cf00b8e66f020aaa6c12cf886f5a8500aa9c62..f49d45dfd672c3058786739401d7ef3705be8a0b 100644 (file)
@@ -159,61 +159,61 @@ struct irqcell {
 /* Prototypes  */
 
 /* erc32.c */
-extern void    init_sim PARAMS ((void));
-extern void    reset PARAMS ((void));
-extern void    error_mode PARAMS ((uint32 pc));
-extern void    sim_halt PARAMS ((void));
-extern void    exit_sim PARAMS ((void));
-extern void    init_stdio PARAMS ((void));
-extern void    restore_stdio PARAMS ((void));
-extern int     memory_read PARAMS ((int32 asi, uint32 addr, uint32 *data,
-                                    int32 sz, int32 *ws));
-extern int     memory_write PARAMS ((int32 asi, uint32 addr, uint32 *data,
-                                   int32 sz, int32 *ws));
-extern int     sis_memory_write PARAMS ((uint32 addr,
-                                   const unsigned char *data, uint32 length));
-extern int     sis_memory_read PARAMS ((uint32 addr, char *data,
-                                        uint32 length));
+extern void    init_sim (void);
+extern void    reset (void);
+extern void    error_mode (uint32 pc);
+extern void    sim_halt (void);
+extern void    exit_sim (void);
+extern void    init_stdio (void);
+extern void    restore_stdio (void);
+extern int     memory_read (int32 asi, uint32 addr, uint32 *data,
+                            int32 sz, int32 *ws);
+extern int     memory_write (int32 asi, uint32 addr, uint32 *data,
+                             int32 sz, int32 *ws);
+extern int     sis_memory_write (uint32 addr,
+                                 const unsigned char *data, uint32 length);
+extern int     sis_memory_read (uint32 addr, char *data,
+                                uint32 length);
 
 /* func.c */
-extern void    set_regi PARAMS ((struct pstate *sregs, int32 reg,
-                                 uint32 rval));
-extern void    get_regi PARAMS ((struct pstate *sregs, int32 reg, char *buf));
-extern int     exec_cmd PARAMS ((struct pstate *sregs, char *cmd));
-extern void    reset_stat PARAMS ((struct pstate  *sregs));
-extern void    show_stat PARAMS ((struct pstate  *sregs));
-extern void    init_bpt PARAMS ((struct pstate  *sregs));
-extern void    init_signals PARAMS ((void));
+extern void    set_regi (struct pstate *sregs, int32 reg,
+                         uint32 rval);
+extern void    get_regi (struct pstate *sregs, int32 reg, char *buf);
+extern int     exec_cmd (struct pstate *sregs, char *cmd);
+extern void    reset_stat (struct pstate  *sregs);
+extern void    show_stat (struct pstate  *sregs);
+extern void    init_bpt (struct pstate  *sregs);
+extern void    init_signals (void);
 
 struct disassemble_info;
-extern void    dis_mem PARAMS ((uint32 addr, uint32 len,
-                                struct disassemble_info *info));
-extern void    event PARAMS ((void (*cfunc) (), int32 arg, uint64 delta));
-extern void    set_int PARAMS ((int32 level, void (*callback) (), int32 arg));
-extern void    advance_time PARAMS ((struct pstate  *sregs));
-extern uint32  now PARAMS ((void));
-extern int     wait_for_irq PARAMS ((void));
-extern int     check_bpt PARAMS ((struct pstate *sregs));
-extern void    reset_all PARAMS ((void));
-extern void    sys_reset PARAMS ((void));
-extern void    sys_halt PARAMS ((void));
-extern int     bfd_load PARAMS ((char *fname));
+extern void    dis_mem (uint32 addr, uint32 len,
+                        struct disassemble_info *info);
+extern void    event (void (*cfunc) (), int32 arg, uint64 delta);
+extern void    set_int (int32 level, void (*callback) (), int32 arg);
+extern void    advance_time (struct pstate  *sregs);
+extern uint32  now (void);
+extern int     wait_for_irq (void);
+extern int     check_bpt (struct pstate *sregs);
+extern void    reset_all (void);
+extern void    sys_reset (void);
+extern void    sys_halt (void);
+extern int     bfd_load (char *fname);
 
 /* exec.c */
-extern int     dispatch_instruction PARAMS ((struct pstate *sregs));
-extern int     execute_trap PARAMS ((struct pstate *sregs));
-extern int     check_interrupts PARAMS ((struct pstate  *sregs));
-extern void    init_regs PARAMS ((struct pstate *sregs));
+extern int     dispatch_instruction (struct pstate *sregs);
+extern int     execute_trap (struct pstate *sregs);
+extern int     check_interrupts (struct pstate  *sregs);
+extern void    init_regs (struct pstate *sregs);
 
 /* interf.c */
-extern int     run_sim PARAMS ((struct pstate *sregs,
-                                uint64 icount, int dis));
+extern int     run_sim (struct pstate *sregs,
+                        uint64 icount, int dis);
 
 /* float.c */
-extern int     get_accex PARAMS ((void));
-extern void    clear_accex PARAMS ((void));
-extern void    set_fsr PARAMS ((uint32 fsr));
+extern int     get_accex (void);
+extern void    clear_accex (void);
+extern void    set_fsr (uint32 fsr);
 
 /* help.c */
-extern void    usage PARAMS ((void));
-extern void    gen_help PARAMS ((void));
+extern void    usage (void);
+extern void    gen_help (void);
index 032570a9045c51c410c45f151a68061f592c6899..2491fcd06b440ecc92b51dd067d62f6df7a7ab4a 100644 (file)
@@ -65,12 +65,8 @@ code on the hardware.
 #include "gdb/callback.h"   /* GDB simulator callback interface */
 #include "gdb/remote-sim.h" /* GDB simulator interface */
 
-#ifndef PARAMS
-#define PARAMS(x) 
-#endif
-
-char* pr_addr PARAMS ((SIM_ADDR addr));
-char* pr_uword64 PARAMS ((uword64 addr));
+char* pr_addr (SIM_ADDR addr);
+char* pr_uword64 (uword64 addr);
 
 
 /* Within interp.c we refer to the sim_state and sim_cpu directly. */
@@ -98,7 +94,7 @@ char* pr_uword64 PARAMS ((uword64 addr));
 /*-- GDB simulator interface ------------------------------------------------*/
 /*---------------------------------------------------------------------------*/
 
-static void ColdReset PARAMS((SIM_DESC sd));
+static void ColdReset (SIM_DESC sd);
 
 /*---------------------------------------------------------------------------*/
 
@@ -164,7 +160,7 @@ static SIM_RC sim_firmware_command (SIM_DESC sd, char* arg);
 #if defined(TRACE)
 static char *tracefile = "trace.din"; /* default filename for trace log */
 FILE *tracefh = NULL;
-static void open_trace PARAMS((SIM_DESC sd));
+static void open_trace (SIM_DESC sd);
 #endif /* TRACE */
 
 static const char * get_insn_name (sim_cpu *, int);
index a0a029447acbb13a3df07fd2c62165b1889cc284..ae8f0cc9ad04719867f5aba29d1ab0df64773955 100644 (file)
@@ -475,7 +475,7 @@ struct _sim_cpu {
 
 /* MIPS specific simulator watch config */
 
-void watch_options_install PARAMS ((SIM_DESC sd));
+void watch_options_install (SIM_DESC sd);
 
 struct swatch {
   sim_event *pc;
@@ -693,10 +693,10 @@ void signal_exception (SIM_DESC sd, sim_cpu *cpu, address_word cia, int exceptio
 /* XXX FIXME: For now, assume that FPU (cp1) is always usable.  */
 #define COP_Usable(coproc_num)         (coproc_num == 1)
 
-void cop_lw  PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, unsigned int memword));
-void cop_ld  PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, uword64 memword));
-unsigned int cop_sw PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg));
-uword64 cop_sd PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg));
+void cop_lw  (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, unsigned int memword);
+void cop_ld  (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, uword64 memword);
+unsigned int cop_sw (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg);
+uword64 cop_sd (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg);
 
 #define COP_LW(coproc_num,coproc_reg,memword) \
 cop_lw (SD, CPU, cia, coproc_num, coproc_reg, memword)
@@ -708,7 +708,7 @@ cop_sw (SD, CPU, cia, coproc_num, coproc_reg)
 cop_sd (SD, CPU, cia, coproc_num, coproc_reg)
 
 
-void decode_coproc PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int instruction));
+void decode_coproc (SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int instruction);
 #define DecodeCoproc(instruction) \
 decode_coproc (SD, CPU, cia, (instruction))
 
@@ -940,27 +940,27 @@ unsigned64 mdmx_shuffle (SIM_STATE, int, unsigned64, unsigned64);
 #define PSIZE (WITH_TARGET_ADDRESS_BITSIZE)
 
 
-INLINE_SIM_MAIN (int) address_translation PARAMS ((SIM_DESC sd, sim_cpu *, address_word cia, address_word vAddr, int IorD, int LorS, address_word *pAddr, int *CCA, int raw));
+INLINE_SIM_MAIN (int) address_translation (SIM_DESC sd, sim_cpu *, address_word cia, address_word vAddr, int IorD, int LorS, address_word *pAddr, int *CCA, int raw);
 #define AddressTranslation(vAddr,IorD,LorS,pAddr,CCA,host,raw) \
 address_translation (SD, CPU, cia, vAddr, IorD, LorS, pAddr, CCA, raw)
 
-INLINE_SIM_MAIN (void) load_memory PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, uword64* memvalp, uword64* memval1p, int CCA, unsigned int AccessLength, address_word pAddr, address_word vAddr, int IorD));
+INLINE_SIM_MAIN (void) load_memory (SIM_DESC sd, sim_cpu *cpu, address_word cia, uword64* memvalp, uword64* memval1p, int CCA, unsigned int AccessLength, address_word pAddr, address_word vAddr, int IorD);
 #define LoadMemory(memvalp,memval1p,CCA,AccessLength,pAddr,vAddr,IorD,raw) \
 load_memory (SD, CPU, cia, memvalp, memval1p, CCA, AccessLength, pAddr, vAddr, IorD)
 
-INLINE_SIM_MAIN (void) store_memory PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int CCA, unsigned int AccessLength, uword64 MemElem, uword64 MemElem1, address_word pAddr, address_word vAddr));
+INLINE_SIM_MAIN (void) store_memory (SIM_DESC sd, sim_cpu *cpu, address_word cia, int CCA, unsigned int AccessLength, uword64 MemElem, uword64 MemElem1, address_word pAddr, address_word vAddr);
 #define StoreMemory(CCA,AccessLength,MemElem,MemElem1,pAddr,vAddr,raw) \
 store_memory (SD, CPU, cia, CCA, AccessLength, MemElem, MemElem1, pAddr, vAddr)
 
-INLINE_SIM_MAIN (void) cache_op PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int op, address_word pAddr, address_word vAddr, unsigned int instruction));
+INLINE_SIM_MAIN (void) cache_op (SIM_DESC sd, sim_cpu *cpu, address_word cia, int op, address_word pAddr, address_word vAddr, unsigned int instruction);
 #define CacheOp(op,pAddr,vAddr,instruction) \
 cache_op (SD, CPU, cia, op, pAddr, vAddr, instruction)
 
-INLINE_SIM_MAIN (void) sync_operation PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int stype));
+INLINE_SIM_MAIN (void) sync_operation (SIM_DESC sd, sim_cpu *cpu, address_word cia, int stype);
 #define SyncOperation(stype) \
 sync_operation (SD, CPU, cia, (stype))
 
-INLINE_SIM_MAIN (void) prefetch PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int CCA, address_word pAddr, address_word vAddr, int DATA, int hint));
+INLINE_SIM_MAIN (void) prefetch (SIM_DESC sd, sim_cpu *cpu, address_word cia, int CCA, address_word pAddr, address_word vAddr, int DATA, int hint);
 #define Prefetch(CCA,pAddr,vAddr,DATA,hint) \
 prefetch (SD, CPU, cia, CCA, pAddr, vAddr, DATA, hint)
 
@@ -969,23 +969,23 @@ void unpredictable_action (sim_cpu *cpu, address_word cia);
 #define Unpredictable()                unpredictable (SD_)
 #define UnpredictableResult()  /* For now, do nothing.  */
 
-INLINE_SIM_MAIN (unsigned32) ifetch32 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr));
+INLINE_SIM_MAIN (unsigned32) ifetch32 (SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr);
 #define IMEM32(CIA) ifetch32 (SD, CPU, (CIA), (CIA))
-INLINE_SIM_MAIN (unsigned16) ifetch16 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr));
+INLINE_SIM_MAIN (unsigned16) ifetch16 (SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr);
 #define IMEM16(CIA) ifetch16 (SD, CPU, (CIA), ((CIA) & ~1))
 #define IMEM16_IMMED(CIA,NR) ifetch16 (SD, CPU, (CIA), ((CIA) & ~1) + 2 * (NR))
 
-void dotrace PARAMS ((SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, char *comment, ...));
+void dotrace (SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, char *comment, ...);
 extern FILE *tracefh;
 
 extern int DSPLO_REGNUM[4];
 extern int DSPHI_REGNUM[4];
 
-INLINE_SIM_MAIN (void) pending_tick PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia));
+INLINE_SIM_MAIN (void) pending_tick (SIM_DESC sd, sim_cpu *cpu, address_word cia);
 extern SIM_CORE_SIGNAL_FN mips_core_signal;
 
-char* pr_addr PARAMS ((SIM_ADDR addr));
-char* pr_uword64 PARAMS ((uword64 addr));
+char* pr_addr (SIM_ADDR addr);
+char* pr_uword64 (uword64 addr);
 
 
 #define GPR_CLEAR(N) do { GPR_SET((N),0); } while (0)
index 4b2ca7e5a990a459a402569126cd0ec852861903..fa77e5f68ed8e5ae04ae23303030546bac76a4e1 100644 (file)
@@ -473,22 +473,22 @@ int valid[16];
 #define UNDEF(x)
 #endif
 
-static void parse_and_set_memory_size PARAMS ((char *str));
-static int IOMEM PARAMS ((int addr, int write, int value));
-static struct loop_bounds get_loop_bounds PARAMS ((int, int, unsigned char *,
-                                                  unsigned char *, int, int));
-static void process_wlat_addr PARAMS ((int, int));
-static void process_wwat_addr PARAMS ((int, int));
-static void process_wbat_addr PARAMS ((int, int));
-static int process_rlat_addr PARAMS ((int));
-static int process_rwat_addr PARAMS ((int));
-static int process_rbat_addr PARAMS ((int));
-static void INLINE wlat_fast PARAMS ((unsigned char *, int, int, int));
-static void INLINE wwat_fast PARAMS ((unsigned char *, int, int, int, int));
-static void INLINE wbat_fast PARAMS ((unsigned char *, int, int, int));
-static int INLINE rlat_fast PARAMS ((unsigned char *, int, int));
-static int INLINE rwat_fast PARAMS ((unsigned char *, int, int, int));
-static int INLINE rbat_fast PARAMS ((unsigned char *, int, int));
+static void parse_and_set_memory_size (char *str);
+static int IOMEM (int addr, int write, int value);
+static struct loop_bounds get_loop_bounds (int, int, unsigned char *,
+                                          unsigned char *, int, int);
+static void process_wlat_addr (int, int);
+static void process_wwat_addr (int, int);
+static void process_wbat_addr (int, int);
+static int process_rlat_addr (int);
+static int process_rwat_addr (int);
+static int process_rbat_addr (int);
+static void INLINE wlat_fast (unsigned char *, int, int, int);
+static void INLINE wwat_fast (unsigned char *, int, int, int, int);
+static void INLINE wbat_fast (unsigned char *, int, int, int);
+static int INLINE rlat_fast (unsigned char *, int, int);
+static int INLINE rwat_fast (unsigned char *, int, int, int);
+static int INLINE rbat_fast (unsigned char *, int, int);
 
 static host_callback *callback;
 
index c52da7703acb0cad5505c555daa84da097e30526..bd5cf7712aae401f877924426b309838c16b2ff7 100644 (file)
@@ -469,9 +469,9 @@ enum op_types
 };
 
 #ifdef DEBUG
-void trace_input PARAMS ((char *name, enum op_types type, int size));
-void trace_output PARAMS ((enum op_types result));
-void trace_result PARAMS ((int has_result, unsigned32 result));
+void trace_input (char *name, enum op_types type, int size);
+void trace_output (enum op_types result);
+void trace_result (int has_result, unsigned32 result);
 
 extern int trace_num_values;
 extern unsigned32 trace_values[];
index bf597279c33aefa12212a085a981679314176118..b1dddfdd41b9013221fa03e28101a77fca47835b 100644 (file)
@@ -2,7 +2,7 @@ struct simops
 {
   unsigned long   opcode;
   unsigned long   mask;
-  int (* func) PARAMS ((void));
+  int (* func) (void);
   int    numops;
   int    operands[12];
 };