* [PATCH] opcodes: blackfin: catch invalid loopsetup insns
@ 2011-02-13 18:58 Mike Frysinger
0 siblings, 0 replies; only message in thread
From: Mike Frysinger @ 2011-02-13 18:58 UTC (permalink / raw)
To: binutils; +Cc: toolchain-devel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-02-13 18:58 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-13 18:58 [PATCH] opcodes: blackfin: catch invalid loopsetup insns Mike Frysinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).