From 298c1ec2a052b71bd60c244f2c3f8c6367214af1 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 14 Feb 2011 05:21:04 +0000 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 --- opcodes/ChangeLog | 5 +++++ opcodes/bfin-dis.c | 3 +++ 2 files changed, 8 insertions(+) diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 5dd4bb19604..3c9fe728323 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2011-02-14 Mike Frysinger + + * bfin-dis.c (decode_LoopSetup_0): Return when reg is greater + than 7. + 2011-02-13 Ralf Wildenhues * configure: Regenerate. diff --git a/opcodes/bfin-dis.c b/opcodes/bfin-dis.c index 393276273e6..312138a147c 100644 --- a/opcodes/bfin-dis.c +++ b/opcodes/bfin-dis.c @@ -2623,6 +2623,9 @@ decode_LoopSetup_0 (TIword iw0, TIword iw1, bfd_vma pc, disassemble_info *outf) if (parallel) return 0; + if (reg > 7) + return 0; + if (rop == 0) { OUTS (outf, "LSETUP"); -- 2.30.2