|
From: | Philippe Mathieu-Daudé |
Subject: | Re: [Qemu-trivial] [Qemu-devel] [PATCH for 2.10 23/35] m68k/translate: fix incorrect copy/paste |
Date: | Mon, 24 Jul 2017 16:19:38 -0300 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07/24/2017 04:01 PM, Richard Henderson wrote:
On 07/24/2017 11:54 AM, Laurent Vivier wrote:Le 24/07/2017 à 20:27, Philippe Mathieu-Daudé a écrit :diff --git a/target/m68k/translate.c b/target/m68k/translate.c index ada2a91b64..1a2f421aab 100644 --- a/target/m68k/translate.c +++ b/target/m68k/translate.c@@ -1321,7 +1321,8 @@ 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 || + op == CC_OP_LOGIC) {According to commit (db3d7945) introducing the incorrect copy/paste, I don't think we need the CC_OP_LOGIC here. Logic operations never generates X flags (whereas they can generate Z and and N).Indeed, look at the comment below. LOGIC is supposed to fall through to the code that produces TCG_COND_NEVER.
Indeed I also miss-copypasted :) So the correct fix would be:? 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) {
[Prev in Thread] | Current Thread | [Next in Thread] |