From nobody Sun Nov 9 23:01:42 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1552413535316983.1910442037502; Tue, 12 Mar 2019 10:58:55 -0700 (PDT) Received: from localhost ([127.0.0.1]:56852 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3lfw-0007LN-9j for importer@patchew.org; Tue, 12 Mar 2019 13:58:52 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51483) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3l3N-0005yw-8W for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:19:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3koa-0001Bc-TQ for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:03:45 -0400 Received: from mail-pf1-x42b.google.com ([2607:f8b0:4864:20::42b]:43412) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3koa-0001At-Ks for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:03:44 -0400 Received: by mail-pf1-x42b.google.com with SMTP id q17so2254448pfh.10 for ; Tue, 12 Mar 2019 10:03:44 -0700 (PDT) Received: from cloudburst.twiddle.net (97-113-188-82.tukw.qwest.net. [97.113.188.82]) by smtp.gmail.com with ESMTPSA id v22sm17514265pfa.49.2019.03.12.10.03.41 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 10:03:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=q7BmrH4sjrNhoBHqeKigtEhx9qwjct0IB15Jx7wduro=; b=E9O8eM8PfIhA+E3vn/WkAVuQUMzX47SPjmcwVyTqBmKAcopmhUDDpN3qsGuK9Q82+x chegLU1RnV3z+L8V/rW9JDAOvnYH9uIrN1Kms+RTa8HNaIzsjUd1Daj/Eu6Yo0emV6Si IWt9gzqY+M1BWHJTyZxBeDVCtdSrogXh7pnNfyDlteMCSQancEYg+bhR7MEMUI2uRF5z jVue087v9Gv93lbXBbLBqSWC2GwNDprGO+88KhPXInjXZBWCd1ui1kuEN9SFg4Zaqejl xRZSPEF+lyvfCWBhcIPpezKCBhSkX6WZHQvCefIDxT3sNzKcm+dUTB1tsdtO08IOjGw7 76jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=q7BmrH4sjrNhoBHqeKigtEhx9qwjct0IB15Jx7wduro=; b=A6d8Hq+0Opum3UqC2NzOmQrO3UvN/OSaXxEIJhhly9cLmOREsV/9ZNRP1IEGofxRFC fWCB3Q/sgxMb0jeTL15QuUBRdPOoqPodBSjfJgwN4bkZFgSUBiyWmGRnmSUtMuFrrUXf 03STbf2zWS6fd7g9YQggcBMBCeUDq16G97PXdCviq+MU3HZUAEjy/eQKSL0AD5H2DeeU jwyG4Lhyeryxj9pM9BK/Rr+VmhBLJOeJDjfa/tg8iY6CCJFYqeq9KykK/85tXGE2mswo Ip6QHN6EZESCDmR/PW36i9PWgKZHvgU9F5gQl3oCaB/bxxAFOPrSmP3ZmqaK4Nq/d317 6VBg== X-Gm-Message-State: APjAAAXJRf1g9Zz0xFesFljUifDWi+Ac4+6WPdfkAMj7HObr5FesoqIC YUj1dMIE3WuL7rHCP6x2OHNpyAQP4bE= X-Google-Smtp-Source: APXvYqzmdSk9ZYSFBwZ4VPcEFkj9rXrIhW4VfSPMaoJxc/Xw/j/FyDdx2AYBbtp1ZS74JJaMmgszEQ== X-Received: by 2002:a17:902:7896:: with SMTP id q22mr2936855pll.66.1552410223228; Tue, 12 Mar 2019 10:03:43 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 12 Mar 2019 10:03:27 -0700 Message-Id: <20190312170334.14005-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190312170334.14005-1-richard.henderson@linaro.org> References: <20190312170334.14005-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::42b Subject: [Qemu-devel] [PULL 05/12] decodetree: Do not unconditionaly return from Pattern.output_code X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) As a consequence, the 'return false' gets pushed up one level. This will allow us to perform some other action when the translator returns failure. Tested-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Bastian Koppelmann Signed-off-by: Richard Henderson --- scripts/decodetree.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index e26d8253f2..cc5fa1a8ab 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -348,8 +348,8 @@ class Pattern(General): output(ind, self.base.extract_name(), '(&u.f_', arg, ', insn);= \n') for n, f in self.fields.items(): output(ind, 'u.f_', arg, '.', n, ' =3D ', f.str_extract(), ';\= n') - output(ind, 'return ', translate_prefix, '_', self.name, - '(ctx, &u.f_', arg, ');\n') + output(ind, 'if (', translate_prefix, '_', self.name, + '(ctx, &u.f_', arg, ')) return true;\n') # end Pattern =20 =20 @@ -777,8 +777,8 @@ class Tree: output(ind, ' /* ', str_match_bits(innerbits, innermask), ' */\n') s.output_code(i + 4, extracted, innerbits, innermask) + output(ind, ' return false;\n') output(ind, '}\n') - output(ind, 'return false;\n') # end Tree =20 =20 @@ -932,6 +932,7 @@ def main(): output(i4, '} u;\n\n') =20 t.output_code(4, False, 0, 0) + output(i4, 'return false;\n') =20 output('}\n') =20 --=20 2.17.2