GNU Binutils with patches for OS216
修訂 | bdca5ee4bcd2fce04de6c9eabdbef8d960298e02 (tree) |
---|---|
時間 | 2014-01-08 01:17:05 |
作者 | Tom Tromey <tromey@redh...> |
Commiter | Tom Tromey |
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.
@@ -1,3 +1,38 @@ | ||
1 | +2014-01-06 Tom Tromey <tromey@redhat.com> | |
2 | + | |
3 | + * README-HACKING: Don't use PARAMS. | |
4 | + * arm/wrapper.c: Don't use PARAMS. | |
5 | + * bfin/sim-main.h: Don't use PARAMS. | |
6 | + * common/callback.c: Don't use PARAMS. | |
7 | + * common/cgen-trace.c: Don't use PARAMS. | |
8 | + * common/run-sim.h: Don't use PARAMS. | |
9 | + * common/run.c: Don't use PARAMS. | |
10 | + * common/sim-base.h: Don't use PARAMS. | |
11 | + * common/sim-load.c: Don't use PARAMS. | |
12 | + * common/sim-options.h: Don't use PARAMS. | |
13 | + * common/sim-trace.c: Don't use PARAMS. | |
14 | + * common/sim-trace.h: Don't use PARAMS. | |
15 | + * common/sim-utils.h: Don't use PARAMS. | |
16 | + * cr16/cr16_sim.h: Don't use PARAMS. | |
17 | + * cr16/gencode.c: Don't use PARAMS. | |
18 | + * cr16/interp.c: Don't use PARAMS. | |
19 | + * cr16/simops.c: Don't use PARAMS. | |
20 | + * d10v/d10v_sim.h: Don't use PARAMS. | |
21 | + * d10v/gencode.c: Don't use PARAMS. | |
22 | + * d10v/interp.c: Don't use PARAMS. | |
23 | + * d10v/simops.c: Don't use PARAMS. | |
24 | + * erc32/erc32.c: Don't use PARAMS. | |
25 | + * erc32/exec.c: Don't use PARAMS. | |
26 | + * erc32/float.c: Don't use PARAMS. | |
27 | + * erc32/func.c: Don't use PARAMS. | |
28 | + * erc32/sis.c: Don't use PARAMS. | |
29 | + * erc32/sis.h: Don't use PARAMS. | |
30 | + * mips/interp.c: Don't use PARAMS. | |
31 | + * mips/sim-main.h: Don't use PARAMS. | |
32 | + * sh/interp.c: Don't use PARAMS. | |
33 | + * v850/sim-main.h: Don't use PARAMS. | |
34 | + * v850/v850_sim.h: Don't use PARAMS. | |
35 | + | |
1 | 36 | 2013-11-07 Will Newton <will.newton@linaro.org> |
2 | 37 | |
3 | 38 | PR gdb/15508 |
@@ -175,9 +175,7 @@ C Language Assumptions | ||
175 | 175 | The programmer may assume that the simulator is being built using an |
176 | 176 | ANSI C compiler that supports a 64 bit data type. Consequently: |
177 | 177 | |
178 | - o prototypes can be used (although using | |
179 | - PARAMS() and K&R declarations wouldn't | |
180 | - go astray). | |
178 | + o prototypes can be used | |
181 | 179 | |
182 | 180 | o If sim-types.h is included, the two |
183 | 181 | types signed64 and unsigned64 are |
@@ -132,9 +132,9 @@ sim_size (size) | ||
132 | 132 | } |
133 | 133 | |
134 | 134 | void |
135 | -ARMul_ConsolePrint VPARAMS ((ARMul_State * state, | |
136 | - const char * format, | |
137 | - ...)) | |
135 | +ARMul_ConsolePrint (ARMul_State * state, | |
136 | + const char * format, | |
137 | + ...) | |
138 | 138 | { |
139 | 139 | va_list ap; |
140 | 140 |
@@ -678,7 +678,7 @@ sim_fetch_register (sd, rn, memory, length) | ||
678 | 678 | |
679 | 679 | #ifdef SIM_TARGET_SWITCHES |
680 | 680 | |
681 | -static void sim_target_parse_arg_array PARAMS ((char **)); | |
681 | +static void sim_target_parse_arg_array (char **); | |
682 | 682 | |
683 | 683 | typedef struct |
684 | 684 | { |
@@ -99,10 +99,10 @@ struct sim_state { | ||
99 | 99 | bfin_trace_queue (cpu, oldpc, newpc, hwloop); \ |
100 | 100 | } while (0) |
101 | 101 | |
102 | -extern void trace_register PARAMS ((SIM_DESC sd, | |
103 | - sim_cpu *cpu, | |
104 | - const char *fmt, | |
105 | - ...)) | |
102 | +extern void trace_register (SIM_DESC sd, | |
103 | + sim_cpu *cpu, | |
104 | + const char *fmt, | |
105 | + ...) | |
106 | 106 | __attribute__((format (printf, 3, 4))); |
107 | 107 | #define TRACE_REGISTER(cpu, fmt, ...) \ |
108 | 108 | do { \ |
@@ -62,43 +62,43 @@ | ||
62 | 62 | /* ??? sim_cb_printf should be cb_printf, but until the callback support is |
63 | 63 | broken out of the simulator directory, these are here to not require |
64 | 64 | sim-utils.h. */ |
65 | -void sim_cb_printf PARAMS ((host_callback *, const char *, ...)); | |
66 | -void sim_cb_eprintf PARAMS ((host_callback *, const char *, ...)); | |
65 | +void sim_cb_printf (host_callback *, const char *, ...); | |
66 | +void sim_cb_eprintf (host_callback *, const char *, ...); | |
67 | 67 | |
68 | 68 | extern CB_TARGET_DEFS_MAP cb_init_syscall_map[]; |
69 | 69 | extern CB_TARGET_DEFS_MAP cb_init_errno_map[]; |
70 | 70 | extern CB_TARGET_DEFS_MAP cb_init_open_map[]; |
71 | 71 | |
72 | -extern int system PARAMS ((const char *)); | |
73 | - | |
74 | -static int os_init PARAMS ((host_callback *)); | |
75 | -static int os_shutdown PARAMS ((host_callback *)); | |
76 | -static int os_unlink PARAMS ((host_callback *, const char *)); | |
77 | -static long os_time PARAMS ((host_callback *, long *)); | |
78 | -static int os_system PARAMS ((host_callback *, const char *)); | |
79 | -static int os_rename PARAMS ((host_callback *, const char *, const char *)); | |
80 | -static int os_write_stdout PARAMS ((host_callback *, const char *, int)); | |
81 | -static void os_flush_stdout PARAMS ((host_callback *)); | |
82 | -static int os_write_stderr PARAMS ((host_callback *, const char *, int)); | |
83 | -static void os_flush_stderr PARAMS ((host_callback *)); | |
84 | -static int os_write PARAMS ((host_callback *, int, const char *, int)); | |
85 | -static int os_read_stdin PARAMS ((host_callback *, char *, int)); | |
86 | -static int os_read PARAMS ((host_callback *, int, char *, int)); | |
87 | -static int os_open PARAMS ((host_callback *, const char *, int)); | |
88 | -static int os_lseek PARAMS ((host_callback *, int, long, int)); | |
89 | -static int os_isatty PARAMS ((host_callback *, int)); | |
90 | -static int os_get_errno PARAMS ((host_callback *)); | |
91 | -static int os_close PARAMS ((host_callback *, int)); | |
92 | -static void os_vprintf_filtered PARAMS ((host_callback *, const char *, va_list)); | |
93 | -static void os_evprintf_filtered PARAMS ((host_callback *, const char *, va_list)); | |
94 | -static void os_error PARAMS ((host_callback *, const char *, ...)) | |
72 | +extern int system (const char *); | |
73 | + | |
74 | +static int os_init (host_callback *); | |
75 | +static int os_shutdown (host_callback *); | |
76 | +static int os_unlink (host_callback *, const char *); | |
77 | +static long os_time (host_callback *, long *); | |
78 | +static int os_system (host_callback *, const char *); | |
79 | +static int os_rename (host_callback *, const char *, const char *); | |
80 | +static int os_write_stdout (host_callback *, const char *, int); | |
81 | +static void os_flush_stdout (host_callback *); | |
82 | +static int os_write_stderr (host_callback *, const char *, int); | |
83 | +static void os_flush_stderr (host_callback *); | |
84 | +static int os_write (host_callback *, int, const char *, int); | |
85 | +static int os_read_stdin (host_callback *, char *, int); | |
86 | +static int os_read (host_callback *, int, char *, int); | |
87 | +static int os_open (host_callback *, const char *, int); | |
88 | +static int os_lseek (host_callback *, int, long, int); | |
89 | +static int os_isatty (host_callback *, int); | |
90 | +static int os_get_errno (host_callback *); | |
91 | +static int os_close (host_callback *, int); | |
92 | +static void os_vprintf_filtered (host_callback *, const char *, va_list); | |
93 | +static void os_evprintf_filtered (host_callback *, const char *, va_list); | |
94 | +static void os_error (host_callback *, const char *, ...) | |
95 | 95 | #ifdef __GNUC__ |
96 | 96 | __attribute__ ((__noreturn__)) |
97 | 97 | #endif |
98 | 98 | ; |
99 | -static int fdmap PARAMS ((host_callback *, int)); | |
100 | -static int fdbad PARAMS ((host_callback *, int)); | |
101 | -static int wrap PARAMS ((host_callback *, int)); | |
99 | +static int fdmap (host_callback *, int); | |
100 | +static int fdbad (host_callback *, int); | |
101 | +static int wrap (host_callback *, int); | |
102 | 102 | |
103 | 103 | /* Set the callback copy of errno from what we see now. */ |
104 | 104 |
@@ -299,7 +299,7 @@ cgen_trace_printf (SIM_CPU *cpu, char *fmt, ...) | ||
299 | 299 | /* sprintf to a "stream" */ |
300 | 300 | |
301 | 301 | int |
302 | -sim_disasm_sprintf VPARAMS ((SFILE *f, const char *format, ...)) | |
302 | +sim_disasm_sprintf (SFILE *f, const char *format, ...) | |
303 | 303 | { |
304 | 304 | #ifndef __STDC__ |
305 | 305 | SFILE *f; |
@@ -26,11 +26,11 @@ | ||
26 | 26 | /* Parse the command line, extracting any target specific switches |
27 | 27 | before the generic simulator code gets a chance to complain |
28 | 28 | about them. Returns the adjusted value of argc. */ |
29 | -int sim_target_parse_command_line PARAMS ((int, char **)); | |
29 | +int sim_target_parse_command_line (int, char **); | |
30 | 30 | |
31 | 31 | /* Display a list of target specific switches supported by this |
32 | 32 | target. */ |
33 | -void sim_target_display_usage PARAMS ((int help)); | |
33 | +void sim_target_display_usage (int help); | |
34 | 34 | |
35 | 35 | #endif |
36 | 36 |
@@ -40,7 +40,7 @@ void sim_target_display_usage PARAMS ((int help)); | ||
40 | 40 | This procedure does not take a SIM_DESC argument as it is |
41 | 41 | used before sim_open. */ |
42 | 42 | |
43 | -void sim_set_callbacks PARAMS ((struct host_callback_struct *)); | |
43 | +void sim_set_callbacks (struct host_callback_struct *); | |
44 | 44 | |
45 | 45 | |
46 | 46 | /* Set the size of the simulator memory array. |
@@ -49,7 +49,7 @@ void sim_set_callbacks PARAMS ((struct host_callback_struct *)); | ||
49 | 49 | This procedure does not take a SIM_DESC argument as it is |
50 | 50 | used before sim_open. */ |
51 | 51 | |
52 | -void sim_size PARAMS ((int i)); | |
52 | +void sim_size (int i); | |
53 | 53 | |
54 | 54 | |
55 | 55 | /* Single-step simulator with tracing enabled. |
@@ -60,7 +60,7 @@ void sim_size PARAMS ((int i)); | ||
60 | 60 | be continued using sim_trace() calls; ``1'' indicating that the |
61 | 61 | simulation has finished. */ |
62 | 62 | |
63 | -int sim_trace PARAMS ((SIM_DESC sd)); | |
63 | +int sim_trace (SIM_DESC sd); | |
64 | 64 | |
65 | 65 | |
66 | 66 | /* Enable tracing. |
@@ -70,7 +70,7 @@ int sim_trace PARAMS ((SIM_DESC sd)); | ||
70 | 70 | be continued using sim_trace() calls; ``1'' indicating that the |
71 | 71 | simulation has finished. */ |
72 | 72 | |
73 | -void sim_set_trace PARAMS ((void)); | |
73 | +void sim_set_trace (void); | |
74 | 74 | |
75 | 75 | |
76 | 76 | /* Configure the size of the profile buffer. |
@@ -79,7 +79,7 @@ void sim_set_trace PARAMS ((void)); | ||
79 | 79 | This procedure does not take a SIM_DESC argument as it is |
80 | 80 | used before sim_open. */ |
81 | 81 | |
82 | -void sim_set_profile_size PARAMS ((int n)); | |
82 | +void sim_set_profile_size (int n); | |
83 | 83 | |
84 | 84 | |
85 | 85 | /* Kill the running program. |
@@ -88,6 +88,6 @@ void sim_set_profile_size PARAMS ((int n)); | ||
88 | 88 | This procedure will be replaced as part of the introduction of |
89 | 89 | multi-cpu simulators. */ |
90 | 90 | |
91 | -void sim_kill PARAMS ((SIM_DESC sd)); | |
91 | +void sim_kill (SIM_DESC sd); | |
92 | 92 | |
93 | 93 | #endif |
@@ -50,8 +50,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
50 | 50 | #include "run-sim.h" |
51 | 51 | #include "version.h" |
52 | 52 | |
53 | -static void usage PARAMS ((int help)); | |
54 | -static void print_version PARAMS ((void)); | |
53 | +static void usage (int help); | |
54 | +static void print_version (void); | |
55 | 55 | extern int optind; |
56 | 56 | extern char *optarg; |
57 | 57 |
@@ -63,7 +63,7 @@ extern int getopt (); | ||
63 | 63 | |
64 | 64 | #ifdef NEED_UI_LOOP_HOOK |
65 | 65 | /* Gdb foolery. This is only needed for gdb using a gui. */ |
66 | -int (*deprecated_ui_loop_hook) PARAMS ((int signo)); | |
66 | +int (*deprecated_ui_loop_hook) (int signo); | |
67 | 67 | #endif |
68 | 68 | |
69 | 69 | static SIM_DESC sd; |
@@ -244,7 +244,7 @@ typedef struct { | ||
244 | 244 | } sim_state_base; |
245 | 245 | |
246 | 246 | /* Functions for allocating/freeing a sim_state. */ |
247 | -SIM_DESC sim_state_alloc PARAMS ((SIM_OPEN_KIND kind, host_callback *callback)); | |
248 | -void sim_state_free PARAMS ((SIM_DESC)); | |
247 | +SIM_DESC sim_state_alloc (SIM_OPEN_KIND kind, host_callback *callback); | |
248 | +void sim_state_free (SIM_DESC); | |
249 | 249 | |
250 | 250 | #endif /* SIM_BASE_H */ |
@@ -36,11 +36,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
36 | 36 | #include "gdb/callback.h" |
37 | 37 | #include "gdb/remote-sim.h" |
38 | 38 | |
39 | -static void eprintf PARAMS ((host_callback *, const char *, ...)); | |
40 | -static void xprintf PARAMS ((host_callback *, const char *, ...)); | |
39 | +static void eprintf (host_callback *, const char *, ...); | |
40 | +static void xprintf (host_callback *, const char *, ...); | |
41 | 41 | static void report_transfer_performance |
42 | - PARAMS ((host_callback *, unsigned long, time_t, time_t)); | |
43 | -static void xprintf_bfd_vma PARAMS ((host_callback *, bfd_vma)); | |
42 | + (host_callback *, unsigned long, time_t, time_t); | |
43 | +static void xprintf_bfd_vma (host_callback *, bfd_vma); | |
44 | 44 | |
45 | 45 | /* Load program PROG into the simulator using the function DO_LOAD. |
46 | 46 | 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) | ||
169 | 169 | } |
170 | 170 | |
171 | 171 | static void |
172 | -xprintf VPARAMS ((host_callback *callback, const char *fmt, ...)) | |
172 | +xprintf (host_callback *callback, const char *fmt, ...) | |
173 | 173 | { |
174 | 174 | va_list ap; |
175 | 175 |
@@ -181,7 +181,7 @@ xprintf VPARAMS ((host_callback *callback, const char *fmt, ...)) | ||
181 | 181 | } |
182 | 182 | |
183 | 183 | static void |
184 | -eprintf VPARAMS ((host_callback *callback, const char *fmt, ...)) | |
184 | +eprintf (host_callback *callback, const char *fmt, ...) | |
185 | 185 | { |
186 | 186 | va_list ap; |
187 | 187 |
@@ -33,10 +33,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ | ||
33 | 33 | argument, NULL if optional and missing; arg#5 is nonzero if a |
34 | 34 | command is being interpreted. */ |
35 | 35 | |
36 | -typedef SIM_RC (OPTION_HANDLER) PARAMS ((SIM_DESC, sim_cpu *, int, char *, int)); | |
36 | +typedef SIM_RC (OPTION_HANDLER) (SIM_DESC, sim_cpu *, int, char *, int); | |
37 | 37 | |
38 | 38 | /* Declare option handlers with a macro so it's usable on k&r systems. */ |
39 | -#define DECLARE_OPTION_HANDLER(fn) SIM_RC fn PARAMS ((SIM_DESC, sim_cpu *, int, char *, int)) | |
39 | +#define DECLARE_OPTION_HANDLER(fn) SIM_RC fn (SIM_DESC, sim_cpu *, int, char *, int) | |
40 | 40 | |
41 | 41 | typedef struct { |
42 | 42 |
@@ -129,20 +129,20 @@ typedef struct option_list { | ||
129 | 129 | /* Add a set of options to the simulator. |
130 | 130 | CPU is the cpu the options apply to or NULL for all cpus. |
131 | 131 | TABLE is an array of OPTIONS terminated by a NULL `opt.name' entry. */ |
132 | -SIM_RC sim_add_option_table PARAMS ((SIM_DESC sd, sim_cpu *cpu, const OPTION *table)); | |
132 | +SIM_RC sim_add_option_table (SIM_DESC sd, sim_cpu *cpu, const OPTION *table); | |
133 | 133 | |
134 | 134 | /* Install handler for the standard options. */ |
135 | 135 | MODULE_INSTALL_FN standard_install; |
136 | 136 | |
137 | 137 | /* Called by sim_open to parse the arguments. */ |
138 | -SIM_RC sim_parse_args PARAMS ((SIM_DESC sd, char **argv)); | |
138 | +SIM_RC sim_parse_args (SIM_DESC sd, char **argv); | |
139 | 139 | |
140 | 140 | /* Print help messages for the options. IS_COMMAND is non-zero when |
141 | 141 | this function is called from the command line interpreter. */ |
142 | -void sim_print_help PARAMS ((SIM_DESC sd, int is_command)); | |
142 | +void sim_print_help (SIM_DESC sd, int is_command); | |
143 | 143 | |
144 | 144 | /* Try to parse the command as if it is an option, Only fail when |
145 | 145 | totally unsuccessful */ |
146 | -SIM_RC sim_args_command PARAMS ((SIM_DESC sd, char *cmd)); | |
146 | +SIM_RC sim_args_command (SIM_DESC sd, char *cmd); | |
147 | 147 | |
148 | 148 | #endif /* SIM_OPTIONS_H */ |
@@ -1300,7 +1300,7 @@ trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc, | ||
1300 | 1300 | } |
1301 | 1301 | |
1302 | 1302 | void |
1303 | -trace_printf VPARAMS ((SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)) | |
1303 | +trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...) | |
1304 | 1304 | { |
1305 | 1305 | #if !defined __STDC__ && !defined ALMOST_STDC |
1306 | 1306 | SIM_DESC sd; |
@@ -1322,7 +1322,7 @@ trace_printf VPARAMS ((SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)) | ||
1322 | 1322 | } |
1323 | 1323 | |
1324 | 1324 | void |
1325 | -debug_printf VPARAMS ((sim_cpu *cpu, const char *fmt, ...)) | |
1325 | +debug_printf (sim_cpu *cpu, const char *fmt, ...) | |
1326 | 1326 | { |
1327 | 1327 | #if !defined __STDC__ && !defined ALMOST_STDC |
1328 | 1328 | sim_cpu *cpu; |
@@ -228,24 +228,24 @@ typedef struct _trace_data { | ||
228 | 228 | |
229 | 229 | /* Prime the trace buffers ready for any trace output. |
230 | 230 | Must be called prior to any other trace operation */ |
231 | -extern void trace_prefix PARAMS ((SIM_DESC sd, | |
232 | - sim_cpu *cpu, | |
233 | - sim_cia cia, | |
234 | - address_word pc, | |
235 | - int print_linenum_p, | |
236 | - const char *file_name, | |
237 | - int line_nr, | |
238 | - const char *fmt, | |
239 | - ...)) | |
231 | +extern void trace_prefix (SIM_DESC sd, | |
232 | + sim_cpu *cpu, | |
233 | + sim_cia cia, | |
234 | + address_word pc, | |
235 | + int print_linenum_p, | |
236 | + const char *file_name, | |
237 | + int line_nr, | |
238 | + const char *fmt, | |
239 | + ...) | |
240 | 240 | __attribute__((format (printf, 8, 9))); |
241 | 241 | |
242 | 242 | /* Generic trace print, assumes trace_prefix() has been called */ |
243 | 243 | |
244 | -extern void trace_generic PARAMS ((SIM_DESC sd, | |
245 | - sim_cpu *cpu, | |
246 | - int trace_idx, | |
247 | - const char *fmt, | |
248 | - ...)) | |
244 | +extern void trace_generic (SIM_DESC sd, | |
245 | + sim_cpu *cpu, | |
246 | + int trace_idx, | |
247 | + const char *fmt, | |
248 | + ...) | |
249 | 249 | __attribute__((format (printf, 4, 5))); |
250 | 250 | |
251 | 251 | typedef enum { |
@@ -262,149 +262,149 @@ typedef enum { | ||
262 | 262 | /* Trace a varying number of word sized inputs/outputs. trace_result* |
263 | 263 | must be called to close the trace operation. */ |
264 | 264 | |
265 | -extern void save_data PARAMS ((SIM_DESC sd, | |
266 | - TRACE_DATA *data, | |
267 | - data_fmt fmt, | |
268 | - long size, | |
269 | - const void *buf)); | |
270 | - | |
271 | -extern void trace_input0 PARAMS ((SIM_DESC sd, | |
272 | - sim_cpu *cpu, | |
273 | - int trace_idx)); | |
265 | +extern void save_data (SIM_DESC sd, | |
266 | + TRACE_DATA *data, | |
267 | + data_fmt fmt, | |
268 | + long size, | |
269 | + const void *buf); | |
274 | 270 | |
275 | -extern void trace_input_word1 PARAMS ((SIM_DESC sd, | |
276 | - sim_cpu *cpu, | |
277 | - int trace_idx, | |
278 | - unsigned_word d0)); | |
271 | +extern void trace_input0 (SIM_DESC sd, | |
272 | + sim_cpu *cpu, | |
273 | + int trace_idx); | |
279 | 274 | |
280 | -extern void trace_input_word2 PARAMS ((SIM_DESC sd, | |
281 | - sim_cpu *cpu, | |
282 | - int trace_idx, | |
283 | - unsigned_word d0, | |
284 | - unsigned_word d1)); | |
275 | +extern void trace_input_word1 (SIM_DESC sd, | |
276 | + sim_cpu *cpu, | |
277 | + int trace_idx, | |
278 | + unsigned_word d0); | |
285 | 279 | |
286 | -extern void trace_input_word3 PARAMS ((SIM_DESC sd, | |
287 | - sim_cpu *cpu, | |
288 | - int trace_idx, | |
289 | - unsigned_word d0, | |
290 | - unsigned_word d1, | |
291 | - unsigned_word d2)); | |
280 | +extern void trace_input_word2 (SIM_DESC sd, | |
281 | + sim_cpu *cpu, | |
282 | + int trace_idx, | |
283 | + unsigned_word d0, | |
284 | + unsigned_word d1); | |
292 | 285 | |
293 | -extern void trace_input_word4 PARAMS ((SIM_DESC sd, | |
286 | +extern void trace_input_word3 (SIM_DESC sd, | |
294 | 287 | sim_cpu *cpu, |
295 | 288 | int trace_idx, |
296 | 289 | unsigned_word d0, |
297 | 290 | unsigned_word d1, |
298 | - unsigned_word d2, | |
299 | - unsigned_word d3)); | |
300 | - | |
301 | -extern void trace_input_addr1 PARAMS ((SIM_DESC sd, | |
302 | - sim_cpu *cpu, | |
303 | - int trace_idx, | |
304 | - address_word d0)); | |
305 | - | |
306 | -extern void trace_input_bool1 PARAMS ((SIM_DESC sd, | |
307 | - sim_cpu *cpu, | |
308 | - int trace_idx, | |
309 | - int d0)); | |
310 | - | |
311 | -extern void trace_input_fp1 PARAMS ((SIM_DESC sd, | |
312 | - sim_cpu *cpu, | |
313 | - int trace_idx, | |
314 | - fp_word f0)); | |
315 | - | |
316 | -extern void trace_input_fp2 PARAMS ((SIM_DESC sd, | |
317 | - sim_cpu *cpu, | |
318 | - int trace_idx, | |
319 | - fp_word f0, | |
320 | - fp_word f1)); | |
321 | - | |
322 | -extern void trace_input_fp3 PARAMS ((SIM_DESC sd, | |
323 | - sim_cpu *cpu, | |
324 | - int trace_idx, | |
325 | - fp_word f0, | |
326 | - fp_word f1, | |
327 | - fp_word f2)); | |
328 | - | |
329 | -extern void trace_input_fpu1 PARAMS ((SIM_DESC sd, | |
330 | - sim_cpu *cpu, | |
331 | - int trace_idx, | |
332 | - struct _sim_fpu *f0)); | |
333 | - | |
334 | -extern void trace_input_fpu2 PARAMS ((SIM_DESC sd, | |
335 | - sim_cpu *cpu, | |
336 | - int trace_idx, | |
337 | - struct _sim_fpu *f0, | |
338 | - struct _sim_fpu *f1)); | |
339 | - | |
340 | -extern void trace_input_fpu3 PARAMS ((SIM_DESC sd, | |
341 | - sim_cpu *cpu, | |
342 | - int trace_idx, | |
343 | - struct _sim_fpu *f0, | |
344 | - struct _sim_fpu *f1, | |
345 | - struct _sim_fpu *f2)); | |
291 | + unsigned_word d2); | |
292 | + | |
293 | +extern void trace_input_word4 (SIM_DESC sd, | |
294 | + sim_cpu *cpu, | |
295 | + int trace_idx, | |
296 | + unsigned_word d0, | |
297 | + unsigned_word d1, | |
298 | + unsigned_word d2, | |
299 | + unsigned_word d3); | |
300 | + | |
301 | +extern void trace_input_addr1 (SIM_DESC sd, | |
302 | + sim_cpu *cpu, | |
303 | + int trace_idx, | |
304 | + address_word d0); | |
305 | + | |
306 | +extern void trace_input_bool1 (SIM_DESC sd, | |
307 | + sim_cpu *cpu, | |
308 | + int trace_idx, | |
309 | + int d0); | |
310 | + | |
311 | +extern void trace_input_fp1 (SIM_DESC sd, | |
312 | + sim_cpu *cpu, | |
313 | + int trace_idx, | |
314 | + fp_word f0); | |
315 | + | |
316 | +extern void trace_input_fp2 (SIM_DESC sd, | |
317 | + sim_cpu *cpu, | |
318 | + int trace_idx, | |
319 | + fp_word f0, | |
320 | + fp_word f1); | |
321 | + | |
322 | +extern void trace_input_fp3 (SIM_DESC sd, | |
323 | + sim_cpu *cpu, | |
324 | + int trace_idx, | |
325 | + fp_word f0, | |
326 | + fp_word f1, | |
327 | + fp_word f2); | |
328 | + | |
329 | +extern void trace_input_fpu1 (SIM_DESC sd, | |
330 | + sim_cpu *cpu, | |
331 | + int trace_idx, | |
332 | + struct _sim_fpu *f0); | |
333 | + | |
334 | +extern void trace_input_fpu2 (SIM_DESC sd, | |
335 | + sim_cpu *cpu, | |
336 | + int trace_idx, | |
337 | + struct _sim_fpu *f0, | |
338 | + struct _sim_fpu *f1); | |
339 | + | |
340 | +extern void trace_input_fpu3 (SIM_DESC sd, | |
341 | + sim_cpu *cpu, | |
342 | + int trace_idx, | |
343 | + struct _sim_fpu *f0, | |
344 | + struct _sim_fpu *f1, | |
345 | + struct _sim_fpu *f2); | |
346 | 346 | |
347 | 347 | /* Other trace_input{_<fmt><nr-inputs>} functions can go here */ |
348 | 348 | |
349 | -extern void trace_result0 PARAMS ((SIM_DESC sd, | |
350 | - sim_cpu *cpu, | |
351 | - int trace_idx)); | |
352 | - | |
353 | -extern void trace_result_word1 PARAMS ((SIM_DESC sd, | |
354 | - sim_cpu *cpu, | |
355 | - int trace_idx, | |
356 | - unsigned_word r0)); | |
357 | - | |
358 | -extern void trace_result_word2 PARAMS ((SIM_DESC sd, | |
359 | - sim_cpu *cpu, | |
360 | - int trace_idx, | |
361 | - unsigned_word r0, | |
362 | - unsigned_word r1)); | |
349 | +extern void trace_result0 (SIM_DESC sd, | |
350 | + sim_cpu *cpu, | |
351 | + int trace_idx); | |
352 | + | |
353 | +extern void trace_result_word1 (SIM_DESC sd, | |
354 | + sim_cpu *cpu, | |
355 | + int trace_idx, | |
356 | + unsigned_word r0); | |
357 | + | |
358 | +extern void trace_result_word2 (SIM_DESC sd, | |
359 | + sim_cpu *cpu, | |
360 | + int trace_idx, | |
361 | + unsigned_word r0, | |
362 | + unsigned_word r1); | |
363 | + | |
364 | +extern void trace_result_word4 (SIM_DESC sd, | |
365 | + sim_cpu *cpu, | |
366 | + int trace_idx, | |
367 | + unsigned_word r0, | |
368 | + unsigned_word r1, | |
369 | + unsigned_word r2, | |
370 | + unsigned_word r3); | |
371 | + | |
372 | +extern void trace_result_bool1 (SIM_DESC sd, | |
373 | + sim_cpu *cpu, | |
374 | + int trace_idx, | |
375 | + int r0); | |
376 | + | |
377 | +extern void trace_result_addr1 (SIM_DESC sd, | |
378 | + sim_cpu *cpu, | |
379 | + int trace_idx, | |
380 | + address_word r0); | |
381 | + | |
382 | +extern void trace_result_fp1 (SIM_DESC sd, | |
383 | + sim_cpu *cpu, | |
384 | + int trace_idx, | |
385 | + fp_word f0); | |
386 | + | |
387 | +extern void trace_result_fp2 (SIM_DESC sd, | |
388 | + sim_cpu *cpu, | |
389 | + int trace_idx, | |
390 | + fp_word f0, | |
391 | + fp_word f1); | |
392 | + | |
393 | +extern void trace_result_fpu1 (SIM_DESC sd, | |
394 | + sim_cpu *cpu, | |
395 | + int trace_idx, | |
396 | + struct _sim_fpu *f0); | |
397 | + | |
398 | +extern void trace_result_string1 (SIM_DESC sd, | |
399 | + sim_cpu *cpu, | |
400 | + int trace_idx, | |
401 | + char *str0); | |
363 | 402 | |
364 | -extern void trace_result_word4 PARAMS ((SIM_DESC sd, | |
403 | +extern void trace_result_word1_string1 (SIM_DESC sd, | |
365 | 404 | sim_cpu *cpu, |
366 | 405 | int trace_idx, |
367 | 406 | unsigned_word r0, |
368 | - unsigned_word r1, | |
369 | - unsigned_word r2, | |
370 | - unsigned_word r3)); | |
371 | - | |
372 | -extern void trace_result_bool1 PARAMS ((SIM_DESC sd, | |
373 | - sim_cpu *cpu, | |
374 | - int trace_idx, | |
375 | - int r0)); | |
376 | - | |
377 | -extern void trace_result_addr1 PARAMS ((SIM_DESC sd, | |
378 | - sim_cpu *cpu, | |
379 | - int trace_idx, | |
380 | - address_word r0)); | |
381 | - | |
382 | -extern void trace_result_fp1 PARAMS ((SIM_DESC sd, | |
383 | - sim_cpu *cpu, | |
384 | - int trace_idx, | |
385 | - fp_word f0)); | |
386 | - | |
387 | -extern void trace_result_fp2 PARAMS ((SIM_DESC sd, | |
388 | - sim_cpu *cpu, | |
389 | - int trace_idx, | |
390 | - fp_word f0, | |
391 | - fp_word f1)); | |
392 | - | |
393 | -extern void trace_result_fpu1 PARAMS ((SIM_DESC sd, | |
394 | - sim_cpu *cpu, | |
395 | - int trace_idx, | |
396 | - struct _sim_fpu *f0)); | |
397 | - | |
398 | -extern void trace_result_string1 PARAMS ((SIM_DESC sd, | |
399 | - sim_cpu *cpu, | |
400 | - int trace_idx, | |
401 | - char *str0)); | |
402 | - | |
403 | -extern void trace_result_word1_string1 PARAMS ((SIM_DESC sd, | |
404 | - sim_cpu *cpu, | |
405 | - int trace_idx, | |
406 | - unsigned_word r0, | |
407 | - char *s0)); | |
407 | + char *s0); | |
408 | 408 | |
409 | 409 | /* Other trace_result{_<type><nr-results>} */ |
410 | 410 |
@@ -555,21 +555,21 @@ do { \ | ||
555 | 555 | |
556 | 556 | /* The function trace_one_insn has been replaced by the function pair |
557 | 557 | trace_prefix() + trace_generic() */ |
558 | -extern void trace_one_insn PARAMS ((SIM_DESC sd, | |
559 | - sim_cpu * cpu, | |
560 | - address_word cia, | |
561 | - int print_linenum_p, | |
562 | - const char *file_name, | |
563 | - int line_nr, | |
564 | - const char *unit, | |
565 | - const char *fmt, | |
566 | - ...)) | |
558 | +extern void trace_one_insn (SIM_DESC sd, | |
559 | + sim_cpu * cpu, | |
560 | + address_word cia, | |
561 | + int print_linenum_p, | |
562 | + const char *file_name, | |
563 | + int line_nr, | |
564 | + const char *unit, | |
565 | + const char *fmt, | |
566 | + ...) | |
567 | 567 | __attribute__((format (printf, 8, 9))); |
568 | 568 | |
569 | -extern void trace_printf PARAMS ((SIM_DESC, sim_cpu *, const char *, ...)) | |
569 | +extern void trace_printf (SIM_DESC, sim_cpu *, const char *, ...) | |
570 | 570 | __attribute__((format (printf, 3, 4))); |
571 | 571 | |
572 | -extern void trace_vprintf PARAMS ((SIM_DESC, sim_cpu *, const char *, va_list)); | |
572 | +extern void trace_vprintf (SIM_DESC, sim_cpu *, const char *, va_list); | |
573 | 573 | |
574 | 574 | /* Debug support. |
575 | 575 | 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)); | ||
583 | 583 | /* Non-zero if "--debug-insn" specified. */ |
584 | 584 | #define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX) |
585 | 585 | |
586 | -extern void debug_printf PARAMS ((sim_cpu *, const char *, ...)) | |
586 | +extern void debug_printf (sim_cpu *, const char *, ...) | |
587 | 587 | __attribute__((format (printf, 2, 3))); |
588 | 588 | |
589 | 589 | #endif /* SIM_TRACE_H */ |
@@ -60,8 +60,8 @@ SIM_RC sim_analyze_program (SIM_DESC sd, char *prog_name, | ||
60 | 60 | write the program sections at LMA interpreted as a virtual address. |
61 | 61 | This is still accommodated for backward compatibility reasons. */ |
62 | 62 | |
63 | -typedef int sim_write_fn PARAMS ((SIM_DESC sd, SIM_ADDR mem, | |
64 | - const unsigned char *buf, int length)); | |
63 | +typedef int sim_write_fn (SIM_DESC sd, SIM_ADDR mem, | |
64 | + const unsigned char *buf, int length); | |
65 | 65 | struct bfd *sim_load_file (SIM_DESC sd, const char *myname, |
66 | 66 | host_callback *callback, char *prog, |
67 | 67 | struct bfd *prog_bfd, int verbose_p, |
@@ -421,8 +421,8 @@ enum | ||
421 | 421 | #define SEXT32(x) ((((x)&0xffffffff)^(~0x7fffffff))+0x80000000) |
422 | 422 | |
423 | 423 | extern uint8 *dmem_addr (uint32 offset); |
424 | -extern uint8 *imem_addr PARAMS ((uint32)); | |
425 | -extern bfd_vma decode_pc PARAMS ((void)); | |
424 | +extern uint8 *imem_addr (uint32); | |
425 | +extern bfd_vma decode_pc (void); | |
426 | 426 | |
427 | 427 | #define RB(x) (*(dmem_addr(x))) |
428 | 428 | #define SB(addr,data) ( RB(addr) = (data & 0xff)) |
@@ -433,12 +433,12 @@ extern bfd_vma decode_pc PARAMS ((void)); | ||
433 | 433 | #undef ENDIAN_INLINE |
434 | 434 | |
435 | 435 | #else |
436 | -extern uint32 get_longword PARAMS ((uint8 *)); | |
437 | -extern uint16 get_word PARAMS ((uint8 *)); | |
438 | -extern int64 get_longlong PARAMS ((uint8 *)); | |
439 | -extern void write_word PARAMS ((uint8 *addr, uint16 data)); | |
440 | -extern void write_longword PARAMS ((uint8 *addr, uint32 data)); | |
441 | -extern void write_longlong PARAMS ((uint8 *addr, int64 data)); | |
436 | +extern uint32 get_longword (uint8 *); | |
437 | +extern uint16 get_word (uint8 *); | |
438 | +extern int64 get_longlong (uint8 *); | |
439 | +extern void write_word (uint8 *addr, uint16 data); | |
440 | +extern void write_longword (uint8 *addr, uint32 data); | |
441 | +extern void write_longlong (uint8 *addr, int64 data); | |
442 | 442 | #endif |
443 | 443 | |
444 | 444 | #define SW(addr,data) write_word(dmem_addr(addr),data) |
@@ -25,9 +25,9 @@ | ||
25 | 25 | #include "ansidecl.h" |
26 | 26 | #include "opcode/cr16.h" |
27 | 27 | |
28 | -static void write_header PARAMS ((void)); | |
29 | -static void write_opcodes PARAMS ((void)); | |
30 | -static void write_template PARAMS ((void)); | |
28 | +static void write_header (void); | |
29 | +static void write_opcodes (void); | |
30 | +static void write_template (void); | |
31 | 31 | |
32 | 32 | int |
33 | 33 | main (int argc, char *argv[]) |
@@ -53,7 +53,7 @@ write_header () | ||
53 | 53 | /* Loop over instruction table until a full match is found. */ |
54 | 54 | for ( ; i < NUMOPCODES; i++) |
55 | 55 | { |
56 | - 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); | |
56 | + printf("void OP_%X_%X (void);\t\t/* %s */\n",cr16_instruction[i].match, (32 - cr16_instruction[i].match_bits), cr16_instruction[i].mnemonic); | |
57 | 57 | } |
58 | 58 | } |
59 | 59 |
@@ -52,12 +52,12 @@ asection *text; | ||
52 | 52 | bfd_vma text_start; |
53 | 53 | bfd_vma text_end; |
54 | 54 | |
55 | -static struct hash_entry *lookup_hash PARAMS ((uint64 ins, int size)); | |
56 | -static void get_operands PARAMS ((operand_desc *s, uint64 mcode, int isize, int nops)); | |
57 | -static int do_run PARAMS ((uint64 mc)); | |
58 | -static char *add_commas PARAMS ((char *buf, int sizeof_buf, unsigned long value)); | |
59 | -extern void sim_set_profile PARAMS ((int n)); | |
60 | -extern void sim_set_profile_size PARAMS ((int n)); | |
55 | +static struct hash_entry *lookup_hash (uint64 ins, int size); | |
56 | +static void get_operands (operand_desc *s, uint64 mcode, int isize, int nops); | |
57 | +static int do_run (uint64 mc); | |
58 | +static char *add_commas (char *buf, int sizeof_buf, unsigned long value); | |
59 | +extern void sim_set_profile (int n); | |
60 | +extern void sim_set_profile_size (int n); | |
61 | 61 | static INLINE uint8 *map_memory (unsigned phys_addr); |
62 | 62 | |
63 | 63 | #ifdef NEED_UI_LOOP_HOOK |
@@ -68,7 +68,7 @@ static INLINE uint8 *map_memory (unsigned phys_addr); | ||
68 | 68 | static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL; |
69 | 69 | |
70 | 70 | /* Actual hook to call to run through gdb's gui event loop */ |
71 | -extern int (*deprecated_ui_loop_hook) PARAMS ((int signo)); | |
71 | +extern int (*deprecated_ui_loop_hook) (int signo); | |
72 | 72 | #endif /* NEED_UI_LOOP_HOOK */ |
73 | 73 | |
74 | 74 | #ifndef INLINE |
@@ -189,10 +189,10 @@ move_to_cr (int cr, creg_t mask, creg_t val, int psw_hw_p) | ||
189 | 189 | } |
190 | 190 | |
191 | 191 | #ifdef DEBUG |
192 | -static void trace_input_func PARAMS ((char *name, | |
193 | - enum op_types in1, | |
194 | - enum op_types in2, | |
195 | - enum op_types in3)); | |
192 | +static void trace_input_func (char *name, | |
193 | + enum op_types in1, | |
194 | + enum op_types in2, | |
195 | + enum op_types in3); | |
196 | 196 | |
197 | 197 | #define trace_input(name, in1, in2, in3) do { if (cr16_debug) trace_input_func (name, in1, in2, in3); } while (0) |
198 | 198 |
@@ -442,8 +442,8 @@ do \ | ||
442 | 442 | while (0) |
443 | 443 | |
444 | 444 | extern uint8 *dmem_addr (uint16 offset); |
445 | -extern uint8 *imem_addr PARAMS ((uint32)); | |
446 | -extern bfd_vma decode_pc PARAMS ((void)); | |
445 | +extern uint8 *imem_addr (uint32); | |
446 | +extern bfd_vma decode_pc (void); | |
447 | 447 | |
448 | 448 | #define RB(x) (*(dmem_addr(x))) |
449 | 449 | #define SB(addr,data) ( RB(addr) = (data & 0xff)) |
@@ -454,12 +454,12 @@ extern bfd_vma decode_pc PARAMS ((void)); | ||
454 | 454 | #undef ENDIAN_INLINE |
455 | 455 | |
456 | 456 | #else |
457 | -extern uint32 get_longword PARAMS ((uint8 *)); | |
458 | -extern uint16 get_word PARAMS ((uint8 *)); | |
459 | -extern int64 get_longlong PARAMS ((uint8 *)); | |
460 | -extern void write_word PARAMS ((uint8 *addr, uint16 data)); | |
461 | -extern void write_longword PARAMS ((uint8 *addr, uint32 data)); | |
462 | -extern void write_longlong PARAMS ((uint8 *addr, int64 data)); | |
457 | +extern uint32 get_longword (uint8 *); | |
458 | +extern uint16 get_word (uint8 *); | |
459 | +extern int64 get_longlong (uint8 *); | |
460 | +extern void write_word (uint8 *addr, uint16 data); | |
461 | +extern void write_longword (uint8 *addr, uint32 data); | |
462 | +extern void write_longlong (uint8 *addr, int64 data); | |
463 | 463 | #endif |
464 | 464 | |
465 | 465 | #define SW(addr,data) write_word(dmem_addr(addr),data) |
@@ -5,9 +5,9 @@ | ||
5 | 5 | #include "ansidecl.h" |
6 | 6 | #include "opcode/d10v.h" |
7 | 7 | |
8 | -static void write_header PARAMS ((void)); | |
9 | -static void write_opcodes PARAMS ((void)); | |
10 | -static void write_template PARAMS ((void)); | |
8 | +static void write_header (void); | |
9 | +static void write_opcodes (void); | |
10 | +static void write_template (void); | |
11 | 11 | |
12 | 12 | int |
13 | 13 | main (argc, argv) |
@@ -31,7 +31,7 @@ write_header () | ||
31 | 31 | |
32 | 32 | for (opcode = (struct d10v_opcode *)d10v_opcodes; opcode->name; opcode++) |
33 | 33 | if (opcode->format != OPCODE_FAKE) |
34 | - printf("void OP_%X PARAMS ((void));\t\t/* %s */\n",opcode->opcode, opcode->name); | |
34 | + printf("void OP_%X (void);\t\t/* %s */\n",opcode->opcode, opcode->name); | |
35 | 35 | } |
36 | 36 | |
37 | 37 |
@@ -43,15 +43,15 @@ asection *text; | ||
43 | 43 | bfd_vma text_start; |
44 | 44 | bfd_vma text_end; |
45 | 45 | |
46 | -static long hash PARAMS ((long insn, int format)); | |
47 | -static struct hash_entry *lookup_hash PARAMS ((uint32 ins, int size)); | |
48 | -static void get_operands PARAMS ((struct simops *s, uint32 ins)); | |
49 | -static void do_long PARAMS ((uint32 ins)); | |
50 | -static void do_2_short PARAMS ((uint16 ins1, uint16 ins2, enum _leftright leftright)); | |
51 | -static void do_parallel PARAMS ((uint16 ins1, uint16 ins2)); | |
52 | -static char *add_commas PARAMS ((char *buf, int sizeof_buf, unsigned long value)); | |
53 | -extern void sim_set_profile PARAMS ((int n)); | |
54 | -extern void sim_set_profile_size PARAMS ((int n)); | |
46 | +static long hash (long insn, int format); | |
47 | +static struct hash_entry *lookup_hash (uint32 ins, int size); | |
48 | +static void get_operands (struct simops *s, uint32 ins); | |
49 | +static void do_long (uint32 ins); | |
50 | +static void do_2_short (uint16 ins1, uint16 ins2, enum _leftright leftright); | |
51 | +static void do_parallel (uint16 ins1, uint16 ins2); | |
52 | +static char *add_commas (char *buf, int sizeof_buf, unsigned long value); | |
53 | +extern void sim_set_profile (int n); | |
54 | +extern void sim_set_profile_size (int n); | |
55 | 55 | static INLINE uint8 *map_memory (unsigned phys_addr); |
56 | 56 | |
57 | 57 | #ifdef NEED_UI_LOOP_HOOK |
@@ -62,7 +62,7 @@ static INLINE uint8 *map_memory (unsigned phys_addr); | ||
62 | 62 | static long ui_loop_hook_counter = UI_LOOP_POLL_INTERVAL; |
63 | 63 | |
64 | 64 | /* Actual hook to call to run through gdb's gui event loop */ |
65 | -extern int (*deprecated_ui_loop_hook) PARAMS ((int signo)); | |
65 | +extern int (*deprecated_ui_loop_hook) (int signo); | |
66 | 66 | #endif /* NEED_UI_LOOP_HOOK */ |
67 | 67 | |
68 | 68 | #ifndef INLINE |
@@ -122,10 +122,10 @@ move_to_cr (int cr, reg_t mask, reg_t val, int psw_hw_p) | ||
122 | 122 | } |
123 | 123 | |
124 | 124 | #ifdef DEBUG |
125 | -static void trace_input_func PARAMS ((char *name, | |
126 | - enum op_types in1, | |
127 | - enum op_types in2, | |
128 | - enum op_types in3)); | |
125 | +static void trace_input_func (char *name, | |
126 | + enum op_types in1, | |
127 | + enum op_types in2, | |
128 | + enum op_types in3); | |
129 | 129 | |
130 | 130 | #define trace_input(name, in1, in2, in3) do { if (d10v_debug) trace_input_func (name, in1, in2, in3); } while (0) |
131 | 131 |
@@ -256,52 +256,52 @@ int erareg; | ||
256 | 256 | |
257 | 257 | /* Forward declarations */ |
258 | 258 | |
259 | -static void decode_ersr PARAMS ((void)); | |
259 | +static void decode_ersr (void); | |
260 | 260 | #ifdef ERRINJ |
261 | -static void iucomperr PARAMS ((void)); | |
261 | +static void iucomperr (void); | |
262 | 262 | #endif |
263 | -static void mecparerror PARAMS ((void)); | |
264 | -static void decode_memcfg PARAMS ((void)); | |
265 | -static void decode_wcr PARAMS ((void)); | |
266 | -static void decode_mcr PARAMS ((void)); | |
267 | -static void close_port PARAMS ((void)); | |
268 | -static void mec_reset PARAMS ((void)); | |
269 | -static void mec_intack PARAMS ((int32 level)); | |
270 | -static void chk_irq PARAMS ((void)); | |
271 | -static void mec_irq PARAMS ((int32 level)); | |
272 | -static void set_sfsr PARAMS ((uint32 fault, uint32 addr, | |
273 | - uint32 asi, uint32 read)); | |
274 | -static int32 mec_read PARAMS ((uint32 addr, uint32 asi, uint32 *data)); | |
275 | -static int mec_write PARAMS ((uint32 addr, uint32 data)); | |
276 | -static void port_init PARAMS ((void)); | |
277 | -static uint32 read_uart PARAMS ((uint32 addr)); | |
278 | -static void write_uart PARAMS ((uint32 addr, uint32 data)); | |
279 | -static void flush_uart PARAMS ((void)); | |
280 | -static void uarta_tx PARAMS ((void)); | |
281 | -static void uartb_tx PARAMS ((void)); | |
282 | -static void uart_rx PARAMS ((caddr_t arg)); | |
283 | -static void uart_intr PARAMS ((caddr_t arg)); | |
284 | -static void uart_irq_start PARAMS ((void)); | |
285 | -static void wdog_intr PARAMS ((caddr_t arg)); | |
286 | -static void wdog_start PARAMS ((void)); | |
287 | -static void rtc_intr PARAMS ((caddr_t arg)); | |
288 | -static void rtc_start PARAMS ((void)); | |
289 | -static uint32 rtc_counter_read PARAMS ((void)); | |
290 | -static void rtc_scaler_set PARAMS ((uint32 val)); | |
291 | -static void rtc_reload_set PARAMS ((uint32 val)); | |
292 | -static void gpt_intr PARAMS ((caddr_t arg)); | |
293 | -static void gpt_start PARAMS ((void)); | |
294 | -static uint32 gpt_counter_read PARAMS ((void)); | |
295 | -static void gpt_scaler_set PARAMS ((uint32 val)); | |
296 | -static void gpt_reload_set PARAMS ((uint32 val)); | |
297 | -static void timer_ctrl PARAMS ((uint32 val)); | |
263 | +static void mecparerror (void); | |
264 | +static void decode_memcfg (void); | |
265 | +static void decode_wcr (void); | |
266 | +static void decode_mcr (void); | |
267 | +static void close_port (void); | |
268 | +static void mec_reset (void); | |
269 | +static void mec_intack (int32 level); | |
270 | +static void chk_irq (void); | |
271 | +static void mec_irq (int32 level); | |
272 | +static void set_sfsr (uint32 fault, uint32 addr, | |
273 | + uint32 asi, uint32 read); | |
274 | +static int32 mec_read (uint32 addr, uint32 asi, uint32 *data); | |
275 | +static int mec_write (uint32 addr, uint32 data); | |
276 | +static void port_init (void); | |
277 | +static uint32 read_uart (uint32 addr); | |
278 | +static void write_uart (uint32 addr, uint32 data); | |
279 | +static void flush_uart (void); | |
280 | +static void uarta_tx (void); | |
281 | +static void uartb_tx (void); | |
282 | +static void uart_rx (caddr_t arg); | |
283 | +static void uart_intr (caddr_t arg); | |
284 | +static void uart_irq_start (void); | |
285 | +static void wdog_intr (caddr_t arg); | |
286 | +static void wdog_start (void); | |
287 | +static void rtc_intr (caddr_t arg); | |
288 | +static void rtc_start (void); | |
289 | +static uint32 rtc_counter_read (void); | |
290 | +static void rtc_scaler_set (uint32 val); | |
291 | +static void rtc_reload_set (uint32 val); | |
292 | +static void gpt_intr (caddr_t arg); | |
293 | +static void gpt_start (void); | |
294 | +static uint32 gpt_counter_read (void); | |
295 | +static void gpt_scaler_set (uint32 val); | |
296 | +static void gpt_reload_set (uint32 val); | |
297 | +static void timer_ctrl (uint32 val); | |
298 | 298 | static unsigned char * |
299 | - get_mem_ptr PARAMS ((uint32 addr, uint32 size)); | |
299 | + get_mem_ptr (uint32 addr, uint32 size); | |
300 | 300 | |
301 | -static void fetch_bytes PARAMS ((int asi, unsigned char *mem, | |
302 | - uint32 *data, int sz)); | |
301 | +static void fetch_bytes (int asi, unsigned char *mem, | |
302 | + uint32 *data, int sz); | |
303 | 303 | |
304 | -static void store_bytes PARAMS ((unsigned char *mem, uint32 *data, int sz)); | |
304 | +static void store_bytes (unsigned char *mem, uint32 *data, int sz); | |
305 | 305 | |
306 | 306 | extern int ext_irl; |
307 | 307 |
@@ -220,14 +220,14 @@ int ext_irl = 0; | ||
220 | 220 | |
221 | 221 | /* Forward declarations */ |
222 | 222 | |
223 | -static uint32 sub_cc PARAMS ((uint32 psr, int32 operand1, int32 operand2, | |
224 | - int32 result)); | |
225 | -static uint32 add_cc PARAMS ((uint32 psr, int32 operand1, int32 operand2, | |
226 | - int32 result)); | |
227 | -static void log_cc PARAMS ((int32 result, struct pstate *sregs)); | |
228 | -static int fpexec PARAMS ((uint32 op3, uint32 rd, uint32 rs1, uint32 rs2, | |
229 | - struct pstate *sregs)); | |
230 | -static int chk_asi PARAMS ((struct pstate *sregs, uint32 *asi, uint32 op3)); | |
223 | +static uint32 sub_cc (uint32 psr, int32 operand1, int32 operand2, | |
224 | + int32 result); | |
225 | +static uint32 add_cc (uint32 psr, int32 operand1, int32 operand2, | |
226 | + int32 result); | |
227 | +static void log_cc (int32 result, struct pstate *sregs); | |
228 | +static int fpexec (uint32 op3, uint32 rd, uint32 rs1, uint32 rs2, | |
229 | + struct pstate *sregs); | |
230 | +static int chk_asi (struct pstate *sregs, uint32 *asi, uint32 op3); | |
231 | 231 | |
232 | 232 | |
233 | 233 | extern struct estate ebase; |
@@ -36,9 +36,9 @@ | ||
36 | 36 | |
37 | 37 | /* Forward declarations */ |
38 | 38 | |
39 | -extern uint32 _get_sw PARAMS ((void)); | |
40 | -extern uint32 _get_cw PARAMS ((void)); | |
41 | -static void __setfpucw PARAMS ((unsigned short fpu_control)); | |
39 | +extern uint32 _get_sw (void); | |
40 | +extern uint32 _get_cw (void); | |
41 | +static void __setfpucw (unsigned short fpu_control); | |
42 | 42 | |
43 | 43 | /* This host dependent routine should return the accrued exceptions */ |
44 | 44 | int |
@@ -63,16 +63,16 @@ uint32 errmec = 0; | ||
63 | 63 | |
64 | 64 | /* Forward declarations */ |
65 | 65 | |
66 | -static int batch PARAMS ((struct pstate *sregs, char *fname)); | |
67 | -static void set_rega PARAMS ((struct pstate *sregs, char *reg, uint32 rval)); | |
68 | -static void disp_reg PARAMS ((struct pstate *sregs, char *reg)); | |
69 | -static uint32 limcalc PARAMS ((float32 freq)); | |
70 | -static void int_handler PARAMS ((int32 sig)); | |
71 | -static void init_event PARAMS ((void)); | |
72 | -static int disp_fpu PARAMS ((struct pstate *sregs)); | |
73 | -static void disp_regs PARAMS ((struct pstate *sregs, int cwp)); | |
74 | -static void disp_ctrl PARAMS ((struct pstate *sregs)); | |
75 | -static void disp_mem PARAMS ((uint32 addr, uint32 len)); | |
66 | +static int batch (struct pstate *sregs, char *fname); | |
67 | +static void set_rega (struct pstate *sregs, char *reg, uint32 rval); | |
68 | +static void disp_reg (struct pstate *sregs, char *reg); | |
69 | +static uint32 limcalc (float32 freq); | |
70 | +static void int_handler (int32 sig); | |
71 | +static void init_event (void); | |
72 | +static int disp_fpu (struct pstate *sregs); | |
73 | +static void disp_regs (struct pstate *sregs, int cwp); | |
74 | +static void disp_ctrl (struct pstate *sregs); | |
75 | +static void disp_mem (uint32 addr, uint32 len); | |
76 | 76 | |
77 | 77 | static int |
78 | 78 | batch(sregs, fname) |
@@ -41,10 +41,10 @@ typedef struct { | ||
41 | 41 | char *data; |
42 | 42 | } HIST_ENTRY; |
43 | 43 | |
44 | -extern char * readline PARAMS ((char *prompt)); | |
45 | -extern void using_history PARAMS ((void)); | |
46 | -extern void add_history PARAMS ((char *string)); | |
47 | -extern HIST_ENTRY *remove_history PARAMS ((int which)); | |
44 | +extern char * readline (char *prompt); | |
45 | +extern void using_history (void); | |
46 | +extern void add_history (char *string); | |
47 | +extern HIST_ENTRY *remove_history (int which); | |
48 | 48 | |
49 | 49 | |
50 | 50 |
@@ -159,61 +159,61 @@ struct irqcell { | ||
159 | 159 | /* Prototypes */ |
160 | 160 | |
161 | 161 | /* erc32.c */ |
162 | -extern void init_sim PARAMS ((void)); | |
163 | -extern void reset PARAMS ((void)); | |
164 | -extern void error_mode PARAMS ((uint32 pc)); | |
165 | -extern void sim_halt PARAMS ((void)); | |
166 | -extern void exit_sim PARAMS ((void)); | |
167 | -extern void init_stdio PARAMS ((void)); | |
168 | -extern void restore_stdio PARAMS ((void)); | |
169 | -extern int memory_read PARAMS ((int32 asi, uint32 addr, uint32 *data, | |
170 | - int32 sz, int32 *ws)); | |
171 | -extern int memory_write PARAMS ((int32 asi, uint32 addr, uint32 *data, | |
172 | - int32 sz, int32 *ws)); | |
173 | -extern int sis_memory_write PARAMS ((uint32 addr, | |
174 | - const unsigned char *data, uint32 length)); | |
175 | -extern int sis_memory_read PARAMS ((uint32 addr, char *data, | |
176 | - uint32 length)); | |
162 | +extern void init_sim (void); | |
163 | +extern void reset (void); | |
164 | +extern void error_mode (uint32 pc); | |
165 | +extern void sim_halt (void); | |
166 | +extern void exit_sim (void); | |
167 | +extern void init_stdio (void); | |
168 | +extern void restore_stdio (void); | |
169 | +extern int memory_read (int32 asi, uint32 addr, uint32 *data, | |
170 | + int32 sz, int32 *ws); | |
171 | +extern int memory_write (int32 asi, uint32 addr, uint32 *data, | |
172 | + int32 sz, int32 *ws); | |
173 | +extern int sis_memory_write (uint32 addr, | |
174 | + const unsigned char *data, uint32 length); | |
175 | +extern int sis_memory_read (uint32 addr, char *data, | |
176 | + uint32 length); | |
177 | 177 | |
178 | 178 | /* func.c */ |
179 | -extern void set_regi PARAMS ((struct pstate *sregs, int32 reg, | |
180 | - uint32 rval)); | |
181 | -extern void get_regi PARAMS ((struct pstate *sregs, int32 reg, char *buf)); | |
182 | -extern int exec_cmd PARAMS ((struct pstate *sregs, char *cmd)); | |
183 | -extern void reset_stat PARAMS ((struct pstate *sregs)); | |
184 | -extern void show_stat PARAMS ((struct pstate *sregs)); | |
185 | -extern void init_bpt PARAMS ((struct pstate *sregs)); | |
186 | -extern void init_signals PARAMS ((void)); | |
179 | +extern void set_regi (struct pstate *sregs, int32 reg, | |
180 | + uint32 rval); | |
181 | +extern void get_regi (struct pstate *sregs, int32 reg, char *buf); | |
182 | +extern int exec_cmd (struct pstate *sregs, char *cmd); | |
183 | +extern void reset_stat (struct pstate *sregs); | |
184 | +extern void show_stat (struct pstate *sregs); | |
185 | +extern void init_bpt (struct pstate *sregs); | |
186 | +extern void init_signals (void); | |
187 | 187 | |
188 | 188 | struct disassemble_info; |
189 | -extern void dis_mem PARAMS ((uint32 addr, uint32 len, | |
190 | - struct disassemble_info *info)); | |
191 | -extern void event PARAMS ((void (*cfunc) (), int32 arg, uint64 delta)); | |
192 | -extern void set_int PARAMS ((int32 level, void (*callback) (), int32 arg)); | |
193 | -extern void advance_time PARAMS ((struct pstate *sregs)); | |
194 | -extern uint32 now PARAMS ((void)); | |
195 | -extern int wait_for_irq PARAMS ((void)); | |
196 | -extern int check_bpt PARAMS ((struct pstate *sregs)); | |
197 | -extern void reset_all PARAMS ((void)); | |
198 | -extern void sys_reset PARAMS ((void)); | |
199 | -extern void sys_halt PARAMS ((void)); | |
200 | -extern int bfd_load PARAMS ((char *fname)); | |
189 | +extern void dis_mem (uint32 addr, uint32 len, | |
190 | + struct disassemble_info *info); | |
191 | +extern void event (void (*cfunc) (), int32 arg, uint64 delta); | |
192 | +extern void set_int (int32 level, void (*callback) (), int32 arg); | |
193 | +extern void advance_time (struct pstate *sregs); | |
194 | +extern uint32 now (void); | |
195 | +extern int wait_for_irq (void); | |
196 | +extern int check_bpt (struct pstate *sregs); | |
197 | +extern void reset_all (void); | |
198 | +extern void sys_reset (void); | |
199 | +extern void sys_halt (void); | |
200 | +extern int bfd_load (char *fname); | |
201 | 201 | |
202 | 202 | /* exec.c */ |
203 | -extern int dispatch_instruction PARAMS ((struct pstate *sregs)); | |
204 | -extern int execute_trap PARAMS ((struct pstate *sregs)); | |
205 | -extern int check_interrupts PARAMS ((struct pstate *sregs)); | |
206 | -extern void init_regs PARAMS ((struct pstate *sregs)); | |
203 | +extern int dispatch_instruction (struct pstate *sregs); | |
204 | +extern int execute_trap (struct pstate *sregs); | |
205 | +extern int check_interrupts (struct pstate *sregs); | |
206 | +extern void init_regs (struct pstate *sregs); | |
207 | 207 | |
208 | 208 | /* interf.c */ |
209 | -extern int run_sim PARAMS ((struct pstate *sregs, | |
210 | - uint64 icount, int dis)); | |
209 | +extern int run_sim (struct pstate *sregs, | |
210 | + uint64 icount, int dis); | |
211 | 211 | |
212 | 212 | /* float.c */ |
213 | -extern int get_accex PARAMS ((void)); | |
214 | -extern void clear_accex PARAMS ((void)); | |
215 | -extern void set_fsr PARAMS ((uint32 fsr)); | |
213 | +extern int get_accex (void); | |
214 | +extern void clear_accex (void); | |
215 | +extern void set_fsr (uint32 fsr); | |
216 | 216 | |
217 | 217 | /* help.c */ |
218 | -extern void usage PARAMS ((void)); | |
219 | -extern void gen_help PARAMS ((void)); | |
218 | +extern void usage (void); | |
219 | +extern void gen_help (void); |
@@ -65,12 +65,8 @@ code on the hardware. | ||
65 | 65 | #include "gdb/callback.h" /* GDB simulator callback interface */ |
66 | 66 | #include "gdb/remote-sim.h" /* GDB simulator interface */ |
67 | 67 | |
68 | -#ifndef PARAMS | |
69 | -#define PARAMS(x) | |
70 | -#endif | |
71 | - | |
72 | -char* pr_addr PARAMS ((SIM_ADDR addr)); | |
73 | -char* pr_uword64 PARAMS ((uword64 addr)); | |
68 | +char* pr_addr (SIM_ADDR addr); | |
69 | +char* pr_uword64 (uword64 addr); | |
74 | 70 | |
75 | 71 | |
76 | 72 | /* Within interp.c we refer to the sim_state and sim_cpu directly. */ |
@@ -98,7 +94,7 @@ char* pr_uword64 PARAMS ((uword64 addr)); | ||
98 | 94 | /*-- GDB simulator interface ------------------------------------------------*/ |
99 | 95 | /*---------------------------------------------------------------------------*/ |
100 | 96 | |
101 | -static void ColdReset PARAMS((SIM_DESC sd)); | |
97 | +static void ColdReset (SIM_DESC sd); | |
102 | 98 | |
103 | 99 | /*---------------------------------------------------------------------------*/ |
104 | 100 |
@@ -164,7 +160,7 @@ static SIM_RC sim_firmware_command (SIM_DESC sd, char* arg); | ||
164 | 160 | #if defined(TRACE) |
165 | 161 | static char *tracefile = "trace.din"; /* default filename for trace log */ |
166 | 162 | FILE *tracefh = NULL; |
167 | -static void open_trace PARAMS((SIM_DESC sd)); | |
163 | +static void open_trace (SIM_DESC sd); | |
168 | 164 | #endif /* TRACE */ |
169 | 165 | |
170 | 166 | static const char * get_insn_name (sim_cpu *, int); |
@@ -475,7 +475,7 @@ struct _sim_cpu { | ||
475 | 475 | |
476 | 476 | /* MIPS specific simulator watch config */ |
477 | 477 | |
478 | -void watch_options_install PARAMS ((SIM_DESC sd)); | |
478 | +void watch_options_install (SIM_DESC sd); | |
479 | 479 | |
480 | 480 | struct swatch { |
481 | 481 | sim_event *pc; |
@@ -693,10 +693,10 @@ void signal_exception (SIM_DESC sd, sim_cpu *cpu, address_word cia, int exceptio | ||
693 | 693 | /* XXX FIXME: For now, assume that FPU (cp1) is always usable. */ |
694 | 694 | #define COP_Usable(coproc_num) (coproc_num == 1) |
695 | 695 | |
696 | -void cop_lw PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, unsigned int memword)); | |
697 | -void cop_ld PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, uword64 memword)); | |
698 | -unsigned int cop_sw PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg)); | |
699 | -uword64 cop_sd PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg)); | |
696 | +void cop_lw (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, unsigned int memword); | |
697 | +void cop_ld (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg, uword64 memword); | |
698 | +unsigned int cop_sw (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg); | |
699 | +uword64 cop_sd (SIM_DESC sd, sim_cpu *cpu, address_word cia, int coproc_num, int coproc_reg); | |
700 | 700 | |
701 | 701 | #define COP_LW(coproc_num,coproc_reg,memword) \ |
702 | 702 | cop_lw (SD, CPU, cia, coproc_num, coproc_reg, memword) |
@@ -708,7 +708,7 @@ cop_sw (SD, CPU, cia, coproc_num, coproc_reg) | ||
708 | 708 | cop_sd (SD, CPU, cia, coproc_num, coproc_reg) |
709 | 709 | |
710 | 710 | |
711 | -void decode_coproc PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int instruction)); | |
711 | +void decode_coproc (SIM_DESC sd, sim_cpu *cpu, address_word cia, unsigned int instruction); | |
712 | 712 | #define DecodeCoproc(instruction) \ |
713 | 713 | decode_coproc (SD, CPU, cia, (instruction)) |
714 | 714 |
@@ -940,27 +940,27 @@ unsigned64 mdmx_shuffle (SIM_STATE, int, unsigned64, unsigned64); | ||
940 | 940 | #define PSIZE (WITH_TARGET_ADDRESS_BITSIZE) |
941 | 941 | |
942 | 942 | |
943 | -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)); | |
943 | +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); | |
944 | 944 | #define AddressTranslation(vAddr,IorD,LorS,pAddr,CCA,host,raw) \ |
945 | 945 | address_translation (SD, CPU, cia, vAddr, IorD, LorS, pAddr, CCA, raw) |
946 | 946 | |
947 | -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)); | |
947 | +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); | |
948 | 948 | #define LoadMemory(memvalp,memval1p,CCA,AccessLength,pAddr,vAddr,IorD,raw) \ |
949 | 949 | load_memory (SD, CPU, cia, memvalp, memval1p, CCA, AccessLength, pAddr, vAddr, IorD) |
950 | 950 | |
951 | -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)); | |
951 | +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); | |
952 | 952 | #define StoreMemory(CCA,AccessLength,MemElem,MemElem1,pAddr,vAddr,raw) \ |
953 | 953 | store_memory (SD, CPU, cia, CCA, AccessLength, MemElem, MemElem1, pAddr, vAddr) |
954 | 954 | |
955 | -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)); | |
955 | +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); | |
956 | 956 | #define CacheOp(op,pAddr,vAddr,instruction) \ |
957 | 957 | cache_op (SD, CPU, cia, op, pAddr, vAddr, instruction) |
958 | 958 | |
959 | -INLINE_SIM_MAIN (void) sync_operation PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, int stype)); | |
959 | +INLINE_SIM_MAIN (void) sync_operation (SIM_DESC sd, sim_cpu *cpu, address_word cia, int stype); | |
960 | 960 | #define SyncOperation(stype) \ |
961 | 961 | sync_operation (SD, CPU, cia, (stype)) |
962 | 962 | |
963 | -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)); | |
963 | +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); | |
964 | 964 | #define Prefetch(CCA,pAddr,vAddr,DATA,hint) \ |
965 | 965 | prefetch (SD, CPU, cia, CCA, pAddr, vAddr, DATA, hint) |
966 | 966 |
@@ -969,23 +969,23 @@ void unpredictable_action (sim_cpu *cpu, address_word cia); | ||
969 | 969 | #define Unpredictable() unpredictable (SD_) |
970 | 970 | #define UnpredictableResult() /* For now, do nothing. */ |
971 | 971 | |
972 | -INLINE_SIM_MAIN (unsigned32) ifetch32 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr)); | |
972 | +INLINE_SIM_MAIN (unsigned32) ifetch32 (SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr); | |
973 | 973 | #define IMEM32(CIA) ifetch32 (SD, CPU, (CIA), (CIA)) |
974 | -INLINE_SIM_MAIN (unsigned16) ifetch16 PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr)); | |
974 | +INLINE_SIM_MAIN (unsigned16) ifetch16 (SIM_DESC sd, sim_cpu *cpu, address_word cia, address_word vaddr); | |
975 | 975 | #define IMEM16(CIA) ifetch16 (SD, CPU, (CIA), ((CIA) & ~1)) |
976 | 976 | #define IMEM16_IMMED(CIA,NR) ifetch16 (SD, CPU, (CIA), ((CIA) & ~1) + 2 * (NR)) |
977 | 977 | |
978 | -void dotrace PARAMS ((SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, char *comment, ...)); | |
978 | +void dotrace (SIM_DESC sd, sim_cpu *cpu, FILE *tracefh, int type, SIM_ADDR address, int width, char *comment, ...); | |
979 | 979 | extern FILE *tracefh; |
980 | 980 | |
981 | 981 | extern int DSPLO_REGNUM[4]; |
982 | 982 | extern int DSPHI_REGNUM[4]; |
983 | 983 | |
984 | -INLINE_SIM_MAIN (void) pending_tick PARAMS ((SIM_DESC sd, sim_cpu *cpu, address_word cia)); | |
984 | +INLINE_SIM_MAIN (void) pending_tick (SIM_DESC sd, sim_cpu *cpu, address_word cia); | |
985 | 985 | extern SIM_CORE_SIGNAL_FN mips_core_signal; |
986 | 986 | |
987 | -char* pr_addr PARAMS ((SIM_ADDR addr)); | |
988 | -char* pr_uword64 PARAMS ((uword64 addr)); | |
987 | +char* pr_addr (SIM_ADDR addr); | |
988 | +char* pr_uword64 (uword64 addr); | |
989 | 989 | |
990 | 990 | |
991 | 991 | #define GPR_CLEAR(N) do { GPR_SET((N),0); } while (0) |
@@ -473,22 +473,22 @@ int valid[16]; | ||
473 | 473 | #define UNDEF(x) |
474 | 474 | #endif |
475 | 475 | |
476 | -static void parse_and_set_memory_size PARAMS ((char *str)); | |
477 | -static int IOMEM PARAMS ((int addr, int write, int value)); | |
478 | -static struct loop_bounds get_loop_bounds PARAMS ((int, int, unsigned char *, | |
479 | - unsigned char *, int, int)); | |
480 | -static void process_wlat_addr PARAMS ((int, int)); | |
481 | -static void process_wwat_addr PARAMS ((int, int)); | |
482 | -static void process_wbat_addr PARAMS ((int, int)); | |
483 | -static int process_rlat_addr PARAMS ((int)); | |
484 | -static int process_rwat_addr PARAMS ((int)); | |
485 | -static int process_rbat_addr PARAMS ((int)); | |
486 | -static void INLINE wlat_fast PARAMS ((unsigned char *, int, int, int)); | |
487 | -static void INLINE wwat_fast PARAMS ((unsigned char *, int, int, int, int)); | |
488 | -static void INLINE wbat_fast PARAMS ((unsigned char *, int, int, int)); | |
489 | -static int INLINE rlat_fast PARAMS ((unsigned char *, int, int)); | |
490 | -static int INLINE rwat_fast PARAMS ((unsigned char *, int, int, int)); | |
491 | -static int INLINE rbat_fast PARAMS ((unsigned char *, int, int)); | |
476 | +static void parse_and_set_memory_size (char *str); | |
477 | +static int IOMEM (int addr, int write, int value); | |
478 | +static struct loop_bounds get_loop_bounds (int, int, unsigned char *, | |
479 | + unsigned char *, int, int); | |
480 | +static void process_wlat_addr (int, int); | |
481 | +static void process_wwat_addr (int, int); | |
482 | +static void process_wbat_addr (int, int); | |
483 | +static int process_rlat_addr (int); | |
484 | +static int process_rwat_addr (int); | |
485 | +static int process_rbat_addr (int); | |
486 | +static void INLINE wlat_fast (unsigned char *, int, int, int); | |
487 | +static void INLINE wwat_fast (unsigned char *, int, int, int, int); | |
488 | +static void INLINE wbat_fast (unsigned char *, int, int, int); | |
489 | +static int INLINE rlat_fast (unsigned char *, int, int); | |
490 | +static int INLINE rwat_fast (unsigned char *, int, int, int); | |
491 | +static int INLINE rbat_fast (unsigned char *, int, int); | |
492 | 492 | |
493 | 493 | static host_callback *callback; |
494 | 494 |
@@ -469,9 +469,9 @@ enum op_types | ||
469 | 469 | }; |
470 | 470 | |
471 | 471 | #ifdef DEBUG |
472 | -void trace_input PARAMS ((char *name, enum op_types type, int size)); | |
473 | -void trace_output PARAMS ((enum op_types result)); | |
474 | -void trace_result PARAMS ((int has_result, unsigned32 result)); | |
472 | +void trace_input (char *name, enum op_types type, int size); | |
473 | +void trace_output (enum op_types result); | |
474 | +void trace_result (int has_result, unsigned32 result); | |
475 | 475 | |
476 | 476 | extern int trace_num_values; |
477 | 477 | extern unsigned32 trace_values[]; |
@@ -2,7 +2,7 @@ struct simops | ||
2 | 2 | { |
3 | 3 | unsigned long opcode; |
4 | 4 | unsigned long mask; |
5 | - int (* func) PARAMS ((void)); | |
5 | + int (* func) (void); | |
6 | 6 | int numops; |
7 | 7 | int operands[12]; |
8 | 8 | }; |