From nobody Sun Nov 9 23:00:25 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 1552413319950467.15215069381577; Tue, 12 Mar 2019 10:55:19 -0700 (PDT) Received: from localhost ([127.0.0.1]:56781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3lcM-00041I-OO for importer@patchew.org; Tue, 12 Mar 2019 13:55:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:51919) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h3l3K-0006LV-Lo for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:19:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h3koy-0001S1-Nq for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:04:09 -0400 Received: from mail-pf1-x431.google.com ([2607:f8b0:4864:20::431]:46304) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h3kow-0001FK-Ma for qemu-devel@nongnu.org; Tue, 12 Mar 2019 13:04:08 -0400 Received: by mail-pf1-x431.google.com with SMTP id s23so2238520pfe.13 for ; Tue, 12 Mar 2019 10:03:50 -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.47 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Mar 2019 10:03:48 -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; bh=oPNQCKMG+eFcSWSqQcxVkSY17qb8SVF1eeKGaPzpR/U=; b=nsZLFTRDGrnfnZfZYu0KdUmP9/etuvvm6PwTYDdtlWaZ9oVEBeu6oM0Vl4eFZb/E7a FSulfKmOgcmTwz9hovaahyAbEVhE5jOIQYlmiuDHVRgovltJmvWe9GNPpeGlJONa83M2 JqxArSUdSLBbM9gDf0S1j8Vl869+x4xkGTEop3J7w4jkA3/ZRDrlrghese6uSqPcnTDj Ov3phFGSHiRIOvSaV+gslAZJdMlB6eFCRyO3hJsVveml2Wz28heJr5VDPXas6YLZ+aBF WUo57C3fvYETx1/i3R7CIZyHYxcdiSpOCexFwyKkwNF8R9U8oPaR4ZfFus2WYzletiRF M+bg== 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=oPNQCKMG+eFcSWSqQcxVkSY17qb8SVF1eeKGaPzpR/U=; b=FoaquuMG8daWjgfhnCRZN0CQtj/tOU6EYnw1n7qWUPma9cQT0CKoevvbhwUq34P4/l BjGi5Q9dYdFVnNxIhvlCV4TT9kHF7MTUnSqGYH7YqUwprgtXpfWFesaw5qcvdXdseHG2 +UZoprs9p4cD/RxZcMvc+zvZP1oZ5hOwptLm5S9Yrv6I6ASQXq6jHO/c87I5lRKBHBwD hUOd1JOYSh4Oaizbb0ZYb4+rPxTTtttQEBz9h7dvrHgT/w06+WlHVQwxC7TqYRQUQCWK rGg+i/Rh1q3RGmiaoqjij+p9a+dxNuX1mYNdL1cNzs56YJzrY8KaOf3Y5dEzuR2ZgVHN PB1w== X-Gm-Message-State: APjAAAVrofcwPnx/Bki2ZJITcnyGN9mOe7+78eEu46OeI4tTYcM/wYfz vKNmMqlJ2yr9xpMYF5MyYJRLt539H2U= X-Google-Smtp-Source: APXvYqwRu1dHtSk1fb6brbCgBdszUhvCH6iahzJYx7v9aq005JZVfsAk5P4sljm6JEaI8azx1dSPfQ== X-Received: by 2002:a17:902:2ac8:: with SMTP id j66mr41674808plb.335.1552410228893; Tue, 12 Mar 2019 10:03:48 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Date: Tue, 12 Mar 2019 10:03:31 -0700 Message-Id: <20190312170334.14005-10-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> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::431 Subject: [Qemu-devel] [PULL 09/12] 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: 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) 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 --- scripts/decodetree.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 6067e940ab..6e7ba278be 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -1049,15 +1049,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