From nobody Sun Nov 9 14:48:07 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 1551331768049372.20405030400855; Wed, 27 Feb 2019 21:29:28 -0800 (PST) Received: from localhost ([127.0.0.1]:60606 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzEG5-0000Mf-2k for importer@patchew.org; Thu, 28 Feb 2019 00:29:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:59621) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzEBg-0005g0-8A for qemu-devel@nongnu.org; Thu, 28 Feb 2019 00:24:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzEBe-0003ms-8k for qemu-devel@nongnu.org; Thu, 28 Feb 2019 00:24:52 -0500 Received: from mail-pg1-x534.google.com ([2607:f8b0:4864:20::534]:42937) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzEBc-0003jp-75 for qemu-devel@nongnu.org; Thu, 28 Feb 2019 00:24:50 -0500 Received: by mail-pg1-x534.google.com with SMTP id b2so9108653pgl.9 for ; Wed, 27 Feb 2019 21:24:43 -0800 (PST) Received: from cloudburst.dc.rr.com (cpe-72-132-251-149.dc.res.rr.com. [72.132.251.149]) by smtp.gmail.com with ESMTPSA id u13sm32758371pfa.169.2019.02.27.21.24.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 21:24:41 -0800 (PST) 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=pPYZ9u8PLh+51c8aUzwZl9hmq8dhaEKMpCWh7jQwJFdL54eKhV3F84IVsXl5H55f+v oEZcoLqDdMYb6ynQOV1B5GOPV6V94PoBK6tTfY0fOAxmTnZpc3J1rCQUui0KR9fujK7m 85jJ6XEj34+rWP9ZmyrsBbwwGykT4Hd6uuWxG1YB7kO1/Y1C/O9kalmlv5IdqwfCq5p3 mbC2LrG1YzGhhBthLQ1oP7KiElpapR/KPy2O+CJdBVbrRWgMuoDvEKnwX8a5DXcghhS9 M1KlM+kaYFaiU3n+7Edz2M9H2Jkihao8FgkxOz3eFEfRoeDsPVtWWcdTlsrPysH0WG+I UJLw== 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=ZGGo/lmi4gqs5lQa08vHlQprwcvQHjoRIZdW15wt/eSKh58mtvkMA3dICYRgdKJUUB JGz6BDdRsNotAXgCCSz54K2i0OzagiyvOZ90uOJHWelHkLgj/mj2RZrtdZ3Rm77wTeW3 LQZlhEtGB/jYDK8CAqrJxzvqzHU2+xGuVK4ONm4wzYfRT3vac8gLQImcppDichrhBGbL Xp1n49yTydOyjYuRT7FxVW6un2Zi+fWr+M7PxNpS0t/d3jhQkOZ9xExYRBGm3h+L2M/z cw9OMbOqlmxL2kig1U5O9OVQgdLjooxyWaSp3cKufxFqc5FlAc4cKqfDNOzB/rZiG9QW MtCg== X-Gm-Message-State: AHQUAuZQ0jaoaUWOeAO6oHjcWFBNSHohIB3psAsmKTkovoLnAD/kliAZ marZNSObXLk7pfQdys/E1yra00Qqz1k= X-Google-Smtp-Source: AHgI3IaneHgQQyJ04Te7v/dYoq6dM0/QK5hAuRSSSHfydEhXJO6DSHBB02CiFsJXioIGgx7wNYPmcw== X-Received: by 2002:a65:6483:: with SMTP id e3mr6621039pgv.273.1551331482191; Wed, 27 Feb 2019 21:24:42 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 27 Feb 2019 21:24:29 -0800 Message-Id: <20190228052432.32571-6-richard.henderson@linaro.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20190228052432.32571-1-richard.henderson@linaro.org> References: <20190228052432.32571-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::534 Subject: [Qemu-devel] [PATCH v2 5/8] 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: kbastian@mail.uni-paderborn.de, f4bug@amsat.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