From nobody Sun Nov 9 14:51:52 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 1551332466343511.7734798257044; Wed, 27 Feb 2019 21:41:06 -0800 (PST) Received: from localhost ([127.0.0.1]:60767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzERL-0004Tx-Cl for importer@patchew.org; Thu, 28 Feb 2019 00:41:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34060) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gzEQY-00046y-4R for qemu-devel@nongnu.org; Thu, 28 Feb 2019 00:40:14 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gzEQX-0003rq-EY for qemu-devel@nongnu.org; Thu, 28 Feb 2019 00:40:14 -0500 Received: from mail-pl1-x62a.google.com ([2607:f8b0:4864:20::62a]:43192) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gzEQX-0003oT-63 for qemu-devel@nongnu.org; Thu, 28 Feb 2019 00:40:13 -0500 Received: by mail-pl1-x62a.google.com with SMTP id m10so9157948plt.10 for ; Wed, 27 Feb 2019 21:40:11 -0800 (PST) Received: from cloudburst.dc.rr.com ([2605:e000:100e:478c:cfa2:eb27:db4f:e85]) by smtp.gmail.com with ESMTPSA id k27sm13833477pgb.70.2019.02.27.21.40.08 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 27 Feb 2019 21:40:09 -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; bh=MdXTm4UWGBbEsgbr9yj2lFEwhlkWHo6z5Hh6lERaMMo=; b=pkeHvQvNC9SdlVpVSj8poG35FSI55qNsLTj+MGBUltx+9l2WVgk3CwMTQMSd9ZCade x0DvVuAz6PE2WZRELl3H8sDdgGqB4y4bP5oKV2kX61voY4vv29X7Opx1pja+e964GbS7 0FrYetdElJy0WSLUWSR0giNi6tsT1HY2nlLIokgDzCkR+KhQJdJQUY0jA5vOoxal8Rx+ ocg1m0qjejkh/afRlRKKOMo7pbBXz/y3FA12Euy9h1pqRNN6cUwDL9Cf+RIoL8ShnyoC uHn6DOe3cz/K9TFwOsuxkOSfTJsCmxuBmheH2WpFdr1l7HDztVUg4JXvJJX3X9KrZu6T DGmw== 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; bh=MdXTm4UWGBbEsgbr9yj2lFEwhlkWHo6z5Hh6lERaMMo=; b=udm6EA3ENRJA3xKa1nckCAwT/2IHBj16UFqR75x8JgIJXabzSntf9ySycnnIZwrpo1 DZLygh1uoLhYVFLbfjeYGCYXPnjAa/EYyqsbUVb0WCU6MfOJ8GL2tSU+YGiO8cp2AJNh cJYDJOZ0uQlWuSAsF5YL2M7OZBKC0isiz8BePD/6PO3dn2cF7ONFIW/qp8EmwJMEYpd3 0FIkHIryLY1FWHGFs9ePlfBxpQUEILo7LxPeTdCFMfLNtCSw9ANwrMqEZdxY72oNuKuX D4NewEmYmgyhvkYPMuw6F7cy4u6br1SYt2t1ux+sv6TqDTseuUP9lSMNoroAMv/4DYSQ h6xQ== X-Gm-Message-State: AHQUAuZmvshRHtyLqlze4rZwuIGQNHcsGF36gG6SKY960WLs2F9phD3Z ns5An0I/2pLQFKxiJl2eRjoeT0jxGu4= X-Google-Smtp-Source: AHgI3IaUZpWaxNWb33yXdfrI7/FPwDUydqHEuooqtfYjkMS2t6glKjSuQ1yn1uhJgID8nuo+AtaBKA== X-Received: by 2002:a17:902:7202:: with SMTP id ba2mr6037258plb.147.1551332409929; Wed, 27 Feb 2019 21:40:09 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Date: Wed, 27 Feb 2019 21:40:07 -0800 Message-Id: <20190228054007.779-1-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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::62a Subject: [Qemu-devel] [PATCH 9/8] decodetree: Produce clean output for an empty input file 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: 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) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This is interesting for bisection, where an output file is plumbed, but does not yet have patterns. Signed-off-by: Richard Henderson --- One more small fix that should have gone with the v2 patchset. --- scripts/decodetree.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 68979b73a0..1785769eec 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -1050,15 +1050,16 @@ def main(): '(DisasContext *ctx, ', insntype, ' insn)\n{\n') =20 i4 =3D str_indent(4) - output(i4, 'union {\n') - for n in sorted(arguments.keys()): - f =3D arguments[n] - output(i4, i4, f.struct_name(), ' f_', f.name, ';\n') - output(i4, '} u;\n\n') =20 - t.output_code(4, False, 0, 0) + if len(allpatterns) !=3D 0: + output(i4, 'union {\n') + for n in sorted(arguments.keys()): + f =3D arguments[n] + output(i4, i4, f.struct_name(), ' f_', f.name, ';\n') + output(i4, '} u;\n\n') + t.output_code(4, False, 0, 0) + output(i4, 'return false;\n') - output('}\n') =20 if output_file: --=20 2.17.2