From nobody Wed Nov 27 04:39:10 2024 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1702246145; cv=none; d=zohomail.com; s=zohoarc; b=LJjQ9f9yXFtU+7VuXm88FJYm43LqZ0j66SILXfZjWEYRcR+kGVqPJi0W7O8PifcPZGkpAD2E2f53ZD3udaMNxrOW9uJgli29h5tWMxiyjfwT+22WsK5Ogfrhk9PlAkzL6xzSw3IVty4plz7+Vy2FzUQ2UiqnbaWUx8j+FCjlAKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1702246145; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=VE8SldnlUWLsAkTls79GcRUG0/TMtf9McVHfy+l+F64=; b=LDnFd5RAsLFWuGDq76Q5lHsYfPWsNo1glfH9MwF8zkUTrHKEKb/rdgF7EFEBkvdNAK6URdkmegaaVIOCrlJQ3HB8IRkAeOIQBnkLs3FODVbspdaQWjBRpIbBFFa6SirAVH6D4YIfbNWzGZ0Sf3Yai7K3diacRhIlD55PfxtJPjo= 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) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1702246145477746.4804296925921; Sun, 10 Dec 2023 14:09:05 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rCRxR-0004xs-Tv; Sun, 10 Dec 2023 17:07:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rCRxQ-0004xD-9X for qemu-devel@nongnu.org; Sun, 10 Dec 2023 17:07:28 -0500 Received: from mail-oo1-xc2f.google.com ([2607:f8b0:4864:20::c2f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rCRxO-0004ZG-S4 for qemu-devel@nongnu.org; Sun, 10 Dec 2023 17:07:28 -0500 Received: by mail-oo1-xc2f.google.com with SMTP id 006d021491bc7-58e28e0461bso2281230eaf.1 for ; Sun, 10 Dec 2023 14:07:26 -0800 (PST) Received: from taylor-ubuntu.austin.rr.com (068-203-008-061.res.spectrum.com. [68.203.8.61]) by smtp.gmail.com with ESMTPSA id q23-20020a4a6c17000000b0058e200a9065sm1588173ooc.29.2023.12.10.14.07.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Dec 2023 14:07:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702246045; x=1702850845; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=VE8SldnlUWLsAkTls79GcRUG0/TMtf9McVHfy+l+F64=; b=e3qmq0PtvKsUEZ2Ecx/G4guWgQjt9uuhi5yTcZscObp2Sys+Bji1Ix/3SJ7g+oyIZy NyC/wzoa/rCTiVl9/IrfS2nPHFhrfPSO0oURVJqOBWWXarG+rnkzqB6+rOOvWUomaWrs FsqDzxe09Ln+1Us7llhA33XYjgU3V0lmpPm7MoNXzHCRBTsOxF2kfE36RpDFm/v5sNSW w5X101QyqhV/YdCy2tDmGJGSEjRMVlnnQ34sjZp2DpFUeoGSzLhFxtXh5FWfObVEzXOD 5mStiuFirJOJLnvaXDk4O23eExzOcBiWfZUnbYAf7EhCDV9UUcsST6Eu6/oOWEJSdHpN Cnkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702246045; x=1702850845; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VE8SldnlUWLsAkTls79GcRUG0/TMtf9McVHfy+l+F64=; b=GduAPBnnTzN9ONxTHkqbyxYldRO98RAgTUub+7w1m+y+4NX02Y04iUN1KXVrUgD5Zd 4/J6u1Ft179vs6/o7wU2MXu4haz2uhoEeyyjfkmd2Tbni0GXY1SqY2gaguxJleCwupq6 WkLIinq5SgImzMZrMcOTLJFHn+VkPbMgOOtpWVTMnvJ4Z8dahr+RoXtcP6AY/yNQlK7j E7y8S6WmJ8pjNQWIlSQBqR4X0ipJgHsocT4HXugpyY3CXUpf57NX3tLOSkt3biY7wJta 2m4d1cNQT5c40dIp0N9D9eVUOt3sJgQyIkXBjBidHy5iS17WALdxaAIcypx5fcy4lmj9 FwEg== X-Gm-Message-State: AOJu0YydemWe+afTung6/x+5UkiaQbOFLTRdNphgE9I0stNFg0cGQwNx HlyiUqf0/5FX6eY3zXjKcXdPGNsCvIwsDw== X-Google-Smtp-Source: AGHT+IE6tQievG5dU7Uzx04GDl/U2JSaH46/6UVF84kVgb++5F8EZj5V5lj8dQM90sDvZTZkgB82ZQ== X-Received: by 2002:a05:6820:1627:b0:590:2b6d:a862 with SMTP id bb39-20020a056820162700b005902b6da862mr2138763oob.15.1702246044970; Sun, 10 Dec 2023 14:07:24 -0800 (PST) From: Taylor Simpson To: qemu-devel@nongnu.org Cc: bcain@quicinc.com, quic_mathbern@quicinc.com, sidneym@quicinc.com, quic_mliebel@quicinc.com, richard.henderson@linaro.org, philmd@linaro.org, ale@rev.ng, anjo@rev.ng, ltaylorsimpson@gmail.com Subject: [PATCH v2 6/9] Hexagon (target/hexagon) Make generators object oriented - gen_op_regs Date: Sun, 10 Dec 2023 15:07:09 -0700 Message-Id: <20231210220712.491494-7-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231210220712.491494-1-ltaylorsimpson@gmail.com> References: <20231210220712.491494-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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::c2f; envelope-from=ltaylorsimpson@gmail.com; helo=mail-oo1-xc2f.google.com 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @gmail.com) X-ZM-MESSAGEID: 1702246146169100001 Reviewed-by: Brian Cain Signed-off-by: Taylor Simpson --- target/hexagon/gen_op_regs.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/target/hexagon/gen_op_regs.py b/target/hexagon/gen_op_regs.py index a8a7712129..7b7b33895a 100755 --- a/target/hexagon/gen_op_regs.py +++ b/target/hexagon/gen_op_regs.py @@ -70,6 +70,7 @@ def strip_reg_prefix(x): def main(): hex_common.read_semantics_file(sys.argv[1]) hex_common.read_attribs_file(sys.argv[2]) + hex_common.init_registers() tagregs =3D hex_common.get_tagregs(full=3DTrue) tagimms =3D hex_common.get_tagimms() =20 @@ -80,11 +81,12 @@ def main(): wregs =3D [] regids =3D "" for regtype, regid, _, numregs in regs: - if hex_common.is_read(regid): + reg =3D hex_common.get_register(tag, regtype, regid) + if reg.is_read(): if regid[0] not in regids: regids +=3D regid[0] rregs.append(regtype + regid + numregs) - if hex_common.is_written(regid): + if reg.is_written(): wregs.append(regtype + regid + numregs) if regid[0] not in regids: regids +=3D regid[0] --=20 2.34.1