From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:54758) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIkkL-0003lf-Ju for qemu-devel@nongnu.org; Tue, 25 Oct 2011 13:25:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RIkkK-0003xv-2I for qemu-devel@nongnu.org; Tue, 25 Oct 2011 13:25:05 -0400 Received: from mail-bw0-f45.google.com ([209.85.214.45]:59172) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RIkkJ-0003xo-PT for qemu-devel@nongnu.org; Tue, 25 Oct 2011 13:25:04 -0400 Received: by bkat2 with SMTP id t2so855150bka.4 for ; Tue, 25 Oct 2011 10:25:02 -0700 (PDT) From: Max Filippov Date: Tue, 25 Oct 2011 21:24:58 +0400 References: <1319561060-6472-1-git-send-email-jcmvbkbc@gmail.com> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201110252124.58870.jcmvbkbc@gmail.com> Subject: Re: [Qemu-devel] [PATCH] target-xtensa: raise an exception for invalid and reserved opcodes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: qemu-devel@nongnu.org > > This includes opcodes from disabled features and those marked reserved in the ISA. > > > > Signed-off-by: Max Filippov > > --- > > target-xtensa/translate.c | 1 + > > 1 files changed, 1 insertions(+), 0 deletions(-) > > > > diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c > > index 1688bb2..792eff1 100644 > > --- a/target-xtensa/translate.c > > +++ b/target-xtensa/translate.c > > @@ -2378,6 +2378,7 @@ static void disas_xtensa_insn(DisasContext *dc) > > > > invalid_opcode: > > qemu_log("INVALID(pc = %08x)\n", dc->pc); > > + gen_exception_cause(dc, ILLEGAL_INSTRUCTION_CAUSE); > > dc->pc = dc->next_pc; > > #undef HAS_OPTION > > } > > Don't you need to do something to end the TB as well? > gen_exception_cause() doesn't seem to do it for you. Do you mean that I have to end the TB on every instruction that will definitely raise an exception? Or on every instruction that potentially raises an exception? I didn't do any of the above anywhere. Thanks. -- Max