From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54818) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF2Oq-0000WI-Cc for qemu-devel@nongnu.org; Tue, 14 Jul 2015 11:45:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZF2Op-0000e3-1Z for qemu-devel@nongnu.org; Tue, 14 Jul 2015 11:45:40 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:41431) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZF2Oo-0000di-RE for qemu-devel@nongnu.org; Tue, 14 Jul 2015 11:45:38 -0400 Date: Tue, 14 Jul 2015 17:45:36 +0200 From: Aurelien Jarno Message-ID: <20150714154536.GA7039@aurel32.net> References: <1436868495-4359-1-git-send-email-leon.alrae@imgtec.com> <1436868495-4359-2-git-send-email-leon.alrae@imgtec.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1436868495-4359-2-git-send-email-leon.alrae@imgtec.com> Subject: Re: [Qemu-devel] [PATCH] target-mips: fix logically dead code reported by Coverity List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Leon Alrae Cc: qemu-devel@nongnu.org On 2015-07-14 11:08, Leon Alrae wrote: > Make use of CMPOP in floating-point compare instructions. > > Signed-off-by: Leon Alrae > --- > target-mips/translate.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/target-mips/translate.c b/target-mips/translate.c > index 7302857..4a1ffdb 100644 > --- a/target-mips/translate.c > +++ b/target-mips/translate.c > @@ -9552,6 +9552,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1, > gen_cmp_s(ctx, func-48, ft, fs, cc); > opn = condnames[func-48]; > } > + optype = CMPOP; > break; > case OPC_ADD_D: > check_cp1_registers(ctx, fs | ft | fd); > @@ -10036,6 +10037,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1, > gen_cmp_d(ctx, func-48, ft, fs, cc); > opn = condnames[func-48]; > } > + optype = CMPOP; > break; > case OPC_CVT_S_D: > check_cp1_registers(ctx, fs); > @@ -10461,6 +10463,7 @@ static void gen_farith (DisasContext *ctx, enum fopcode op1, > gen_cmp_ps(ctx, func-48, ft, fs, cc); > opn = condnames[func-48]; > } > + optype = CMPOP; > break; > default: > MIPS_INVAL(opn); Reviewed-by: Aurelien Jarno By the way, is this debug code really useful? I think by looking at the TCG code (-d in_asm,op), it's easy to determine if an instruction is correctly disassembled or not. -- Aurelien Jarno GPG: 4096R/1DDD8C9B aurelien@aurel32.net http://www.aurel32.net