aboutsummaryrefslogtreecommitdiff
path: root/sim/mn10300
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-11-07 16:26:05 +0000
committerMike Frysinger <vapier@gentoo.org>2011-11-07 16:26:05 +0000
commit481d79819e0e47f23f20408a6595333012da6f58 (patch)
treec47193a904ca58d414cd6828b6163d9c41ad9789 /sim/mn10300
parentc90460e4507bd27eb11a55e3f4591309cfe6821e (diff)
downloadgdb-481d79819e0e47f23f20408a6595333012da6f58.zip
gdb-481d79819e0e47f23f20408a6595333012da6f58.tar.gz
gdb-481d79819e0e47f23f20408a6595333012da6f58.tar.bz2
sim: mn10300: fix typo in if check
The code looks like it should be doing a bit check, not logical. URL: http://sourceware.org/bugzilla/show_bug.cgi?id=9302 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/mn10300')
-rw-r--r--sim/mn10300/ChangeLog5
-rw-r--r--sim/mn10300/dv-mn103iop.c4
2 files changed, 7 insertions, 2 deletions
diff --git a/sim/mn10300/ChangeLog b/sim/mn10300/ChangeLog
index cc2cbb1..5374542 100644
--- a/sim/mn10300/ChangeLog
+++ b/sim/mn10300/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-07 Mike Frysinger <vapier@gentoo.org>
+
+ PR sim/9302
+ * dv-mn103iop.c (write_dedicated_control_reg): Convert && to &.
+
2011-10-19 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate after common/acinclude.m4 update.
diff --git a/sim/mn10300/dv-mn103iop.c b/sim/mn10300/dv-mn103iop.c
index 15a299d..8134377 100644
--- a/sim/mn10300/dv-mn103iop.c
+++ b/sim/mn10300/dv-mn103iop.c
@@ -463,7 +463,7 @@ write_dedicated_control_reg (struct hw *me,
/* select on io_port_reg: */
if ( io_port_reg == P2SS )
{
- if ( (buf && 0xfc) != 0 )
+ if ( (buf & 0xfc) != 0 )
{
hw_abort(me, "Cannot write to read-only bits in p2ss.");
}
@@ -474,7 +474,7 @@ write_dedicated_control_reg (struct hw *me,
}
else
{
- if ( (buf && 0xf0) != 0 )
+ if ( (buf & 0xf0) != 0 )
{
hw_abort(me, "Cannot write to read-only bits in p4ss.");
}