aboutsummaryrefslogtreecommitdiff
path: root/sim/h8300/compile.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-07-27 09:39:50 +0000
committerAndrew Cagney <cagney@redhat.com>2000-07-27 09:39:50 +0000
commit0a17cd59446fd9191aa49369b8fd8b42a0c748cf (patch)
tree1832648a0fc1ddab4f5f59dc546529205d8faadc /sim/h8300/compile.c
parent78073dd899b80be1a70ad75d5c3fc9d538ad9f86 (diff)
downloadgdb-0a17cd59446fd9191aa49369b8fd8b42a0c748cf.zip
gdb-0a17cd59446fd9191aa49369b8fd8b42a0c748cf.tar.gz
gdb-0a17cd59446fd9191aa49369b8fd8b42a0c748cf.tar.bz2
* compile.c (decode): Distinguish inc/dec.[wl] and adds/subs
correctly.
Diffstat (limited to 'sim/h8300/compile.c')
-rw-r--r--sim/h8300/compile.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sim/h8300/compile.c b/sim/h8300/compile.c
index bbd28e5..3a22190 100644
--- a/sim/h8300/compile.c
+++ b/sim/h8300/compile.c
@@ -219,7 +219,10 @@ decode (addr, data, dst)
if (looking_for & DBIT)
{
- if ((looking_for & 5) != (thisnib & 5))
+ /* Exclude adds/subs by looking at bit 0 and 2, and
+ make sure the operand size, either w or l,
+ matches by looking at bit 1. */
+ if ((looking_for & 7) != (thisnib & 7))
goto fail;
abs = (thisnib & 0x8) ? 2 : 1;
@@ -292,6 +295,8 @@ decode (addr, data, dst)
case 0:
abs = 1;
break;
+ default:
+ goto fail;
}
}
else if (looking_for & L_8)