[PATCH] opcodes: blackfin: catch invalid loopsetup insns
Mike Frysinger
vapier@gentoo.org
Sun Feb 13 18:58:00 GMT 2011
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
More information about the Binutils
mailing list