diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-09-03 07:30:17 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-09-03 07:30:17 +0000 |
commit | b5e935ae855757d6f0b51b28b0bbc48a4c996f69 (patch) | |
tree | 6a418160cb3c4081c7088a6ee8e092e7a410d7ac /sim/v850 | |
parent | fdd64f952debd1000ed87f077f0fea0ea1fb63dd (diff) | |
download | gdb-b5e935ae855757d6f0b51b28b0bbc48a4c996f69.zip gdb-b5e935ae855757d6f0b51b28b0bbc48a4c996f69.tar.gz gdb-b5e935ae855757d6f0b51b28b0bbc48a4c996f69.tar.bz2 |
Pacify gcc-current -Wall.
Diffstat (limited to 'sim/v850')
-rw-r--r-- | sim/v850/ChangeLog | 15 | ||||
-rw-r--r-- | sim/v850/Makefile.in | 2 | ||||
-rw-r--r-- | sim/v850/config.in | 7 | ||||
-rwxr-xr-x | sim/v850/configure | 9 | ||||
-rw-r--r-- | sim/v850/configure.in | 2 | ||||
-rw-r--r-- | sim/v850/interp.c | 30 | ||||
-rw-r--r-- | sim/v850/sim-main.h | 3 | ||||
-rw-r--r-- | sim/v850/simops.c | 4 |
8 files changed, 49 insertions, 23 deletions
diff --git a/sim/v850/ChangeLog b/sim/v850/ChangeLog index 85ac6b4..73ee049 100644 --- a/sim/v850/ChangeLog +++ b/sim/v850/ChangeLog @@ -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. diff --git a/sim/v850/Makefile.in b/sim/v850/Makefile.in index da851a9..7f5f222 100644 --- a/sim/v850/Makefile.in +++ b/sim/v850/Makefile.in @@ -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 diff --git a/sim/v850/config.in b/sim/v850/config.in index e455298..21ee17e 100644 --- a/sim/v850/config.in +++ b/sim/v850/config.in @@ -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 diff --git a/sim/v850/configure b/sim/v850/configure index 2395cb3..4853d8b 100755 --- a/sim/v850/configure +++ b/sim/v850/configure @@ -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* diff --git a/sim/v850/configure.in b/sim/v850/configure.in index b125c68..1eb128f 100644 --- a/sim/v850/configure.in +++ b/sim/v850/configure.in @@ -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 diff --git a/sim/v850/interp.c b/sim/v850/interp.c index f4871ce..03dec9c 100644 --- a/sim/v850/interp.c +++ b/sim/v850/interp.c @@ -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)")); } diff --git a/sim/v850/sim-main.h b/sim/v850/sim-main.h index cf2c093..95838ba 100644 --- a/sim/v850/sim-main.h +++ b/sim/v850/sim-main.h @@ -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; }; diff --git a/sim/v850/simops.c b/sim/v850/simops.c index fe1ed8f..29149c6 100644 --- a/sim/v850/simops.c +++ b/sim/v850/simops.c @@ -7,6 +7,10 @@ #include <utime.h> #endif +#ifdef HAVE_TIME_H +#include <time.h> +#endif + /* FIXME - should be including a version of syscall.h that does not pollute the name space */ #include "../../libgloss/v850/sys/syscall.h" |