This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] opcodes: blackfin: catch invalid loopsetup insns
- From: Mike Frysinger <vapier at gentoo dot org>
- To: binutils at sourceware dot org
- Cc: toolchain-devel at blackfin dot uclinux dot org
- Date: Sun, 13 Feb 2011 13:58:33 -0500
- Subject: [PATCH] opcodes: blackfin: catch invalid loopsetup insns
The LoopSetup insn is only valid when the reg field is 0-7, so
don't go decoding it incorrectly when reg is 8-15.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2011-02-05 Mike Frysinger <vapier@gentoo.org>
* bfin-dis.c (decode_LoopSetup_0): Return when reg is greater
than 7.
---
opcodes/bfin-dis.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c
index c7dd5b8..bd536eb 100644
--- a/opcodes/bfin-dis.c
+++ b/opcodes/bfin-dis.c
@@ -2620,6 +2620,9 @@ decode_LoopSetup_0 (TIword iw0, TIword iw1, bfd_vma pc, disassemble_info *outf)
if (priv->parallel)
return 0;
+ if (reg > 7)
+ return 0;
+
if (rop == 0)
{
OUTS (outf, "LSETUP");
--
1.7.4.1