Skip to content

Commit

Permalink
m68k/translate: fix incorrect copy/paste
Browse files Browse the repository at this point in the history
db3d794 extended gen_cc_cond() for cond [6, 7, 9, 10] but misswrote [4, 5]

target/m68k/translate.c:1323:70: warning: identical expressions on both sides of logical operator
        if (op == CC_OP_ADDB || op == CC_OP_ADDW || op == CC_OP_ADDL ||
            op == CC_OP_ADDB || op == CC_OP_ADDW || op == CC_OP_ADDL) {
            ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~    ~~~~~~~~~~~~~~~~ ^

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
Reviewed-by: Laurent Vivier <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
  • Loading branch information
philmd authored and Michael Tokarev committed Jul 31, 2017
1 parent b2caa3b commit 4b5660e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target/m68k/translate.c
Original file line number Diff line number Diff line change
Expand Up @@ -1321,7 +1321,7 @@ static void gen_cc_cond(DisasCompare *c, DisasContext *s, int cond)
case 5: /* CS (C) */
/* Some cases fold C into X. */
if (op == CC_OP_ADDB || op == CC_OP_ADDW || op == CC_OP_ADDL ||
op == CC_OP_ADDB || op == CC_OP_ADDW || op == CC_OP_ADDL) {
op == CC_OP_SUBB || op == CC_OP_SUBW || op == CC_OP_SUBL) {
tcond = TCG_COND_NE;
c->v1 = QREG_CC_X;
goto done;
Expand Down

0 comments on commit 4b5660e

Please sign in to comment.