From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:33595) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHeB2-0007Gl-BJ for qemu-devel@nongnu.org; Wed, 04 May 2011 11:39:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHeB1-00071m-Fk for qemu-devel@nongnu.org; Wed, 04 May 2011 11:39:48 -0400 Received: from mail-pw0-f45.google.com ([209.85.160.45]:45283) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHeB1-00071f-8o for qemu-devel@nongnu.org; Wed, 04 May 2011 11:39:47 -0400 Received: by pwi6 with SMTP id 6so699879pwi.4 for ; Wed, 04 May 2011 08:39:45 -0700 (PDT) Sender: Richard Henderson Message-ID: <4DC17337.1080307@twiddle.net> Date: Wed, 04 May 2011 08:39:35 -0700 From: Richard Henderson MIME-Version: 1.0 References: <1304470768-16924-1-git-send-email-jcmvbkbc@gmail.com> <1304470768-16924-3-git-send-email-jcmvbkbc@gmail.com> In-Reply-To: <1304470768-16924-3-git-send-email-jcmvbkbc@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [RFC 03/28] target-xtensa: implement disas_xtensa_insn List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Max Filippov Cc: qemu-devel@nongnu.org On 05/03/2011 05:59 PM, Max Filippov wrote: > +static void gen_jump(DisasContext *dc, TCGv dest) > +{ > + tcg_gen_mov_i32(cpu_pc, dest); > + if (dc->singlestep_enabled) { > + gen_exception(EXCP_DEBUG); > + } > + tcg_gen_exit_tb(0); > + dc->is_jmp = DISAS_UPDATE; You're generating useless instructions here. The exception is a noreturn function. It performs a longjmp to back out of the cpu loop. Thus the exit_tb should be in an else here. > +invalid_opcode: > + printf("INVALID(pc = %08x): %s:%d\n", dc->pc, __FILE__, __LINE__); Don't printf. Use the logging functions properly. r~