* dv-sockser.c, dv-sockser.h: New files.
authorDoug Evans <dje@google.com>
Sun, 15 Mar 1998 02:43:00 +0000 (02:43 +0000)
committerDoug Evans <dje@google.com>
Sun, 15 Mar 1998 02:43:00 +0000 (02:43 +0000)
* Make-common.in (dv-sockser.o): Add rule for.
* aclocal.m4: Check for fcntl.h.
* config.h: Add HAVE_FCNTL_H.

* sim-break.c (remove_breakpoint): Fix thinko.

* sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.

sim/common/.Sanitize
sim/common/ChangeLog
sim/common/Make-common.in
sim/common/aclocal.m4
sim/common/dv-sockser.h [new file with mode: 0644]
sim/common/sim-break.c

index 9558757747f1773ef5320c186bfd7232d9067233..dd1d6cfd0dc730b7df54b30f18ef3142309d7176 100644 (file)
@@ -46,6 +46,8 @@ cgen-utils.c
 config.in
 configure.in
 configure
+dv-sockser.c
+dv-sockser.h
 gdbinit.in
 genmloop.sh
 gennltvals.sh
index 95fefc9cdd8bf3df4a384ac7d376f980de06eee1..d7e64d32135fdfd7c3e71db1a1e93ffd3b1c4bda 100644 (file)
@@ -1,3 +1,15 @@
+Sat Mar 14 18:36:12 1998  Doug Evans  <devans@seba.cygnus.com>
+
+       * dv-sockser.c, dv-sockser.h: New files.
+       * Make-common.in (dv-sockser.o): Add rule for.
+       * aclocal.m4: Check for fcntl.h.
+       * config.h: Add HAVE_FCNTL_H.
+
+       * sim-break.c (remove_breakpoint): Fix thinko.
+
+       * sim-hload.c (sim_load): Provide default value of SIM_HANDLES_LMA.
+       Use SIM_HANDLES_LMA for lma_p arg to sim_load_file.
+
 1998-03-13  Fred Fish  <fnf@cygnus.com>
 
        * sim-base.h (struct sim_state_base): Add prog_syms and
index 485b676a12d5de2098f30939b1f8e7085be8c7c3..759f3353c890614bbacbd87d42266ff572f70d5a 100644 (file)
@@ -408,6 +408,11 @@ nrun.o: $(srccom)/nrun.c config.h tconfig.h \
          $(sim_main_headers)
        $(CC) -c $(srccom)/nrun.c $(ALL_CFLAGS)
 
+# Devices.
+
+dv-sockser.o: $(srccom)/dv-sockser.h $(sim_main_headers)
+       $(CC) -c $(srccom)/dv-sockser.c $(ALL_CFLAGS)
+
 # CGEN support.
 
 cgen-run.o: $(srccom)/cgen-run.c $(sim_main_headers) \
@@ -448,8 +453,12 @@ MAKEOVERRIDES=
 
 tags etags: TAGS
 
+# Macros like EXTERN_SIM_CORE confuse tags.
+# And the sim-n-foo.h files create functions that can't be found either.
 TAGS: force
-       etags --regex '/^\/[*] TAGS: .*/' *.c *.h
+       cd $(srcdir) && \
+       etags --regex '/^\([a-z_]+\) (/\1/' --regex '/^\/[*] TAGS: .*/' \
+               *.[ch] ../common/*.[ch]
 
 clean: $(SIM_EXTRA_CLEAN)
        rm -f *.[oa] *~ core
index 990dfa217ae69fc1e338db4f6963ad11e05cda49..67c5768b0957f521786b317075f43154fd38d777 100644 (file)
@@ -46,7 +46,9 @@ AC_PROG_RANLIB
 # Check for common headers.
 # FIXME: Seems to me this can cause problems for i386-windows hosts.
 # At one point there were hardcoded AC_DEFINE's if ${host} = i386-*-windows*.
-AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h sys/time.h sys/resource.h)
+AC_CHECK_HEADERS(stdlib.h string.h strings.h unistd.h time.h)
+AC_CHECK_HEADERS(sys/time.h sys/resource.h)
+AC_CHECK_HEADERS(fcntl.h)
 AC_CHECK_FUNCS(getrusage time sigaction)
 
 . ${srcdir}/../../bfd/configure.host
@@ -60,10 +62,11 @@ dnl all shall eventually behave the same way.
 
 dnl We don't use automake, but we still want to support
 dnl --enable-maintainer-mode.
+USE_MAINTAINER_MODE=no
 AC_ARG_ENABLE(maintainer-mode,
 [  --enable-maintainer-mode            Enable developer functionality.],
 [case "${enableval}" in
-  yes) MAINT="" ;;
+  yes) MAINT="" USE_MAINTAINER_MODE=yes ;;
   no)  MAINT="#" ;;
   *)   AC_MSG_ERROR("--enable-maintainer-mode does not take a value"); MAINT="#" ;;
 esac
@@ -472,19 +475,35 @@ fi])dnl
 AC_SUBST(sim_hostendian)
 
 
+dnl --enable-sim-float is for developers of the simulator
+dnl It specifies the presence of hardware floating point
+dnl And optionally the bitsize of the floating point register.
+dnl arg[1] specifies the presence (or absence) of floating point hardware
+dnl arg[2] specifies the number of bits in a floating point register
 AC_DEFUN(SIM_AC_OPTION_FLOAT,
 [
-default_sim_floating_point="ifelse([$1],,0,[$1])"
+default_sim_float="[$1]"
+default_sim_float_bitsize="[$2]"
 AC_ARG_ENABLE(sim-float,
 [  --enable-sim-float                  Specify that the target processor has floating point hardware.],
 [case "${enableval}" in
   yes | hard)  sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT";;
   no | soft)   sim_float="-DWITH_FLOATING_POINT=SOFT_FLOATING_POINT";;
+  32)           sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=32";;
+  64)           sim_float="-DWITH_FLOATING_POINT=HARD_FLOATING_POINT -DWITH_TARGET_FLOATING_POINT_BITSIZE=64";;
   *)           AC_MSG_ERROR("Unknown value $enableval passed to --enable-sim-float"); sim_float="";;
 esac
 if test x"$silent" != x"yes" && test x"$sim_float" != x""; then
   echo "Setting float flags = $sim_float" 6>&1
-fi],[sim_float="-DWITH_FLOATING_POINT=${default_sim_floating_point}"])dnl
+fi],[
+sim_float=
+if test x"${default_sim_float}" != x""; then
+  sim_float="-DWITH_FLOATING_POINT=${default_sim_float}"
+fi
+if test x"${default_sim_float_bitsize}" != x""; then
+  sim_float="$sim_float -DWITH_TARGET_FLOATING_POINT_BITSIZE=${default_sim_float_bitsize}"
+fi
+])dnl
 ])
 AC_SUBST(sim_float)
 
diff --git a/sim/common/dv-sockser.h b/sim/common/dv-sockser.h
new file mode 100644 (file)
index 0000000..ef0a7a9
--- /dev/null
@@ -0,0 +1,32 @@
+/* Serial port emulation via sockets.
+   Copyright (C) 1998, Free Software Foundation, Inc.
+
+This file is part of the GNU simulators.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License along
+with this program; if not, write to the Free Software Foundation, Inc.,
+59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+
+#ifndef DV_SOCKSER_H
+#define DV_SOCKSER_H
+
+/* bits in result of dev_sockser_status */
+#define DV_SOCKSER_INPUT_EMPTY  1
+#define DV_SOCKSER_OUTPUT_EMPTY 2
+
+/* FIXME: later add a device ptr arg */
+extern int dv_sockser_status (SIM_DESC);
+int dv_sockser_write (SIM_DESC, unsigned char);
+int dv_sockser_read (SIM_DESC);
+
+#endif /* DV_SOCKSER_H */
index 07d1f954e83996a1233fc6611441e2ea3714a867..3b89560aeb1a9cbe43c184df4c14df29836c3329 100644 (file)
@@ -82,7 +82,7 @@ remove_breakpoint (sd, bp)
 
   sim_core_write_buffer (sd, NULL, exec_map, bp->loc_contents,
                         bp->addr, SIM_BREAKPOINT_SIZE);
-  bp->flags &= SIM_BREAK_INSERTED;
+  bp->flags &= ~SIM_BREAK_INSERTED;
 }
 
 /* Come here when a breakpoint insn is hit.  If it's really a breakpoint, we
@@ -161,7 +161,7 @@ sim_set_breakpoint (sd, addr)
     if (bp->addr == addr)
       return SIM_RC_DUPLICATE_BREAKPOINT; /* Already there */
     else
-      break;
+      break; /* FIXME: why not scan all bp's? */
 
   bp = ZALLOC (struct sim_breakpoint);
 
This page took 0.033228 seconds and 4 git commands to generate.