From nobody Sat Jan 3 12:32:35 2026 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1767384798; cv=none; d=zohomail.com; s=zohoarc; b=kHkR8tmXle5oyWPOOts4cetweZpFOQZx/sR3GLDtJA5X1uIViJ/B1u1AQ1v8eiCDHMBMt1RzZolsZi7sWftEqfmVgRGIJwKQI3Cr11Lz7vH17DC6aogPkcKXd8+3MvL6Q/ddWmrr9i9Av0j/ftB6bE6GjwqG/C+dY7lDsW+1qwo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767384798; 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=H1awuDDuRO4xS1rj/d0qjR3lR2WrDZbNYkuwBXLjTDc=; b=amXKWAJULeQyUpqMp/WlCRpJqUksOGtkWL57yxt5kAQblnukUssXemIgj/RvETNSpo9+qq/WPZUaJY1O2lqDm2sgwHQ/3y8tADmTV9LwJ2FQ7f/O9MmiSRKiTSeKKC6Ph5nXQ/me/uJlwYorrvEwXId8LAHan97imYF04A7jQ14= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767384798409323.1868902426945; Fri, 2 Jan 2026 12:13:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vblVp-0003wl-6k; Fri, 02 Jan 2026 15:12:41 -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 1vblVg-0003sg-5f for qemu-devel@nongnu.org; Fri, 02 Jan 2026 15:12:32 -0500 Received: from mx0b-0031df01.pphosted.com ([205.220.180.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vblVY-0002Sb-8b for qemu-devel@nongnu.org; Fri, 02 Jan 2026 15:12:26 -0500 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6029W1rR1002029 for ; Fri, 2 Jan 2026 20:12:21 GMT Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bd2bb4se4-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 02 Jan 2026 20:12:21 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-b6ce1b57b9cso11614048a12.1 for ; Fri, 02 Jan 2026 12:12:21 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b140c42e7esm1794621eec.22.2026.01.02.12.12.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jan 2026 12:12:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:content-type:date:from :in-reply-to:message-id:mime-version:references:subject:to; s= qcppdkim1; bh=H1awuDDuRO4xS1rj/d0qjR3lR2WrDZbNYkuwBXLjTDc=; b=Rr 14TI01OgsaPm04LGiEpL5ZDKmspJM/3xg930cloMFC/KM856h/1QqpGAd1vlHsU9 fisKaSuCeO1YmjlrBpK4stFxoSkUWTfOSyJfteCaRtilhkqFL0y8BU9galPOa+iX fFzp9mTboIALWz1YzXfbDOFFZ3cXge6nNGoSUNI5iYsxxeN5LwFe2UtUAKhFIZQD yJSLHVf//z7Y+zrsRzqngs2bPV1+4wmPKB3GB3o8bZ8/CvOYMNT3Ax5oEx5vid4m IziO7qDQ0GwpcUl/gZ3wDPugWhkZg7IcL5hLHv4DonNmjGtnRArl/PFXzNRntII4 C17Z77F9P/2vU/ABlB+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1767384740; x=1767989540; 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=H1awuDDuRO4xS1rj/d0qjR3lR2WrDZbNYkuwBXLjTDc=; b=iB2PFKcV4USJUSb8svL1KK62G6ZSq4AUP65CoeMPYCG9ykCiXDyUklkD1rGTaSEkPP BjjH0hl5pejLAHrQQUhylwvH26YXJDLyjmhN35YurwOsA0m4iZ5LbaLQQ4ERZ3ATyYZB BVIP6+S23B5UASihyANngNzLrHt5w5LhjoOUmS2je4cJMDBj7uM85aEoSCPvF2cyj/SV CdkSKwCIBIK4qJuIaDZB6XufGbzGLyWK23FLgClGlQR7tvArj0Q1Nx32Llbm9eFYbb6t 2iFYpt70PFOh8yY3yO79nH9UssjmbJtVM5scd8H8jKCEJZKuJnnb4Xtk1PjeytUhFhSN ZnBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767384740; x=1767989540; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject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05:7301:6f0e:b0:2b0:4c5f:c05c with SMTP id 5a478bee46e88-2b05ebb63famr27128741eec.4.1767384740011; Fri, 02 Jan 2026 12:12:20 -0800 (PST) X-Google-Smtp-Source: AGHT+IEL/1B5D85Xmisuu8eA175iOmwM56xct78YfP3tSt1egfH+ZZZ837X1p3ETDkd8pOdXxSiumw== X-Received: by 2002:a05:7301:6f0e:b0:2b0:4c5f:c05c with SMTP id 5a478bee46e88-2b05ebb63famr27128730eec.4.1767384739478; Fri, 02 Jan 2026 12:12:19 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org, richard.henderson@linaro.org Cc: brian.cain@oss.qualcomm.com, ltaylorsimpson@gmail.com, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 1/9] Hexagon (target/hexagon) Remove gen_tcg_func_table.py Date: Fri, 2 Jan 2026 12:11:57 -0800 Message-Id: <20260102201205.2050363-2-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260102201205.2050363-1-brian.cain@oss.qualcomm.com> References: <20260102201205.2050363-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: yU8dSmDE66KnKgd6qQV6dRaVruoFfz5L X-Proofpoint-ORIG-GUID: yU8dSmDE66KnKgd6qQV6dRaVruoFfz5L X-Authority-Analysis: v=2.4 cv=dMKrWeZb c=1 sm=1 tr=0 ts=695826a5 cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=mDV3o1hIAAAA:8 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=KKAkSRfTAAAA:8 a=DeRzdpBI32YyQvUjPIcA:9 a=QEXdDO2ut3YA:10 a=3WC7DwWrALyhR5TkjVHa:22 a=cvBusfyB2V15izCimMoJ:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTAyMDE4MSBTYWx0ZWRfX125Ly3+g9c+I TBEf2qh5J30qBFVRxDxeReXvVS68v3WbE7rZefT0khzeZWUwXWu/Hl7VYt2osane4196USFkyRJ XwDN3gAAgXIOU91gzsaf/HdicfkonKIsA2qzexf6JIbIKEfPOYoj7nD65xg92FDupcAEWTy4aTI 7cGkGdefipC17XZouL/25ltl11BvrRfnxlcWbR/wEmZtBrXY4cMHPHxqXy9BAb/3O1XWH4+WSw+ xRqXoE1YMwuL3Yih3Hp8Qwe1Y1xXZxeUOoLmCD01ls8f7YhXD+PIJ5QhF4xF7iOt/mr/t1ll0nj PKQ1fIDSwtX9yAzUfmrUs+9Bhok/QrL63wX4ZhSYWkSIZSQ9njvDLMC9dCsXFdy50Ss743cejcK kkj1PD8EazWV2zKQcQuGDJRhrN6s5X9EA1HUM/wxpgtLZu7xE6RnNBJffJaXbUzfFWKd0SxfJZ9 4/KPZFrwPzURCP76BZA== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-02_03,2025-12-31_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 spamscore=0 malwarescore=0 impostorscore=0 adultscore=0 phishscore=0 priorityscore=1501 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601020181 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 (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=205.220.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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 @qualcomm.com) X-ZM-MESSAGEID: 1767384800742158500 Content-Type: text/plain; charset="utf-8" From: Taylor Simpson This can easily be done in C with opcodes_def_generated.h.inc Note that gen_tcg_func_table.py has some logic to skip instructions. However, there aren't any instructions currently in the code that would be skipped by this logic. So, it is safe to base the table on the complete opcodes table. Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain Tested-by: Brian Cain Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Brian Cain --- target/hexagon/genptr.c | 6 ++- target/hexagon/README | 1 - target/hexagon/gen_tcg_func_table.py | 66 ---------------------------- target/hexagon/meson.build | 10 ----- 4 files changed, 5 insertions(+), 78 deletions(-) delete mode 100755 target/hexagon/gen_tcg_func_table.py diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index cecaece4ae..445de8db60 100644 --- a/target/hexagon/genptr.c +++ b/target/hexagon/genptr.c @@ -1454,4 +1454,8 @@ void gen_add_sat_i64(DisasContext *ctx, TCGv_i64 ret,= TCGv_i64 a, TCGv_i64 b) } =20 #include "tcg_funcs_generated.c.inc" -#include "tcg_func_table_generated.c.inc" +const SemanticInsn opcode_genptr[XX_LAST_OPCODE] =3D { +#define OPCODE(X) [X] =3D generate_##X +#include "opcodes_def_generated.h.inc" +#undef OPCODE +}; diff --git a/target/hexagon/README b/target/hexagon/README index ca617e3364..5af298e3ed 100644 --- a/target/hexagon/README +++ b/target/hexagon/README @@ -47,7 +47,6 @@ header files in /target/hexagon gen_op_attribs.py -> op_attribs_generated.h.inc gen_helper_protos.py -> helper_protos_generated.h.inc gen_tcg_funcs.py -> tcg_funcs_generated.c.inc - gen_tcg_func_table.py -> tcg_func_table_generated.c.inc gen_helper_funcs.py -> helper_funcs_generated.c.inc gen_idef_parser_funcs.py -> idef_parser_input.h gen_analyze_funcs.py -> analyze_funcs_generated.c.inc diff --git a/target/hexagon/gen_tcg_func_table.py b/target/hexagon/gen_tcg_= func_table.py deleted file mode 100755 index 299a39b1aa..0000000000 --- a/target/hexagon/gen_tcg_func_table.py +++ /dev/null @@ -1,66 +0,0 @@ -#!/usr/bin/env python3 - -## -## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Res= erved. -## -## This program is free software; you can redistribute it and/or modify -## it under the terms of the GNU General Public License as published by -## the Free Software Foundation; either version 2 of the License, or -## (at your option) any later version. -## -## This program is distributed in the hope that it will be useful, -## but WITHOUT ANY WARRANTY; without even the implied warranty of -## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -## GNU General Public License for more details. -## -## You should have received a copy of the GNU General Public License -## along with this program; if not, see . -## - -import sys -import re -import string -import hex_common -import argparse - - -def main(): - parser =3D argparse.ArgumentParser( - "Emit opaque macro calls with instruction semantics" - ) - parser.add_argument("semantics", help=3D"semantics file") - parser.add_argument("out", help=3D"output file") - args =3D parser.parse_args() - hex_common.read_semantics_file(args.semantics) - hex_common.calculate_attribs() - tagregs =3D hex_common.get_tagregs() - tagimms =3D hex_common.get_tagimms() - - with open(args.out, "w") as f: - f.write("#ifndef HEXAGON_FUNC_TABLE_H\n") - f.write("#define HEXAGON_FUNC_TABLE_H\n\n") - - f.write("const SemanticInsn opcode_genptr[XX_LAST_OPCODE] =3D {\n") - for tag in hex_common.tags: - ## Skip the priv instructions - if "A_PRIV" in hex_common.attribdict[tag]: - continue - ## Skip the guest instructions - if "A_GUEST" in hex_common.attribdict[tag]: - continue - ## Skip the diag instructions - if tag =3D=3D "Y6_diag": - continue - if tag =3D=3D "Y6_diag0": - continue - if tag =3D=3D "Y6_diag1": - continue - - f.write(f" [{tag}] =3D generate_{tag},\n") - f.write("};\n\n") - - f.write("#endif /* HEXAGON_FUNC_TABLE_H */\n") - - -if __name__ =3D=3D "__main__": - main() diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build index d26787a9b9..d169cf71b2 100644 --- a/target/hexagon/meson.build +++ b/target/hexagon/meson.build @@ -41,20 +41,10 @@ hexagon_ss.add(semantics_generated) # # Step 2 # We use Python scripts to generate the following files -# tcg_func_table_generated.c.inc # printinsn_generated.h.inc # op_attribs_generated.h.inc # opcodes_def_generated.h.inc # -tcg_func_table_generated =3D custom_target( - 'tcg_func_table_generated.c.inc', - output: 'tcg_func_table_generated.c.inc', - depends: [semantics_generated], - depend_files: [hex_common_py], - command: [python, files('gen_tcg_func_table.py'), semantics_generated,= '@OUTPUT@'], -) -hexagon_ss.add(tcg_func_table_generated) - printinsn_generated =3D custom_target( 'printinsn_generated.h.inc', output: 'printinsn_generated.h.inc', --=20 2.34.1