[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-mips: fix logically dead code reported b
From: |
Aurelien Jarno |
Subject: |
Re: [Qemu-devel] [PATCH] target-mips: fix logically dead code reported by Coverity |
Date: |
Tue, 14 Jul 2015 17:45:36 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
On 2015-07-14 11:08, Leon Alrae wrote:
> Make use of CMPOP in floating-point compare instructions.
>
> Signed-off-by: Leon Alrae <address@hidden>
> ---
> 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 <address@hidden>
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
address@hidden http://www.aurel32.net