Pacify gcc-current -Wall.
This commit is contained in:
parent
fdd64f952d
commit
b5e935ae85
8 changed files with 49 additions and 23 deletions
|
@ -1,5 +1,20 @@
|
|||
Wed Sep 3 10:18:55 1997 Andrew Cagney <cagney@b1.cygnus.com>
|
||||
|
||||
* sim-main.h: Replace SIM_HAVE_FLATMEM with mem ptr.
|
||||
* interp.c (map): Do not add to a void pointer.
|
||||
|
||||
* Makefile.in (INCLUDE): Add sim-main.h
|
||||
|
||||
* configure.in: Check for time.h
|
||||
* configure: Re-generate.
|
||||
|
||||
* interp.c (struct interrupt_generator): Make time unsigned long,
|
||||
address SIM_ADDR.
|
||||
(sim_resume): Make oldpc SIM_ADDR.
|
||||
(struct hash_entry): Make mask/opcode unsigned.
|
||||
|
||||
* v850_sim.h (struct simops ): Make opcode and mask unsigned.
|
||||
|
||||
* simops.c (utime.h): Include if available.
|
||||
(OP_10007E0): Check for UTIME function.
|
||||
(divun): Put parentheses around shift argument.
|
||||
|
|
|
@ -44,7 +44,7 @@ SIM_EXTRA_CFLAGS = -I$(srcdir)/../../newlib/libc/sys/sysnecv850 \
|
|||
$(SIM_HOSTENDIAN)
|
||||
SIM_EXTRA_CLEAN = clean-extra
|
||||
|
||||
INCLUDE = v850_sim.h $(srcdir)/../../include/callback.h
|
||||
INCLUDE = v850_sim.h sim-main.h $(srcdir)/../../include/callback.h
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
/* Define as the return type of signal handlers (int or void). */
|
||||
#undef RETSIGTYPE
|
||||
|
||||
/* Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
#undef WORDS_BIGENDIAN
|
||||
|
||||
/* Define if you have the getrusage function. */
|
||||
#undef HAVE_GETRUSAGE
|
||||
|
||||
|
@ -29,3 +33,6 @@
|
|||
|
||||
/* Define if you have the <unistd.h> header file. */
|
||||
#undef HAVE_UNISTD_H
|
||||
|
||||
/* Define if you have the <utime.h> header file. */
|
||||
#undef HAVE_UTIME_H
|
||||
|
|
9
sim/v850/configure
vendored
9
sim/v850/configure
vendored
|
@ -1512,24 +1512,25 @@ EOF
|
|||
chmod
|
||||
else
|
||||
echo "$ac_t""no" 1>&6
|
||||
utime
|
||||
fi
|
||||
done
|
||||
|
||||
for ac_hdr in unistd.h
|
||||
for ac_hdr in unistd.h stdlib.h string.h strings.h utime.h time.h
|
||||
do
|
||||
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
|
||||
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
|
||||
echo "configure:1523: checking for $ac_hdr" >&5
|
||||
echo "configure:1524: checking for $ac_hdr" >&5
|
||||
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
|
||||
echo $ac_n "(cached) $ac_c" 1>&6
|
||||
else
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
#line 1528 "configure"
|
||||
#line 1529 "configure"
|
||||
#include "confdefs.h"
|
||||
#include <$ac_hdr>
|
||||
EOF
|
||||
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
|
||||
{ (eval echo configure:1533: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
{ (eval echo configure:1534: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
|
||||
ac_err=`grep -v '^ *+' conftest.out`
|
||||
if test -z "$ac_err"; then
|
||||
rm -rf conftest*
|
||||
|
|
|
@ -10,6 +10,6 @@ SIM_AC_OPTION_HOSTENDIAN
|
|||
SIM_AC_OPTION_WARNINGS
|
||||
|
||||
AC_CHECK_FUNCS(time, chmod, utime)
|
||||
AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h utime.h)
|
||||
AC_CHECK_HEADERS(unistd.h stdlib.h string.h strings.h utime.h time.h)
|
||||
|
||||
SIM_AC_OUTPUT
|
||||
|
|
|
@ -47,8 +47,8 @@ struct interrupt_generator
|
|||
enum interrupt_type type;
|
||||
enum interrupt_cond_type cond_type;
|
||||
int number;
|
||||
int address;
|
||||
int time;
|
||||
SIM_ADDR address;
|
||||
unsigned long time;
|
||||
int enabled;
|
||||
struct interrupt_generator *next;
|
||||
};
|
||||
|
@ -105,8 +105,8 @@ static void do_format_9_10 PARAMS ((uint32));
|
|||
struct hash_entry
|
||||
{
|
||||
struct hash_entry *next;
|
||||
long opcode;
|
||||
long mask;
|
||||
unsigned long opcode;
|
||||
unsigned long mask;
|
||||
struct simops *ops;
|
||||
};
|
||||
|
||||
|
@ -223,13 +223,13 @@ map (addr)
|
|||
{
|
||||
/* "Mirror" the addresses below 1MB. */
|
||||
addr = addr & (simulator->rom_size - 1);
|
||||
return (uint8 *) (addr + STATE_MEMORY (simulator));
|
||||
return (uint8 *) (simulator->mem) + addr;
|
||||
}
|
||||
else if (addr < simulator->low_end)
|
||||
{
|
||||
/* chunk is just after the rom */
|
||||
addr = addr - 0x100000 + simulator->rom_size;
|
||||
return (uint8 *) (addr + STATE_MEMORY (simulator));
|
||||
return (uint8 *) (simulator->mem) + addr;
|
||||
}
|
||||
else if (addr >= simulator->high_start)
|
||||
{
|
||||
|
@ -240,7 +240,7 @@ map (addr)
|
|||
else if (addr >= 0xffe000)
|
||||
addr &= 0xffe3ff;
|
||||
addr = addr - simulator->high_start + simulator->high_base;
|
||||
return (uint8 *) (STATE_MEMORY (simulator));
|
||||
return (uint8 *) (simulator->mem) + addr;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -311,8 +311,8 @@ sim_memory_init (SIM_DESC sd)
|
|||
{
|
||||
int totsize;
|
||||
|
||||
if (STATE_MEMORY (sd))
|
||||
zfree (STATE_MEMORY (sd));
|
||||
if (sd->mem)
|
||||
zfree (sd->mem);
|
||||
|
||||
totsize = (simulator->rom_size
|
||||
+ (sd->low_end - 0x100000)
|
||||
|
@ -320,8 +320,8 @@ sim_memory_init (SIM_DESC sd)
|
|||
|
||||
sd->high_base = sd->rom_size + (sd->low_end - 0x100000);
|
||||
|
||||
STATE_MEMORY (sd) = zalloc (totsize);
|
||||
if (!STATE_MEMORY (sd))
|
||||
sd->mem = zalloc (totsize);
|
||||
if (!sd->mem)
|
||||
{
|
||||
sim_io_error (sd, "Allocation of main memory failed.");
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ sim_resume (sd, step, siggnal)
|
|||
{
|
||||
SIM_ELAPSED_TIME start_time;
|
||||
uint32 inst;
|
||||
reg_t oldpc;
|
||||
SIM_ADDR oldpc;
|
||||
struct interrupt_generator *intgen;
|
||||
|
||||
if (step)
|
||||
|
@ -816,7 +816,7 @@ sim_set_interrupt (sd, spec)
|
|||
intgen->enabled = 1;
|
||||
intgen->next = intgen_list;
|
||||
intgen_list = intgen;
|
||||
sim_io_printf (sd, "Interrupt generator %d (NMI) at pc=0x%x, time=%d.\n", intgen_list->number, intgen_list->address, intgen_list->time);
|
||||
sim_io_printf (sd, "Interrupt generator %d (NMI) at pc=0x%x, time=%ld.\n", intgen_list->number, intgen_list->address, intgen_list->time);
|
||||
}
|
||||
else if (*argv && !strcmp (*argv, "remove"))
|
||||
{
|
||||
|
@ -853,10 +853,10 @@ sim_set_interrupt (sd, spec)
|
|||
if (intgen_list)
|
||||
{
|
||||
for (intgen = intgen_list; intgen != NULL; intgen = intgen->next)
|
||||
sim_io_printf (sd, "Interrupt generator %d (%s) at pc=0x%x/time=%d%s.\n",
|
||||
sim_io_printf (sd, "Interrupt generator %d (%s) at pc=0x%lx/time=%ld%s.\n",
|
||||
intgen->number,
|
||||
interrupt_names[intgen->type],
|
||||
intgen->address,
|
||||
(long) intgen->address,
|
||||
intgen->time,
|
||||
(intgen->enabled ? "" : " (disabled)"));
|
||||
}
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#define SIM_HAVE_FLATMEM 1
|
||||
|
||||
#include "sim-basics.h"
|
||||
|
||||
typedef address_word sim_cia;
|
||||
|
@ -49,6 +47,7 @@ struct sim_state {
|
|||
SIM_ADDR low_end;
|
||||
SIM_ADDR high_start;
|
||||
SIM_ADDR high_base;
|
||||
void *mem;
|
||||
sim_state_base base;
|
||||
};
|
||||
|
||||
|
|
|
@ -5,6 +5,10 @@
|
|||
|
||||
#ifdef HAVE_UTIME_H
|
||||
#include <utime.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_TIME_H
|
||||
#include <time.h>
|
||||
#endif
|
||||
|
||||
/* FIXME - should be including a version of syscall.h that does not
|
||||
|
|
Loading…
Reference in a new issue