From nobody Fri Nov 14 19:24:25 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1589820303; cv=none; d=zohomail.com; s=zohoarc; b=B7yiTv4Lou4c/js6cRH8UbrFJNAwWexS543AmWTKe20Syags4EReWLXn+fY0uLh8vEAOm5yirvBJ+Du1+xQuhXvWg4KDu7NvtKipnSeihf5vBDQNmXv82h88cQWgHIKN1IIGoovGPb7u/lURGM4ZROlGHrz8Ymez90yPReEmwn8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1589820303; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=DXF5hhG17BDEOETPzoe+bSK9+O1lQ05HYEEgNG7hh+w=; b=fNXshTgbzmLLUmRT8K2pevy3ZQndWIgOLgvmozwR+/UPEfVpQrjYVqvj9YN5IOSLoStMHG+IVLsfw/vElmeF8T/22Crdh93JGTrtDnUoshFVy+xCC59UVYXg0sXVDsYvAhmtg4chhIroTvX9fI6F+wZMIgN3tyDF7gcPHVg0Dvg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1589820303587578.6996029651741; Mon, 18 May 2020 09:45:03 -0700 (PDT) Received: from localhost ([::1]:60818 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jaisw-0000Os-2r for importer@patchew.org; Mon, 18 May 2020 12:45:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60204) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jaip5-00025C-LA for qemu-devel@nongnu.org; Mon, 18 May 2020 12:41:03 -0400 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]:46135) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jaip4-0005qu-ME for qemu-devel@nongnu.org; Mon, 18 May 2020 12:41:03 -0400 Received: by mail-pl1-x629.google.com with SMTP id b12so4430219plz.13 for ; Mon, 18 May 2020 09:41:02 -0700 (PDT) Received: from localhost.localdomain (174-21-143-238.tukw.qwest.net. [174.21.143.238]) by smtp.gmail.com with ESMTPSA id x132sm5790610pfd.214.2020.05.18.09.40.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 09:40:59 -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=DXF5hhG17BDEOETPzoe+bSK9+O1lQ05HYEEgNG7hh+w=; b=FjihzZwM2wYtERi0Zws7yos2C7KGw20k78/MJFU1LrZ+TmbscZxA63HJVgPAJsmHFp F4FBLdZqtGUGycqOLe8S7ZaVCK6hpDvQZ+M+0q7u6KiRhn1z2XVGh2qRmPQoZ7Zp3zL6 DHScloroEExBlpVlx7ZUTHKQBMYe/lAE1MbsNks1Dw4epwKA1TfwDT1LPOqnjcstQFeg C7HqdDxicOgVUoNNtmlBj+GnH15B5bP1u+dIB6iqIoNf33MQL5iGWWNbwK2NzHd8x6i6 yMFc2hmZPaRISftqap7jE0VpMTxqls3hSKI8B0OxMZBd5dJnpmdU2LsuOAGTg3ga6SEg TkSg== 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=DXF5hhG17BDEOETPzoe+bSK9+O1lQ05HYEEgNG7hh+w=; b=XwW+f5EMJv/IIxd0fHYtyM2UswB3Bt5MIhU2FZjA+T+MwjxONN6Uc3JSQt75xBcqa1 iD3KzwPHXGMPj1FeL4pvvqqUEnJ7HpJGD7fDP4zEfqWpDELoKyRqMO9GHuwTnHNHtsj9 9kajFeNz0Za+WQE/kh+gMF5Ir+gpv4TQid0zgqnEeo+31MmYy0SCaXTTG1bJhDQ+7uAn RoCiAuvxGAnrvRk0op1B2X4E18epCozZS4ktmUR6sSq+rgBOGfOyPP+EN7oUSHmO2FSb G/+m2MobmYwEpu7RY0lN3ZhLQ2EMt4qtJyxZpkPA9eeI9lgebIZna7XiBm6uL4IGxQ5z +DSw== X-Gm-Message-State: AOAM530A0Pm8FSb/0z80ORsGhSdwaNc5+i3oQlDNkCpVbXwPBSl92MqT DXPEdNWZD0ojgmGPCQJg1zlvpf8W/5A= X-Google-Smtp-Source: ABdhPJynd/2Be65qIgIa3vW4+ZGuWClcnIbZKlqM5zJMqMaeLiHdBgLxJ66ZQHfzAV8SlKX2Qg0fiw== X-Received: by 2002:a17:90a:dd45:: with SMTP id u5mr302350pjv.156.1589820060313; Mon, 18 May 2020 09:41:00 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Subject: [PATCH 4/8] decodetree: Split out MultiPattern from IncMultiPattern Date: Mon, 18 May 2020 09:40:48 -0700 Message-Id: <20200518164052.18689-5-richard.henderson@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20200518164052.18689-1-richard.henderson@linaro.org> References: <20200518164052.18689-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN 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: peter.maydell@linaro.org Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @linaro.org) Content-Type: text/plain; charset="utf-8" Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daud=C3=A9 --- scripts/decodetree.py | 37 ++++++++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 11 deletions(-) diff --git a/scripts/decodetree.py b/scripts/decodetree.py index 7af6b3056d..ea313bcdea 100755 --- a/scripts/decodetree.py +++ b/scripts/decodetree.py @@ -371,7 +371,32 @@ class Pattern(General): # end Pattern =20 =20 -class IncMultiPattern(General): +class MultiPattern(General): + """Class representing a set of instruction patterns""" + + def __init__(self, lineno, pats): + self.file =3D input_file + self.lineno =3D lineno + self.pats =3D pats + self.base =3D None + self.fixedbits =3D 0 + self.fixedmask =3D 0 + self.undefmask =3D 0 + self.width =3D None + + def __str__(self): + r =3D 'group' + if self.fixedbits is not None: + r +=3D ' ' + str_match_bits(self.fixedbits, self.fixedmask) + return r + + def output_decl(self): + for p in self.pats: + p.output_decl() +# end MultiPattern + + +class IncMultiPattern(MultiPattern): """Class representing an overlapping set of instruction patterns""" =20 def __init__(self, lineno, pats, fixb, fixm, udfm, w): @@ -384,16 +409,6 @@ class IncMultiPattern(General): self.undefmask =3D udfm self.width =3D w =20 - def __str__(self): - r =3D "{" - for p in self.pats: - r =3D r + ' ' + str(p) - return r + "}" - - def output_decl(self): - for p in self.pats: - p.output_decl() - def output_code(self, i, extracted, outerbits, outermask): global translate_prefix ind =3D str_indent(i) --=20 2.20.1