aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2014-01-04 21:43:21 -0700
committerTom Tromey <tromey@redhat.com>2014-01-07 09:17:05 -0700
commitbdca5ee4bcd2fce04de6c9eabdbef8d960298e02 (patch)
treea4b1e34ae5704f5e115c6db4f84d05eb8c5a636f
parent1f635d209e61d900a6326aa281e697e31fcdae1e (diff)
downloadfsf-binutils-gdb-bdca5ee4bcd2fce04de6c9eabdbef8d960298e02.zip
fsf-binutils-gdb-bdca5ee4bcd2fce04de6c9eabdbef8d960298e02.tar.gz
fsf-binutils-gdb-bdca5ee4bcd2fce04de6c9eabdbef8d960298e02.tar.bz2
remove PARAMS from sim
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.
-rw-r--r--sim/ChangeLog35
-rw-r--r--sim/README-HACKING4
-rw-r--r--sim/arm/wrapper.c8
-rw-r--r--sim/bfin/sim-main.h8
-rw-r--r--sim/common/callback.c56
-rw-r--r--sim/common/cgen-trace.c2
-rw-r--r--sim/common/run-sim.h16
-rw-r--r--sim/common/run.c6
-rw-r--r--sim/common/sim-base.h4
-rw-r--r--sim/common/sim-load.c12
-rw-r--r--sim/common/sim-options.h12
-rw-r--r--sim/common/sim-trace.c4
-rw-r--r--sim/common/sim-trace.h308
-rw-r--r--sim/common/sim-utils.h4
-rw-r--r--sim/cr16/cr16_sim.h16
-rw-r--r--sim/cr16/gencode.c8
-rw-r--r--sim/cr16/interp.c14
-rw-r--r--sim/cr16/simops.c8
-rw-r--r--sim/d10v/d10v_sim.h16
-rw-r--r--sim/d10v/gencode.c8
-rw-r--r--sim/d10v/interp.c20
-rw-r--r--sim/d10v/simops.c8
-rw-r--r--sim/erc32/erc32.c82
-rw-r--r--sim/erc32/exec.c16
-rw-r--r--sim/erc32/float.c6
-rw-r--r--sim/erc32/func.c20
-rw-r--r--sim/erc32/sis.c8
-rw-r--r--sim/erc32/sis.h92
-rw-r--r--sim/mips/interp.c12
-rw-r--r--sim/mips/sim-main.h36
-rw-r--r--sim/sh/interp.c32
-rw-r--r--sim/v850/sim-main.h6
-rw-r--r--sim/v850/v850_sim.h2
33 files changed, 459 insertions, 430 deletions
diff --git a/sim/ChangeLog b/sim/ChangeLog
index 13564c9..04e5202 100644
--- a/sim/ChangeLog
+++ b/sim/ChangeLog
@@ -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
diff --git a/sim/README-HACKING b/sim/README-HACKING
index 77cad94..33b6ecb 100644
--- a/sim/README-HACKING
+++ b/sim/README-HACKING
@@ -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
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 70e27f75..0ea9ee1 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -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
{
diff --git a/sim/bfin/sim-main.h b/sim/bfin/sim-main.h
index cc37e4e..815b59b 100644
--- a/sim/bfin/sim-main.h
+++ b/sim/bfin/sim-main.h
@@ -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 { \
diff --git a/sim/common/callback.c b/sim/common/callback.c
index f833f98..d7a046c 100644
--- a/sim/common/callback.c
+++ b/sim/common/callback.c
@@ -62,43 +62,43 @@
/* ??? 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. */
diff --git a/sim/common/cgen-trace.c b/sim/common/cgen-trace.c
index 2f28215..6e2f856 100644
--- a/sim/common/cgen-trace.c
+++ b/sim/common/cgen-trace.c
@@ -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;
diff --git a/sim/common/run-sim.h b/sim/common/run-sim.h
index 6f0007d..be10d49 100644
--- a/sim/common/run-sim.h
+++ b/sim/common/run-sim.h
@@ -26,11 +26,11 @@
/* 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
diff --git a/sim/common/run.c b/sim/common/run.c
index 191b512..cae2cb3 100644
--- a/sim/common/run.c
+++ b/sim/common/run.c
@@ -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;
diff --git a/sim/common/sim-base.h b/sim/common/sim-base.h
index 76880fc..043c37b 100644
--- a/sim/common/sim-base.h
+++ b/sim/common/sim-base.h
@@ -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 */
diff --git a/sim/common/sim-load.c b/sim/common/sim-load.c
index e6e4e90..2e2b804 100644
--- a/sim/common/sim-load.c
+++ b/sim/common/sim-load.c
@@ -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;
diff --git a/sim/common/sim-options.h b/sim/common/sim-options.h
index eea7e99..778f4c1 100644
--- a/sim/common/sim-options.h
+++ b/sim/common/sim-options.h
@@ -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 */
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index b91cfec..bb56db7 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -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;
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index f8b50fc..5fb58e1 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -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_word3 (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 { \
/* 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 */
diff --git a/sim/common/sim-utils.h b/sim/common/sim-utils.h
index 3f61e50..ddb19ab 100644
--- a/sim/common/sim-utils.h
+++ b/sim/common/sim-utils.h
@@ -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,
diff --git a/sim/cr16/cr16_sim.h b/sim/cr16/cr16_sim.h
index 257b627..68e1261 100644
--- a/sim/cr16/cr16_sim.h
+++ b/sim/cr16/cr16_sim.h
@@ -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)
diff --git a/sim/cr16/gencode.c b/sim/cr16/gencode.c
index f90dcb1..67f95ab 100644
--- a/sim/cr16/gencode.c
+++ b/sim/cr16/gencode.c
@@ -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);
}
}
diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c
index 6006967..2ef14cb 100644
--- a/sim/cr16/interp.c
+++ b/sim/cr16/interp.c
@@ -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
diff --git a/sim/cr16/simops.c b/sim/cr16/simops.c
index 55befb5..2fa60c5 100644
--- a/sim/cr16/simops.c
+++ b/sim/cr16/simops.c
@@ -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)
diff --git a/sim/d10v/d10v_sim.h b/sim/d10v/d10v_sim.h
index 09e0631..c541b41 100644
--- a/sim/d10v/d10v_sim.h
+++ b/sim/d10v/d10v_sim.h
@@ -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)
diff --git a/sim/d10v/gencode.c b/sim/d10v/gencode.c
index b66297d..c0a748f 100644
--- a/sim/d10v/gencode.c
+++ b/sim/d10v/gencode.c
@@ -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);
}
diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c
index 23db647..a0b334d 100644
--- a/sim/d10v/interp.c
+++ b/sim/d10v/interp.c
@@ -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
diff --git a/sim/d10v/simops.c b/sim/d10v/simops.c
index 0b58505..ed3e570 100644
--- a/sim/d10v/simops.c
+++ b/sim/d10v/simops.c
@@ -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)
diff --git a/sim/erc32/erc32.c b/sim/erc32/erc32.c
index 3a5bd11..4d4177e 100644
--- a/sim/erc32/erc32.c
+++ b/sim/erc32/erc32.c
@@ -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;
diff --git a/sim/erc32/exec.c b/sim/erc32/exec.c
index 4fd2453..dc86ba3 100644
--- a/sim/erc32/exec.c
+++ b/sim/erc32/exec.c
@@ -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;
diff --git a/sim/erc32/float.c b/sim/erc32/float.c
index 1b8f0fc..598b7cc 100644
--- a/sim/erc32/float.c
+++ b/sim/erc32/float.c
@@ -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
diff --git a/sim/erc32/func.c b/sim/erc32/func.c
index 881f26c..d001c58 100644
--- a/sim/erc32/func.c
+++ b/sim/erc32/func.c
@@ -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)
diff --git a/sim/erc32/sis.c b/sim/erc32/sis.c
index f40cd65..89e6f02 100644
--- a/sim/erc32/sis.c
+++ b/sim/erc32/sis.c
@@ -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);
diff --git a/sim/erc32/sis.h b/sim/erc32/sis.h
index a1cf00b..f49d45d 100644
--- a/sim/erc32/sis.h
+++ b/sim/erc32/sis.h
@@ -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);
diff --git a/sim/mips/interp.c b/sim/mips/interp.c
index 032570a..2491fcd 100644
--- a/sim/mips/interp.c
+++ b/sim/mips/interp.c
@@ -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);
diff --git a/sim/mips/sim-main.h b/sim/mips/sim-main.h
index a0a0294..ae8f0cc 100644
--- a/sim/mips/sim-main.h
+++ b/sim/mips/sim-main.h
@@ -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)
diff --git a/sim/sh/interp.c b/sim/sh/interp.c
index 4b2ca7e..fa77e5f 100644
--- a/sim/sh/interp.c
+++ b/sim/sh/interp.c
@@ -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;
diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h
index c52da77..bd5cf77 100644
--- a/sim/v850/sim-main.h
+++ b/sim/v850/sim-main.h
@@ -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[];
diff --git a/sim/v850/v850_sim.h b/sim/v850/v850_sim.h
index bf59727..b1dddfd 100644
--- a/sim/v850/v850_sim.h
+++ b/sim/v850/v850_sim.h
@@ -2,7 +2,7 @@ struct simops
{
unsigned long opcode;
unsigned long mask;
- int (* func) PARAMS ((void));
+ int (* func) (void);
int numops;
int operands[12];
};