]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Pacify gcc-current -Wall.
authorAndrew Cagney <cagney@redhat.com>
Wed, 3 Sep 1997 07:30:17 +0000 (07:30 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 3 Sep 1997 07:30:17 +0000 (07:30 +0000)
sim/v850/ChangeLog
sim/v850/Makefile.in
sim/v850/config.in
sim/v850/configure
sim/v850/configure.in
sim/v850/interp.c
sim/v850/sim-main.h
sim/v850/simops.c

index 85ac6b4d4af85f754e986e7128d8aa23b26e094f..73ee049f3bc3ec15f82a5fa7162d139f1112c448 100644 (file)
@@ -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.
index da851a9bee1c1c454ff2c9d43dc4605279432797..7f5f222b92baeced358c94de5f34b1f484d63869 100644 (file)
@@ -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
 
index e455298d92e556724a90317115b37f67fc7efa1f..21ee17e05321a1dfbc93a8f9fa5006dbe1617bee 100644 (file)
@@ -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
index 2395cb3bcbf117c2346c13d38ec5b73138008632..4853d8bd13b7411d4c4e7e3c0c1f6722f3c0686b 100755 (executable)
@@ -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*
index b125c68af5ca0f13a4f4dfdfe55d4c8c5d901373..1eb128f70be029380aaf0d35a1f1b10ddc62f9d9 100644 (file)
@@ -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
index f4871ce6540b5a96cc00230dc2d6a661d411b4b0..03dec9c8e9f166c5453d482f189acda9ea46e05f 100644 (file)
@@ -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)"));
        }
index cf2c09359220604ef97f365da69a4d8f5bf4aaf1..95838babe607d32cddb1edf2bd6dee945755b9cd 100644 (file)
@@ -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;
 };
 
index fe1ed8f124ddb2184dba35a604ce47109359d7da..29149c648233e6f06f8e30338508e25a17c67f56 100644 (file)
@@ -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