From b045c2c99a1ef83fc640f19ebd35192b73493503 Mon Sep 17 00:00:00 2001 From: Leon Alrae Date: Wed, 14 Feb 2018 17:02:50 -0500 Subject: [PATCH] target-mips: fix logically dead code reported by Coverity Make use of CMPOP in floating-point compare instructions. Backports commit 47ada0ad3431b39863918dc80386634693d317b5 from qemu --- qemu/target-mips/translate.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qemu/target-mips/translate.c b/qemu/target-mips/translate.c index 31d078bf..eb6f47b6 100644 --- a/qemu/target-mips/translate.c +++ b/qemu/target-mips/translate.c @@ -9638,6 +9638,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); @@ -10122,6 +10123,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); @@ -10547,6 +10549,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);