aboutsummaryrefslogtreecommitdiff
path: root/sim/mips
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>1998-05-22 05:23:04 +0000
committerAndrew Cagney <cagney@redhat.com>1998-05-22 05:23:04 +0000
commitf872d0d643968c1101bb8c07b252edd54f626da2 (patch)
tree2adb6b0e807371efa17f46a5c5625194d770abac /sim/mips
parent32d41f6ddbcfdca096f753adaa17691d7a1b4afd (diff)
downloadgdb-f872d0d643968c1101bb8c07b252edd54f626da2.zip
gdb-f872d0d643968c1101bb8c07b252edd54f626da2.tar.gz
gdb-f872d0d643968c1101bb8c07b252edd54f626da2.tar.bz2
Only enable H/W on some mips targets.
Move common hw-obj to Make-common Pacify GCC
Diffstat (limited to 'sim/mips')
-rw-r--r--sim/mips/ChangeLog11
-rw-r--r--sim/mips/configure.in10
-rw-r--r--sim/mips/dv-tx3904irc.c7
3 files changed, 20 insertions, 8 deletions
diff --git a/sim/mips/ChangeLog b/sim/mips/ChangeLog
index 67c2f47..5a6a0e0 100644
--- a/sim/mips/ChangeLog
+++ b/sim/mips/ChangeLog
@@ -1,3 +1,14 @@
+start-sanitize-tx3904
+Fri May 22 13:34:20 1998 Andrew Cagney <cagney@b1.cygnus.com>
+
+ * configure.in (SIM_AC_OPTION_HARDWARE): Only enable when tx3904.
+ * interp.c (sim_open): Only create a device tree when HW is
+ enabled.
+
+ * dv-tx3904irc.c (tx3904irc_finish): Pacify GCC.
+ * interp.c (signal_exception): Ditto.
+
+end-sanitize-tx3904
Thu May 21 14:24:11 1998 Gavin Koch <gavin@cygnus.com>
* gencode.c: Mark BEGEZALL as LIKELY.
diff --git a/sim/mips/configure.in b/sim/mips/configure.in
index f5148e5..adeb32e 100644
--- a/sim/mips/configure.in
+++ b/sim/mips/configure.in
@@ -239,15 +239,17 @@ AC_SUBST(mips_extra_objs)
+# start-sanitize-tx3904
+#
# Add simulated hardware devices
#
-SIM_AC_OPTION_HARDWARE()
+hw_enabled=no
case "${target}" in
-# start-sanitize-tx3904
- mips*tx39*) SIM_AC_OPTION_HARDWARE(,tx3904cpu tx3904irc) ;;
-# end-sanitize-tx3904
+ mips*tx39*) hw_enabled=yes ; hw_extra_devices="tx3904cpu tx3904irc" ;;
*) ;;
esac
+SIM_AC_OPTION_HARDWARE($hw_enabled,$hw_devices,$hw_extra_devices)
+# end-sanitize-tx3904
AC_PATH_X
diff --git a/sim/mips/dv-tx3904irc.c b/sim/mips/dv-tx3904irc.c
index f11f4c0..d8064d3 100644
--- a/sim/mips/dv-tx3904irc.c
+++ b/sim/mips/dv-tx3904irc.c
@@ -217,7 +217,6 @@ attach_tx3904irc_regs (struct hw *me,
static void
tx3904irc_finish (struct hw *me)
{
- int i;
struct tx3904irc *controller;
controller = HW_ZALLOC (me, struct tx3904irc);
@@ -274,7 +273,7 @@ tx3904irc_port_event (struct hw *me,
if(ILR_GET(controller, source) > IMR_GET(controller))
{
int ip_number = 16 + source; /* compute IP[4:0] */
- HW_TRACE ((me, "interrupt level %d", ILR_GET(controller,source)));
+ HW_TRACE ((me, "interrupt level %ld", ILR_GET(controller,source)));
hw_port_event(me, IP_PORT, ip_number);
}
break;
@@ -336,7 +335,7 @@ tx3904irc_io_read_buffer (struct hw *me,
}
/* write requested byte out */
- memcpy(dest+byte, ((char*)& register_value)+reg_offset, 1);
+ memcpy ((char*) dest + byte, ((char*)& register_value)+reg_offset, 1);
}
return nr_bytes;
@@ -378,7 +377,7 @@ tx3904irc_io_write_buffer (struct hw *me,
HW_TRACE ((me, "reg %d pre: %08lx", reg_number, (long) *register_ptr));
/* overwrite requested byte */
- memcpy(((char*)register_ptr)+reg_offset, source+byte, 1);
+ memcpy (((char*)register_ptr)+reg_offset, (char*)source + byte, 1);
HW_TRACE ((me, "post: %08lx", (long) *register_ptr));
}