summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2010-09-22 21:53:14 +0000
committerMike Frysinger <vapier@gentoo.org>2010-09-22 21:53:14 +0000
commit42ea3f197a3b79326ce9afa879f457d099904a78 (patch)
treecdf7b91a7dffbb57120ea432db32b16a676c1684
parentdbf5b9a206adfef08b96c787267ab17582ceb1b6 (diff)
downloadbinutils-redhat-42ea3f197a3b79326ce9afa879f457d099904a78.tar.gz
opcodes: blackfin: mark push/pop insns with a P6/P7 range as illegal
The push/pop multiple insn has a 3 bit field for the P register range, but only values of 0...5 are valid (P0 - P5). There is no such P6 or P7 register, so mark these insns as illegal. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rw-r--r--opcodes/ChangeLog4
-rw-r--r--opcodes/bfin-dis.c3
2 files changed, 7 insertions, 0 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog
index 3067e3cce7..f11938c340 100644
--- a/opcodes/ChangeLog
+++ b/opcodes/ChangeLog
@@ -1,3 +1,7 @@
+2010-09-22 Mike Frysinger <vapier@gentoo.org>
+
+ * bfin-dis.c (decode_PushPopMultiple_0): Return 0 when pr > 5.
+
2010-09-22 Robin Getz <robin.getz@analog.com>
* bfin-dis.c (decode_dsp32shiftimm_0): Add missing "S" flag.
diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c
index a510db1e76..0ce0ecf46f 100644
--- a/opcodes/bfin-dis.c
+++ b/opcodes/bfin-dis.c
@@ -936,6 +936,9 @@ decode_PushPopMultiple_0 (TIword iw0, disassemble_info *outf)
int dr = ((iw0 >> PushPopMultiple_dr_bits) & PushPopMultiple_dr_mask);
int pr = ((iw0 >> PushPopMultiple_pr_bits) & PushPopMultiple_pr_mask);
+ if (pr > 5)
+ return 0;
+
if (W == 1 && d == 1 && p == 1)
{
OUTS (outf, "[--SP] = (R7:");