This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH] sim: bfin: throw VEC_ILGAL_I with 32bit insn in group1/group2 slots
- From: Mike Frysinger <vapier at gentoo dot org>
- To: gdb-patches at sourceware dot org
- Date: Sun, 1 Apr 2012 00:31:07 -0400
- Subject: [PATCH] sim: bfin: throw VEC_ILGAL_I with 32bit insn in group1/group2 slots
Parallel insns can only do one 32bit, then two 16bits. So if we see
a 2nd 32bit insn after the first 32bit in a parallel insn, abort.
Committed.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-04-01 Mike Frysinger <vapier@gentoo.org>
* bfin-sim.c (_interp_insn_bfin): Call illegal_instruction_combination
when INSN_LEN is non-zero before 32bit decode.
---
sim/bfin/bfin-sim.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/sim/bfin/bfin-sim.c b/sim/bfin/bfin-sim.c
index d645284..9c14def 100644
--- a/sim/bfin/bfin-sim.c
+++ b/sim/bfin/bfin-sim.c
@@ -6283,6 +6283,9 @@ _interp_insn_bfin (SIM_CPU *cpu, bu32 pc)
/* Only cache on first run through (in case of parallel insns). */
if (INSN_LEN == 0)
INSN_LEN = insn_len;
+ else
+ /* Once you're past the first slot, only 16bit insns are valid. */
+ illegal_instruction_combination (cpu);
if ((iw0 & 0xf7ff) == 0xc003 && (iw1 & 0xfe00) == 0x1800)
{
--
1.7.8.5