From nobody Sun May 19 08:26:18 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1618338782; cv=none; d=zohomail.com; s=zohoarc; b=A0iQdg/HId9au34QAFYLAh/5C9giK6JFzuKbuRVnCtveoHmhcVyMKikzbHCNqsrXPCq2CrcWeMdR4+7dnRFUs7dNPOLqPpCPNS/obBEeE5yNA6SACjApQ5SEEv0hd819xP/z++Du15xB52CjUbOYp+c/vxya+CPA7RacaItKi1E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1618338782; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=1ZWEKfHMtVwAegYL4QYNy0d8RYZP+NSp4dJyY2C+vJE=; b=MJmmPV/MDITKg1OtXTifttk1l+MfsNOM8ZMfvHPvPDWkIcnbsvAdiFEZhMJLDh/CxPoyjKLVGiM3KQzqa/p6UIVTR5CqEIrmeygO5a88dnZ8x5nhbSmmHGTm4cWY3vV8ROfhpOetGELAB34fkISTXghJbhHbRWpzShGOF4dqUco= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1618338782776656.5005437775379; Tue, 13 Apr 2021 11:33:02 -0700 (PDT) Received: from localhost ([::1]:59134 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWNqP-0000aV-FE for importer@patchew.org; Tue, 13 Apr 2021 14:33:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46654) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lWNn3-0007vf-O1 for qemu-devel@nongnu.org; Tue, 13 Apr 2021 14:29:33 -0400 Received: from [201.28.113.2] (port=3719 helo=outlook.eldorado.org.br) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lWNn2-0004ie-AI for qemu-devel@nongnu.org; Tue, 13 Apr 2021 14:29:33 -0400 Received: from power9a ([10.10.71.235]) by outlook.eldorado.org.br with Microsoft SMTPSVC(8.5.9600.16384); Tue, 13 Apr 2021 15:12:18 -0300 Received: from eldorado.org.br (unknown [10.10.70.45]) by power9a (Postfix) with ESMTP id D18BB8011B4; Tue, 13 Apr 2021 15:12:18 -0300 (-03) From: Luis Pires To: qemu-devel@nongnu.org Subject: [PATCH] decodetree: Allow empty input files for var width Date: Tue, 13 Apr 2021 15:09:58 -0300 Message-Id: <20210413180958.412991-1-luis.pires@eldorado.org.br> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-OriginalArrivalTime: 13 Apr 2021 18:12:19.0033 (UTC) FILETIME=[8AA6CC90:01D73090] X-Host-Lookup-Failed: Reverse DNS lookup failed for 201.28.113.2 (failed) Received-SPF: pass (zohomail.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; Received-SPF: pass client-ip=201.28.113.2; envelope-from=luis.pires@eldorado.org.br; helo=outlook.eldorado.org.br X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.1 / 5.0 requ) BAYES_00=-1.9, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luis Pires , richard.henderson@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" This was broken when varinsnwidth was specified. Signed-off-by: Luis Pires --- scripts/decodetree.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 3450a2a08d..fef5eeaf42 100644 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -1177,11 +1177,12 @@ def output_code(self, i, extracted, outerbits, oute= rmask): ind =3D str_indent(i) =20 # If we need to load more bytes, do so now. - if extracted < self.width: - output(ind, 'insn =3D ', decode_function, - '_load_bytes(ctx, insn, {0}, {1});\n' - .format(extracted // 8, self.width // 8)); - extracted =3D self.width + if self.width is not None: + if extracted < self.width: + output(ind, 'insn =3D ', decode_function, + '_load_bytes(ctx, insn, {0}, {1});\n' + .format(extracted // 8, self.width // 8)); + extracted =3D self.width output(ind, 'return insn;\n') # end SizeLeaf =20 --=20 2.25.1