* compile.c: Change K&R function definitions to ISO.
(fetch): Make static, and eliminate unused parameter 'n'.
+2003-01-16 Michael Snyder <msnyder@redhat.com>
+
+ * compile.c: Change K&R function definitions to ISO.
+ (fetch): Make static, and eliminate unused parameter 'n'.
+
2002-12-26 Kazu Hirata <kazu@cs.umass.edu>
* compile.c: Fix formatting.
2002-12-26 Kazu Hirata <kazu@cs.umass.edu>
* compile.c: Fix formatting.
static int memory_size;
static int
static int memory_size;
static int
{
return time (0); /* WinXX HAS UNIX like 'time', so why not using it? */
}
static int
{
return time (0); /* WinXX HAS UNIX like 'time', so why not using it? */
}
static int
-decode (addr, data, dst)
- int addr;
- unsigned char *data;
- decoded_inst *dst;
-
+decode (int addr, unsigned char *data, decoded_inst *dst)
{
int rs = 0;
int rd = 0;
{
int rs = 0;
int rd = 0;
#define SET_MEMORY_B(x,y) \
(x < memory_size ? (cpu.memory[(x)] = y) : (cpu.eightbit[x & 0xff] = y))
#define SET_MEMORY_B(x,y) \
(x < memory_size ? (cpu.memory[(x)] = y) : (cpu.eightbit[x & 0xff] = y))
-int
-fetch (arg, n)
- ea_type *arg;
+static int
+fetch (ea_type *arg)
{
int rn = arg->reg;
int abs = arg->literal;
{
int rn = arg->reg;
int abs = arg->literal;
-store (arg, n)
- ea_type *arg;
- int n;
+store (ea_type *arg, int n)
{
int rn = arg->reg;
int abs = arg->literal;
{
int rn = arg->reg;
int abs = arg->literal;
littleendian;
static void
littleendian;
static void
-control_c (sig, code, scp, addr)
- int sig;
- int code;
- char *scp;
- char *addr;
{
cpu.state = SIM_STATE_STOPPED;
cpu.exception = SIGINT;
{
cpu.state = SIM_STATE_STOPPED;
cpu.exception = SIGINT;
#define I (intMaskBit != 0)
static int
#define I (intMaskBit != 0)
static int
-mop (code, bsize, sign)
- decoded_inst *code;
- int bsize;
- int sign;
+mop (decoded_inst *code, int bsize, int sign)
{
int multiplier;
int multiplicand;
{
int multiplier;
int multiplicand;
#define TICK_REGNUM 13
void
#define TICK_REGNUM 13
void
-sim_resume (sd, step, siggnal)
- SIM_DESC sd;
+sim_resume (SIM_DESC sd, int step, int siggnal)
{
static int init1;
int cycles = 0;
{
static int init1;
int cycles = 0;
-sim_trace (sd)
- SIM_DESC sd;
{
/* FIXME: Unfinished. */
abort ();
}
int
{
/* FIXME: Unfinished. */
abort ();
}
int
-sim_write (sd, addr, buffer, size)
- SIM_DESC sd;
- SIM_ADDR addr;
- unsigned char *buffer;
- int size;
+sim_write (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
-sim_read (sd, addr, buffer, size)
- SIM_DESC sd;
- SIM_ADDR addr;
- unsigned char *buffer;
- int size;
+sim_read (SIM_DESC sd, SIM_ADDR addr, unsigned char *buffer, int size)
{
init_pointers ();
if (addr < 0)
{
init_pointers ();
if (addr < 0)
-sim_store_register (sd, rn, value, length)
- SIM_DESC sd;
- int rn;
- unsigned char *value;
- int length;
+sim_store_register (SIM_DESC sd, int rn, unsigned char *value, int length)
{
int longval;
int shortval;
{
int longval;
int shortval;
-sim_fetch_register (sd, rn, buf, length)
- SIM_DESC sd;
- int rn;
- unsigned char *buf;
- int length;
+sim_fetch_register (SIM_DESC sd, int rn, unsigned char *buf, int length)
{
int v;
int longreg = 0;
{
int v;
int longreg = 0;
-sim_stop_reason (sd, reason, sigrc)
- SIM_DESC sd;
- enum sim_stop *reason;
- int *sigrc;
+sim_stop_reason (SIM_DESC sd, enum sim_stop *reason, int *sigrc)
{
#if 0 /* FIXME: This should work but we can't use it.
grep for SLEEP above. */
{
#if 0 /* FIXME: This should work but we can't use it.
grep for SLEEP above. */
/* FIXME: Rename to sim_set_mem_size. */
void
/* FIXME: Rename to sim_set_mem_size. */
void
{
/* Memory size is fixed. */
}
void
{
/* Memory size is fixed. */
}
void
-sim_set_simcache_size (n)
+sim_set_simcache_size (int n)
{
if (cpu.cache)
free (cpu.cache);
{
if (cpu.cache)
free (cpu.cache);
-sim_info (sd, verbose)
- SIM_DESC sd;
- int verbose;
+sim_info (SIM_DESC sd, int verbose)
{
double timetaken = (double) cpu.ticks / (double) now_persec ();
double virttime = cpu.cycles / 10.0e6;
{
double timetaken = (double) cpu.ticks / (double) now_persec ();
double virttime = cpu.cycles / 10.0e6;
FLAG is non-zero for the H8/300H. */
void
FLAG is non-zero for the H8/300H. */
void
-set_h8300h (h_flag, s_flag)
- int h_flag, s_flag;
+set_h8300h (int h_flag, int s_flag)
{
/* FIXME: Much of the code in sim_load can be moved to sim_open.
This function being replaced by a sim_open:ARGV configuration
{
/* FIXME: Much of the code in sim_load can be moved to sim_open.
This function being replaced by a sim_open:ARGV configuration
-sim_open (kind, ptr, abfd, argv)
- SIM_OPEN_KIND kind;
- struct host_callback_struct *ptr;
- struct _bfd *abfd;
- char **argv;
+sim_open (SIM_OPEN_KIND kind,
+ struct host_callback_struct *ptr,
+ struct _bfd *abfd,
+ char **argv)
{
/* FIXME: Much of the code in sim_load can be moved here. */
{
/* FIXME: Much of the code in sim_load can be moved here. */
-sim_close (sd, quitting)
- SIM_DESC sd;
- int quitting;
+sim_close (SIM_DESC sd, int quitting)
/* Called by gdb to load a program into memory. */
SIM_RC
/* Called by gdb to load a program into memory. */
SIM_RC
-sim_load (sd, prog, abfd, from_tty)
- SIM_DESC sd;
- char *prog;
- bfd *abfd;
- int from_tty;
+sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
-sim_create_inferior (sd, abfd, argv, env)
- SIM_DESC sd;
- struct _bfd *abfd;
- char **argv;
- char **env;
+sim_create_inferior (SIM_DESC sd, struct _bfd *abfd, char **argv, char **env)
{
if (abfd != NULL)
cpu.pc = bfd_get_start_address (abfd);
{
if (abfd != NULL)
cpu.pc = bfd_get_start_address (abfd);
-sim_do_command (sd, cmd)
- SIM_DESC sd;
- char *cmd;
+sim_do_command (SIM_DESC sd, char *cmd)
{
(*sim_callback->printf_filtered) (sim_callback,
"This simulator does not accept any commands.\n");
}
void
{
(*sim_callback->printf_filtered) (sim_callback,
"This simulator does not accept any commands.\n");
}
void
-sim_set_callbacks (ptr)
- struct host_callback_struct *ptr;
+sim_set_callbacks (struct host_callback_struct *ptr)