From patchwork Thu Mar 7 03:23:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585023 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 527B3C54E4A for ; Thu, 7 Mar 2024 03:25:00 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4M5-0001Rl-As; Wed, 06 Mar 2024 22:23:37 -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 1ri4M3-0001R1-Ck for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:35 -0500 Received: from mail-il1-x12b.google.com ([2607:f8b0:4864:20::12b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4M1-0005fP-I9 for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:35 -0500 Received: by mail-il1-x12b.google.com with SMTP id e9e14a558f8ab-365aff1fa8dso895825ab.2 for ; Wed, 06 Mar 2024 19:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781811; x=1710386611; 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=v3teDd8HDxktJH46jy4fSC2tTIGKstCq77/p/rg3zPo=; b=UE9/Be2Cw0BGRFW4Eozngb/VeaFDGKiOjoT4Tgw4vMx+QDGESHgLS1rVL8xbdR5BQ3 wLRnW3d8lYh2IG75h6Z+lvjOHAvEzETXesd8ngSHReIUz4C7B/KQrIYkTlKwcZi5BlQd iKHisCHnae1B96f5mZ/lJuQD7QgXMECPcVILsCsEYPx9oVkjsM96g+QlA/yiYg0S8djb rQhjYek5cjrKTNCBPmmTnIjNsXKcKc9THLxmfrgxXhm0rW0qhVYiSmNaysKd3Ze/+Q6x WkS3cFxHv8BxiMpZpE6XoZjyf907r899HAkZGtrHZ1eQ5niike4WgjwOIm+THWotUx84 J/vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781811; x=1710386611; 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=v3teDd8HDxktJH46jy4fSC2tTIGKstCq77/p/rg3zPo=; b=wkquRnr8g0TcQnwa1YJVEPN75FGUlcZ2pG6NpP2sHMC/txA+yYuvIv4bD9SNcsyQKi nJgVnqZdmnrwC7GCuZyG0OmWhMFBfzPTzcq5M2QqmdwvXXPXDRr+VATLSErMSW52WBQE CmThvkcDw+uYlE1VI5CwQmpwNtsQ0gJsq5/qMgNyIS4suFrlR2g3kDavRv1t+s12a/ji G/HMe55E3HtvgO3CHvvRABqITbE/cbE7w2QCkPyETcGjJAL9HKbH6ed88GA9Bn+VGSNh JQ2Zxj5+YmDO3AHczpvoqQOKA3l6fGJp9hZT0D6LgnhBfVO1e/ZdBO+G7mpOjThGpCBH FtZg== X-Gm-Message-State: AOJu0YzTU+gzI+ogbokEGJMxWQqJgmuWxpJXW5w/x0l74yu2RcRbb+fF JNANGKFBUokT177hVSQNpC3DeOnSjABhqCYIfomaosnSZVd4naSquZXk6J+SVYc= X-Google-Smtp-Source: AGHT+IHoEbcP+7wbWfLsHOZrllvtBPoQOAcEdIyYiIoOuuSu+B6VuzYN51GfKWoC4ASfv8HWnSAvaA== X-Received: by 2002:a05:6e02:148d:b0:365:1dd9:ee6b with SMTP id n13-20020a056e02148d00b003651dd9ee6bmr25409244ilk.25.1709781811024; Wed, 06 Mar 2024 19:23:31 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:30 -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 1/9] Hexagon (target/hexagon) Add is_old/is_new to Register class Date: Wed, 6 Mar 2024 20:23:19 -0700 Message-Id: <20240307032327.4799-2-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::12b; envelope-from=ltaylorsimpson@gmail.com; helo=mail-il1-x12b.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Brian Cain --- target/hexagon/hex_common.py | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 195620c7ec..4bacef223f 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon/hex_common.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -397,10 +397,18 @@ def is_readwrite(self): class OldSource(Source): def reg_tcg(self): return f"{self.regtype}{self.regid}V" + def is_old(self): + return True + def is_new(self): + return False class NewSource(Source): def reg_tcg(self): return f"{self.regtype}{self.regid}N" + def is_old(self): + return False + def is_new(self): + return True class ReadWrite: def reg_tcg(self): @@ -413,6 +421,10 @@ def is_read(self): return True def is_readwrite(self): return True + def is_old(self): + return True + def is_new(self): + return False class GprDest(Register, Single, Dest): def decl_tcg(self, f, tag, regno): From patchwork Thu Mar 7 03:23:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2BF07C54E4A for ; Thu, 7 Mar 2024 03:24:44 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4M6-0001S1-FN; Wed, 06 Mar 2024 22:23:38 -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 1ri4M4-0001RP-Ri for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:36 -0500 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4M3-0005h9-2O for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:36 -0500 Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-7c8060a8489so22511339f.0 for ; Wed, 06 Mar 2024 19:23:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781812; x=1710386612; 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=rnskkX/gjRWt+FxpnLgMIRqQFGfGcaZlOIoSY38nl70=; b=WwM0Fu+oapuHo2qms3e75RKLxShHpbyLCdQOzyY0kCIAr2uEh5fsQVUZQHIS/VCkEW 9Hu4Kt8YTCkdJRBnsefPCVJvKFGwqp9XrnS+Gt4prAaeOyQ3awTUnWiAz8SCUoAcaX4J exvvmWyKlrbX3Nxlmesl3aTvEQJVyIM6tqrx3K6qWI/tmUCflCnC1aPtrq20R9gH4m9k 1b+ZSHj96bQcnoGz2jZ282zWmz9sn1Yi/x6SQa11bCUwnGorqVdTL1CR/jUF++/DD6Km CwW7yRc/1WMaZCGaclh24N4impRpoZN7AF+ehiZFgUj6OZBEyLgxvakCfK9y9e0VX4Ji edUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781812; x=1710386612; 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=rnskkX/gjRWt+FxpnLgMIRqQFGfGcaZlOIoSY38nl70=; b=DoVBAXWbOHInQS1+2YumFkeg+l2jBchlK4IYKh2WT+tlEA2u/KYiTIJSh84mTbr8bU VhhmtFMJxtT+jCSKvj6hMGcK0Jol69nE4v98PjwA7ruE8R1APy2YPgbyvPE+FE2xAlnb 7CEf7UfOqs1Ngsn46GXBSzzOpL0nr72deqN/S7n0WOYtOOJpfikpDWPEMUunv6QH6WXf aZtXcEQc1UkqedHk6nZNayH0mhmezvj7kFB8hwd8ORbgPUB58+j2RxfIISy8FR5M0dxb /vTZikNG0wcFTWFsKhrJafEOhXA0oxYdw2DkEAFYNYHuui+uKnkOxkftHR5AO6g+T9W5 YO/A== X-Gm-Message-State: AOJu0Yzk/kM6Dzn1tb3nXmJJwG40JKP/oIp9ynyY4Eo7bO37AIALvsHg K9NCr87Chxl0MLv0dFKUibjX8dfRisFBJC+DZQiK9S+2//26uaRFhF6qsPpg6MU= X-Google-Smtp-Source: AGHT+IF9I8+ld7Zj0CVkD+SdHCXFrx+PQ58nNxKYLdkEKoXCKzbwa9+rou/M+/JP5GOIpPfZ+U53Ww== X-Received: by 2002:a05:6602:29b1:b0:7c8:5c0a:5e88 with SMTP id u17-20020a05660229b100b007c85c0a5e88mr10016887ios.9.1709781812459; Wed, 06 Mar 2024 19:23:32 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:31 -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 2/9] Hexagon (target/hexagon) Mark new_read_idx in trans functions Date: Wed, 6 Mar 2024 20:23:20 -0700 Message-Id: <20240307032327.4799-3-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d31; envelope-from=ltaylorsimpson@gmail.com; helo=mail-io1-xd31.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Check that the value matches opcode_reginfo Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain --- target/hexagon/insn.h | 3 ++- target/hexagon/decode.c | 2 ++ target/hexagon/mmvec/decode_ext_mmvec.c | 2 ++ target/hexagon/gen_trans_funcs.py | 15 ++++++++++----- 4 files changed, 16 insertions(+), 6 deletions(-) diff --git a/target/hexagon/insn.h b/target/hexagon/insn.h index 3e7a22c91e..36502bf056 100644 --- a/target/hexagon/insn.h +++ b/target/hexagon/insn.h @@ -1,5 +1,5 @@ /* - * Copyright(c) 2019-2022 Qualcomm Innovation Center, Inc. All Rights Reserved. + * Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. * * 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 @@ -39,6 +39,7 @@ struct Instruction { uint32_t slot:3; uint32_t which_extended:1; /* If has an extender, which immediate */ uint32_t new_value_producer_slot:4; + int32_t new_read_idx; bool part1; /* * cmp-jumps are split into two insns. diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index a40210ca1e..4595e30384 100644 --- a/target/hexagon/decode.c +++ b/target/hexagon/decode.c @@ -131,6 +131,8 @@ decode_fill_newvalue_regno(Packet *packet) use_regidx = strchr(opcode_reginfo[use_opcode], 's') - opcode_reginfo[use_opcode]; } + g_assert(packet->insn[i].new_read_idx != -1 && + packet->insn[i].new_read_idx == use_regidx); /* * What's encoded at the N-field is the offset to who's producing diff --git a/target/hexagon/mmvec/decode_ext_mmvec.c b/target/hexagon/mmvec/decode_ext_mmvec.c index 202d84c7c0..e9007f5d71 100644 --- a/target/hexagon/mmvec/decode_ext_mmvec.c +++ b/target/hexagon/mmvec/decode_ext_mmvec.c @@ -41,6 +41,8 @@ check_new_value(Packet *pkt) GET_ATTRIB(use_opcode, A_STORE)) { int use_regidx = strchr(opcode_reginfo[use_opcode], 's') - opcode_reginfo[use_opcode]; + g_assert(pkt->insn[i].new_read_idx != -1 && + pkt->insn[i].new_read_idx == use_regidx); /* * What's encoded at the N-field is the offset to who's producing * the value. diff --git a/target/hexagon/gen_trans_funcs.py b/target/hexagon/gen_trans_funcs.py index 53e844a44b..8acecdb993 100755 --- a/target/hexagon/gen_trans_funcs.py +++ b/target/hexagon/gen_trans_funcs.py @@ -68,6 +68,7 @@ def mark_which_imm_extended(f, tag): ## insn->regno[0] = args->Rd; ## insn->regno[1] = args->Rs; ## insn->regno[2] = args->Rt; +## insn->new_read_idx = -1; ## return true; ## } ## @@ -84,14 +85,14 @@ def gen_trans_funcs(f): insn->opcode = {tag}; """)) - regno = 0 - for reg in regs: - reg_type = reg[0] - reg_id = reg[1] + new_read_idx = -1 + for regno, (reg_type, reg_id, *_) in enumerate(regs): + reg = hex_common.get_register(tag, reg_type, reg_id) f.write(code_fmt(f"""\ insn->regno[{regno}] = args->{reg_type}{reg_id}; """)) - regno += 1 + if reg.is_read() and reg.is_new(): + new_read_idx = regno if len(imms) != 0: mark_which_imm_extended(f, tag) @@ -112,6 +113,9 @@ def gen_trans_funcs(f): insn->immed[{immno}] = args->{imm_type}{imm_letter}; """)) + f.write(code_fmt(f"""\ + insn->new_read_idx = {new_read_idx}; + """)) f.write(textwrap.dedent(f"""\ return true; {close_curly} @@ -120,5 +124,6 @@ def gen_trans_funcs(f): if __name__ == "__main__": hex_common.read_semantics_file(sys.argv[1]) + hex_common.init_registers() with open(sys.argv[2], "w") as f: gen_trans_funcs(f) From patchwork Thu Mar 7 03:23:21 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585024 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 27CACC5475B for ; Thu, 7 Mar 2024 03:25:16 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4M6-0001SR-US; Wed, 06 Mar 2024 22:23:38 -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 1ri4M5-0001Rm-DT for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:37 -0500 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4M3-0005hL-QX for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:37 -0500 Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-7c8406e4745so19124339f.3 for ; Wed, 06 Mar 2024 19:23:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781814; x=1710386614; 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=uuAflH+os+yu0r/DJ/rQ7cJGHjxjAdD2yR1xW/PppVE=; b=GeIEYNPEtZ3TPW8ZH7eLTEIuzDSEmVT2YiECjzLR7AIqE85dEKy+z86GbfWFhXP+cG Z4oLNr5Zzx3SvIQCcjfXGP0AMBcRdq1+qWEVrAeL5seiC63WV+6l57wy8NWYRpLgOWBa nwXZ9DEB6HlG/mCqYIKoRcNn2ArBL81ssVJewLRXKgRoCR5J0MKl6KqG9xIumxZNg8Ct i4AgbS5Cztd+wyGm0x72KshX2S4EIAzj05RKw9aBFCt94VfKQvX36vNRihFykwPFJbc5 hCvoaNm8U+Raz0lJzZ4noq3JQ5pnYOVEgdxOuiZV/TFAjp5xO9uESgGXXwskZqlZ4uf+ hD2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781814; x=1710386614; 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=uuAflH+os+yu0r/DJ/rQ7cJGHjxjAdD2yR1xW/PppVE=; b=kNYpcuqhhUvAx2hDs39Hu80O4NzTBLjSt9StIMU6SKX5Ugtmw6ayoH/l6+rnOUYvHe UNoCKTrjsTCPwudLHxNw2mehTIJcLqExTr1/gU7u+i/71bgxF0KSU5+O7O6p1Bz3NhgG V6wfAleA39AGTVvrr43quhNH2sPvzrq6wABqgmInGk7CL2K56ls53eyGpPAGOOvofaXJ 1qAH9BGxnr7iDuiXmHaWHnEB8viN3qZ4oL+HUwNoy/XOkDPPIUvIR6dPZd7gQJbsYqbF /bIQEiTDevLIiYDVVyhml1BwM9UVqmMMY91Sbb/NgjBUUjl6OVCDRFMYw2FjG31Ii0MO EpTg== X-Gm-Message-State: AOJu0Yy42o8phCabHSpN0ClmodCwJ64ZImhlz2w55/3TFowMjdcXxY4g /wiH4CxSxPLLGorMUj5WBKqZ3q1Ah+mc0BI7OOOnonC6/3ZF8zAdPNmaETPt8yM= X-Google-Smtp-Source: AGHT+IGbspPuomrW2XwnZZm1g8AoGBUSSlCeJ7/Vrxmu/ZV+VkudxmUEgDCmLntFz7SJ57Dr6UwTGw== X-Received: by 2002:a5d:9519:0:b0:7c8:5972:6e0e with SMTP id d25-20020a5d9519000000b007c859726e0emr10175058iom.15.1709781813866; Wed, 06 Mar 2024 19:23:33 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:33 -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 3/9] Hexagon (target/hexagon) Mark dest_idx in trans functions Date: Wed, 6 Mar 2024 20:23:21 -0700 Message-Id: <20240307032327.4799-4-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d31; envelope-from=ltaylorsimpson@gmail.com; helo=mail-io1-xd31.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Check that the value matches opcode_reginfo/opcode_wregs Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain --- target/hexagon/insn.h | 1 + target/hexagon/decode.c | 2 ++ target/hexagon/mmvec/decode_ext_mmvec.c | 2 ++ target/hexagon/gen_trans_funcs.py | 6 ++++++ 4 files changed, 11 insertions(+) diff --git a/target/hexagon/insn.h b/target/hexagon/insn.h index 36502bf056..a770379958 100644 --- a/target/hexagon/insn.h +++ b/target/hexagon/insn.h @@ -40,6 +40,7 @@ struct Instruction { uint32_t which_extended:1; /* If has an extender, which immediate */ uint32_t new_value_producer_slot:4; int32_t new_read_idx; + int32_t dest_idx; bool part1; /* * cmp-jumps are split into two insns. diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index 4595e30384..a4d8500fea 100644 --- a/target/hexagon/decode.c +++ b/target/hexagon/decode.c @@ -184,6 +184,8 @@ decode_fill_newvalue_regno(Packet *packet) /* Now patch up the consumer with the register number */ dst_idx = dststr - opcode_reginfo[def_opcode]; + g_assert(packet->insn[def_idx].dest_idx != -1 && + packet->insn[def_idx].dest_idx == dst_idx); packet->insn[i].regno[use_regidx] = packet->insn[def_idx].regno[dst_idx]; /* diff --git a/target/hexagon/mmvec/decode_ext_mmvec.c b/target/hexagon/mmvec/decode_ext_mmvec.c index e9007f5d71..c1320406df 100644 --- a/target/hexagon/mmvec/decode_ext_mmvec.c +++ b/target/hexagon/mmvec/decode_ext_mmvec.c @@ -86,6 +86,8 @@ check_new_value(Packet *pkt) /* still not there, we have a bad packet */ g_assert_not_reached(); } + g_assert(pkt->insn[def_idx].dest_idx != -1 && + pkt->insn[def_idx].dest_idx == dststr - reginfo); int def_regnum = pkt->insn[def_idx].regno[dststr - reginfo]; /* Now patch up the consumer with the register number */ pkt->insn[i].regno[use_regidx] = def_regnum ^ def_oreg; diff --git a/target/hexagon/gen_trans_funcs.py b/target/hexagon/gen_trans_funcs.py index 8acecdb993..1201172dda 100755 --- a/target/hexagon/gen_trans_funcs.py +++ b/target/hexagon/gen_trans_funcs.py @@ -69,6 +69,7 @@ def mark_which_imm_extended(f, tag): ## insn->regno[1] = args->Rs; ## insn->regno[2] = args->Rt; ## insn->new_read_idx = -1; +## insn->dest_idx = 0; ## return true; ## } ## @@ -86,6 +87,7 @@ def gen_trans_funcs(f): """)) new_read_idx = -1 + dest_idx = -1 for regno, (reg_type, reg_id, *_) in enumerate(regs): reg = hex_common.get_register(tag, reg_type, reg_id) f.write(code_fmt(f"""\ @@ -93,6 +95,9 @@ def gen_trans_funcs(f): """)) if reg.is_read() and reg.is_new(): new_read_idx = regno + # dest_idx should be the first destination, so check for -1 + if reg.is_written() and dest_idx == -1: + dest_idx = regno if len(imms) != 0: mark_which_imm_extended(f, tag) @@ -115,6 +120,7 @@ def gen_trans_funcs(f): f.write(code_fmt(f"""\ insn->new_read_idx = {new_read_idx}; + insn->dest_idx = {dest_idx}; """)) f.write(textwrap.dedent(f"""\ return true; From patchwork Thu Mar 7 03:23:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 444DEC54E41 for ; Thu, 7 Mar 2024 03:25:26 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4M7-0001Sf-Hr; Wed, 06 Mar 2024 22:23:39 -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 1ri4M6-0001S4-Cr for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:38 -0500 Received: from mail-io1-xd36.google.com ([2607:f8b0:4864:20::d36]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4M4-0005hX-PP for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:38 -0500 Received: by mail-io1-xd36.google.com with SMTP id ca18e2360f4ac-7c8713acecfso18328139f.0 for ; Wed, 06 Mar 2024 19:23:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781815; x=1710386615; 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=2qK5soASicTv0ySk9Xejx0X64X5wdWSDVESyTR2YQY0=; b=ilAX8v1riW22Vh0JiK/9h2vhEBpcox+jGtz8so+DOnmRKslzLrMwjbTXmnaV4OwWzx PWD7vNxh0F28fU94v/xpqp/B4Xo27ky4wywPm3TLJzUFd3wVXzOB5dKFFYVQLGBAoYUn rA/foiEKxXtsoNpVBQZEIterxfZJh/H7TFIK2CgZRsbLUwntTt6U52fz+IhYnK8BFQ4B CXd9vECO2Q/QVr85emb552oMWIXtPYuXUam1QGecdrEQFeykyPysCYwJlvNbxhSm6qyP tsMVTRPjjNyYcGgMVIGLtNmkOibtDPCV951lcTpckkeDAMdLYBGWisriU3b5SNTxm27l lD9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781815; x=1710386615; 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=2qK5soASicTv0ySk9Xejx0X64X5wdWSDVESyTR2YQY0=; b=YAsojyg0XHFgtRC3B0NXexeXlQdUbTdPuDTgahuakX4NsTe7wEbtcVxSrVY+koxyQa c3G/WjuRrKPUnydRvioBxmlM8Yeg154rfGXXboNJyJnc+rRDza/80fo7W7PZ8+ItOTxG nWookMNq2sw3IogJFt4pfTDzU91xZp7xkid62oDzZmgh4esoemOgKwQVbF+yQFs+Khk8 CREfr6LQHxPeVEsjCEUDoq3H48OG9Syvgly1G3qRNGVoe30SyDEev5kJio3ykEJR0B65 5XV8d0n3zVWIIkwlJ0hgrN0pFectaWVglKN7v/dembcKl7xMmsJ2nd21sR9H95kmierH ceyA== X-Gm-Message-State: AOJu0YxQJxYpDXYi/viSSFWPGgy0IwtA5tC8p6qoWaliCAFpHgEhP/qw nCwpx6JgpGGw+g/VVhRvjsMF9Jtft9U8LVvhiibd/jAZ2Zrib+J6dJoO58jEOZk= X-Google-Smtp-Source: AGHT+IHCYXhwlEnh9azO4p7RvPu/STaxqGsUQMHm9jMrqwaTiA13lbOsGIMuCt14SJAsRjiF+vMxlw== X-Received: by 2002:a05:6e02:1d83:b0:365:b9c8:4436 with SMTP id h3-20020a056e021d8300b00365b9c84436mr20744030ila.10.1709781815208; Wed, 06 Mar 2024 19:23:35 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:34 -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 4/9] Hexagon (target/hexagon) Mark has_pred_dest in trans functions Date: Wed, 6 Mar 2024 20:23:22 -0700 Message-Id: <20240307032327.4799-5-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d36; envelope-from=ltaylorsimpson@gmail.com; helo=mail-io1-xd36.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Check that the value matches opcode_wregs Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain --- target/hexagon/insn.h | 1 + target/hexagon/decode.c | 3 +++ target/hexagon/gen_trans_funcs.py | 5 +++++ 3 files changed, 9 insertions(+) diff --git a/target/hexagon/insn.h b/target/hexagon/insn.h index a770379958..24dcf7fe9f 100644 --- a/target/hexagon/insn.h +++ b/target/hexagon/insn.h @@ -41,6 +41,7 @@ struct Instruction { uint32_t new_value_producer_slot:4; int32_t new_read_idx; int32_t dest_idx; + bool has_pred_dest; bool part1; /* * cmp-jumps are split into two insns. diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index a4d8500fea..84a3899556 100644 --- a/target/hexagon/decode.c +++ b/target/hexagon/decode.c @@ -366,6 +366,9 @@ static void decode_shuffle_for_execution(Packet *packet) for (flag = false, i = 0; i < last_insn + 1; i++) { int opcode = packet->insn[i].opcode; + g_assert(packet->insn[i].has_pred_dest == + (strstr(opcode_wregs[opcode], "Pd4") || + strstr(opcode_wregs[opcode], "Pe4"))); if ((strstr(opcode_wregs[opcode], "Pd4") || strstr(opcode_wregs[opcode], "Pe4")) && GET_ATTRIB(opcode, A_STORE) == 0) { diff --git a/target/hexagon/gen_trans_funcs.py b/target/hexagon/gen_trans_funcs.py index 1201172dda..9f86b4edbd 100755 --- a/target/hexagon/gen_trans_funcs.py +++ b/target/hexagon/gen_trans_funcs.py @@ -70,6 +70,7 @@ def mark_which_imm_extended(f, tag): ## insn->regno[2] = args->Rt; ## insn->new_read_idx = -1; ## insn->dest_idx = 0; +## insn->has_pred_dest = false; ## return true; ## } ## @@ -88,6 +89,7 @@ def gen_trans_funcs(f): new_read_idx = -1 dest_idx = -1 + has_pred_dest = "false" for regno, (reg_type, reg_id, *_) in enumerate(regs): reg = hex_common.get_register(tag, reg_type, reg_id) f.write(code_fmt(f"""\ @@ -98,6 +100,8 @@ def gen_trans_funcs(f): # dest_idx should be the first destination, so check for -1 if reg.is_written() and dest_idx == -1: dest_idx = regno + if reg_type == "P" and reg.is_written() and not reg.is_read(): + has_pred_dest = "true" if len(imms) != 0: mark_which_imm_extended(f, tag) @@ -121,6 +125,7 @@ def gen_trans_funcs(f): f.write(code_fmt(f"""\ insn->new_read_idx = {new_read_idx}; insn->dest_idx = {dest_idx}; + insn->has_pred_dest = {has_pred_dest}; """)) f.write(textwrap.dedent(f"""\ return true; From patchwork Thu Mar 7 03:23:23 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585022 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 87767C54E41 for ; Thu, 7 Mar 2024 03:24:58 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4M9-0001TI-22; Wed, 06 Mar 2024 22:23: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 1ri4M7-0001Sg-IE for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:39 -0500 Received: from mail-io1-xd32.google.com ([2607:f8b0:4864:20::d32]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4M6-0005hm-0H for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:39 -0500 Received: by mail-io1-xd32.google.com with SMTP id ca18e2360f4ac-7c854657e13so14091839f.1 for ; Wed, 06 Mar 2024 19:23:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781816; x=1710386616; 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=G8J7F2iE5kae+EJMR1Fj9GxIukzXTHmw7zGOIwbFMQA=; b=EcW9R5QXgou9pHN1RapdTvVvwCe4gJVkTz1/bSArUzXD7n0zvlTea9RQw27L1ecCK7 PjKt4Vt8W7+XIAfBpzCX6ICi6jPr4hxqwIgClwE23FEvhPDZhHahBXiPZVK7QetwWUVT UqFZ3JBh8wdiP3n+XC30KhkBsBR5xo9qcqo7sVg+t3VVIRkXJ1X+niSEPea+SE9dfOzk mfw/QX6GHzTXiuhGgUrGe9SS6p/idQmdqo/4xIUZpBX+re6OMWzB4+TV7X1lj1U7GETC uMj0dVOF83duHzh+faAbxP8RzBnRz/Ug1qfSq85/3gmQYml+KTx/SPAl2XkchzBD6QGm nBrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781816; x=1710386616; 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=G8J7F2iE5kae+EJMR1Fj9GxIukzXTHmw7zGOIwbFMQA=; b=TGNLVo9ZQc+xdpYCwoAcjsCJEG0wO5ZZ2XQsbtSru9HbWU8VdwR8SkKK8rGyD2eDcj SsLSTa3mPnIjbD8kuoPOXgwTbjbPW/GWrG10LKbKLTiScDeL0AsbJfbevW5wIZDFeLl5 lml2b4V1f87GcYOheJ3RI4s2rsFcnThaTOr/guwOLQpzimBI/0wUJQqT3T5+Ikcxr+FJ Vbo6+8yo9GLWWmzd15rMEbSbVE3YZK17emHDVm9KNcCutgGXzOcpx0Mn6syfmOtYi6EC TdGqhlUmTzlC4tyGOyXifwErE+cnWcQ8qPaMWSXfpA9bg/0rn48MSsP7/zLN5wI3TPD+ qxdQ== X-Gm-Message-State: AOJu0YySwt9gE96VlPw+BDeLQflMymPls2miYR/laJkLyS7Kyu08bPNU 02of91dgyhARjFf40Hjmj8zHPBgFyPUyFcV/EQhrDUxb5pSCbJwF7qf7K9+vGTU= X-Google-Smtp-Source: AGHT+IFVLFsJc1YIjFalWPIg9rQtwl05NIVY2omMQMLo1ujfua9AlRO2S66kn9N5ZKMIJ5zspooy6A== X-Received: by 2002:a05:6602:1604:b0:7c8:65af:20ce with SMTP id x4-20020a056602160400b007c865af20cemr10157674iow.15.1709781816211; Wed, 06 Mar 2024 19:23:36 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:35 -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 5/9] Hexagon (tests/tcg/hexagon) Test HVX .new read from high half of pair Date: Wed, 6 Mar 2024 20:23:23 -0700 Message-Id: <20240307032327.4799-6-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d32; envelope-from=ltaylorsimpson@gmail.com; helo=mail-io1-xd32.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Make sure the decoding of HVX .new is correctly handling this case Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain --- tests/tcg/hexagon/hvx_misc.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/tcg/hexagon/hvx_misc.c b/tests/tcg/hexagon/hvx_misc.c index b45170acd1..1fe14b5158 100644 --- a/tests/tcg/hexagon/hvx_misc.c +++ b/tests/tcg/hexagon/hvx_misc.c @@ -1,5 +1,5 @@ /* - * Copyright(c) 2021-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. + * Copyright(c) 2021-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. * * 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 @@ -231,6 +231,7 @@ static void test_masked_store(bool invert) static void test_new_value_store(void) { void *p0 = buffer0; + void *p1 = buffer1; void *pout = output; asm("{\n\t" @@ -242,6 +243,19 @@ static void test_new_value_store(void) expect[0] = buffer0[0]; check_output_w(__LINE__, 1); + + /* Test the .new read from the high half of a pair */ + asm("v7 = vmem(%0 + #0)\n\t" + "v12 = vmem(%1 + #0)\n\t" + "{\n\t" + " v5:4 = vcombine(v12, v7)\n\t" + " vmem(%2 + #0) = v5.new\n\t" + "}\n\t" + : : "r"(p0), "r"(p1), "r"(pout) : "v4", "v5", "v7", "v12", "memory"); + + expect[0] = buffer1[0]; + + check_output_w(__LINE__, 1); } static void test_max_temps() From patchwork Thu Mar 7 03:23:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585018 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8E008C54E41 for ; Thu, 7 Mar 2024 03:24:17 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4MB-0001Tf-4C; Wed, 06 Mar 2024 22:23:43 -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 1ri4M9-0001TJ-Co for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:41 -0500 Received: from mail-oa1-x2d.google.com ([2001:4860:4864:20::2d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4M7-0005ji-JN for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:41 -0500 Received: by mail-oa1-x2d.google.com with SMTP id 586e51a60fabf-21f3a4ba205so166021fac.1 for ; Wed, 06 Mar 2024 19:23:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781817; x=1710386617; 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=U46l8139A+4KRjWcCLYKQaeKeiOnLqLqKh4dYSCOgv0=; b=eNAqIRU/zVGgMQC1Az+Beqf0jCqIEY3FDRkh0H9VAhHYyck3uGEScnZ9lIqom1a8P5 c6Jz0dMgE8TY5NErI9zs9LqDO2/Q+7uiBHG0SXPmlc8k1zMy1dUqpklTOB3ABn0WmCdU KsiMy0jM3M++LTqnQHkCd1M4RrO9bRjVxeakUFLW59CJSJBab4D7QpeWnrgotQRJ5xa5 cBUfbghkBctDvc3/qmPoIpjANGby9WZpmS+Ue39DUyexJsSKncVHzFOMpdOfhJ5UP2+G AbKCKQgLst8vkEzA73h/5Lfk0kWOJM8/WmBazjRhc+zaRVphQiZKYVXhvfxXVFm6W6bu +I1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781817; x=1710386617; 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=U46l8139A+4KRjWcCLYKQaeKeiOnLqLqKh4dYSCOgv0=; b=gF31pQRKEEi4iHJs8mOuyu4zHLEQkqYlfNt0euk4Bu253KEzYbWUf5ovFEiDZNRD0e dnWgkSkMb2SLy3PWmohZkQpFOSbM7zI16Ob18pbj/2EjoAhFnUxxHA0ssVKnimfUSqFJ yzeUMYBHLSDIswxjTyj8ZF7W5rZCqpLX2jkClp91VYKQceCKFq7HwqCdDaywNW2zOu7G 9hAW7PIMpxEczXs8vXhR5invh2xz/92gbJmk/2orDoSq/0vdQH+2JJznynSoG/xSDSR3 5ZX2vwMuThPNoAOhhS1WpvkicCnvOTm7IjH+avB0ujBphvYGosUITq6RZ3PZ+AeEN/ZJ haog== X-Gm-Message-State: AOJu0YyFPAmveTrhjvLxVxl75pP3q74ZsOAphDSggraI/H6dg+jCsv81 TBQEKyy8EcLEaBOshIAGEOxq9t2xyJYnEav+EKCU9ZDZeg/LFay6zGuCw5YwQt8= X-Google-Smtp-Source: AGHT+IHRKajcx9dcZRRaAWHLoYhTZ7Cd6KlsDgKJgxZwEny+8Ebo76gwgisGMG7EV9jVoTZqn7gveA== X-Received: by 2002:a05:6870:889:b0:221:38c0:3f0a with SMTP id fx9-20020a056870088900b0022138c03f0amr6649970oab.35.1709781817225; Wed, 06 Mar 2024 19:23:37 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:36 -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) Remove uses of op_regs_generated.h.inc Date: Wed, 6 Mar 2024 20:23:24 -0700 Message-Id: <20240307032327.4799-7-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2001:4860:4864:20::2d; envelope-from=ltaylorsimpson@gmail.com; helo=mail-oa1-x2d.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain --- target/hexagon/opcodes.h | 4 -- target/hexagon/decode.c | 57 +++---------------------- target/hexagon/mmvec/decode_ext_mmvec.c | 34 +++------------ target/hexagon/opcodes.c | 28 ------------ 4 files changed, 13 insertions(+), 110 deletions(-) diff --git a/target/hexagon/opcodes.h b/target/hexagon/opcodes.h index fa7e321950..0ee11bd445 100644 --- a/target/hexagon/opcodes.h +++ b/target/hexagon/opcodes.h @@ -40,10 +40,6 @@ typedef enum { extern const char * const opcode_names[]; -extern const char * const opcode_reginfo[]; -extern const char * const opcode_rregs[]; -extern const char * const opcode_wregs[]; - typedef struct { const char * const encoding; const EncClass enc_class; diff --git a/target/hexagon/decode.c b/target/hexagon/decode.c index 84a3899556..23deba2426 100644 --- a/target/hexagon/decode.c +++ b/target/hexagon/decode.c @@ -115,24 +115,13 @@ static void decode_fill_newvalue_regno(Packet *packet) { int i, use_regidx, offset, def_idx, dst_idx; - uint16_t def_opcode, use_opcode; - char *dststr; for (i = 1; i < packet->num_insns; i++) { if (GET_ATTRIB(packet->insn[i].opcode, A_DOTNEWVALUE) && !GET_ATTRIB(packet->insn[i].opcode, A_EXTENSION)) { - use_opcode = packet->insn[i].opcode; - - /* It's a store, so we're adjusting the Nt field */ - if (GET_ATTRIB(use_opcode, A_STORE)) { - use_regidx = strchr(opcode_reginfo[use_opcode], 't') - - opcode_reginfo[use_opcode]; - } else { /* It's a Jump, so we're adjusting the Ns field */ - use_regidx = strchr(opcode_reginfo[use_opcode], 's') - - opcode_reginfo[use_opcode]; - } - g_assert(packet->insn[i].new_read_idx != -1 && - packet->insn[i].new_read_idx == use_regidx); + + g_assert(packet->insn[i].new_read_idx != -1); + use_regidx = packet->insn[i].new_read_idx; /* * What's encoded at the N-field is the offset to who's producing @@ -153,39 +142,9 @@ decode_fill_newvalue_regno(Packet *packet) */ g_assert(!((def_idx < 0) || (def_idx > (packet->num_insns - 1)))); - /* - * packet->insn[def_idx] is the producer - * Figure out which type of destination it produces - * and the corresponding index in the reginfo - */ - def_opcode = packet->insn[def_idx].opcode; - dststr = strstr(opcode_wregs[def_opcode], "Rd"); - if (dststr) { - dststr = strchr(opcode_reginfo[def_opcode], 'd'); - } else { - dststr = strstr(opcode_wregs[def_opcode], "Rx"); - if (dststr) { - dststr = strchr(opcode_reginfo[def_opcode], 'x'); - } else { - dststr = strstr(opcode_wregs[def_opcode], "Re"); - if (dststr) { - dststr = strchr(opcode_reginfo[def_opcode], 'e'); - } else { - dststr = strstr(opcode_wregs[def_opcode], "Ry"); - if (dststr) { - dststr = strchr(opcode_reginfo[def_opcode], 'y'); - } else { - g_assert_not_reached(); - } - } - } - } - g_assert(dststr != NULL); - /* Now patch up the consumer with the register number */ - dst_idx = dststr - opcode_reginfo[def_opcode]; - g_assert(packet->insn[def_idx].dest_idx != -1 && - packet->insn[def_idx].dest_idx == dst_idx); + g_assert(packet->insn[def_idx].dest_idx != -1); + dst_idx = packet->insn[def_idx].dest_idx; packet->insn[i].regno[use_regidx] = packet->insn[def_idx].regno[dst_idx]; /* @@ -366,11 +325,7 @@ static void decode_shuffle_for_execution(Packet *packet) for (flag = false, i = 0; i < last_insn + 1; i++) { int opcode = packet->insn[i].opcode; - g_assert(packet->insn[i].has_pred_dest == - (strstr(opcode_wregs[opcode], "Pd4") || - strstr(opcode_wregs[opcode], "Pe4"))); - if ((strstr(opcode_wregs[opcode], "Pd4") || - strstr(opcode_wregs[opcode], "Pe4")) && + if (packet->insn[i].has_pred_dest && GET_ATTRIB(opcode, A_STORE) == 0) { /* This should be a compare (not a store conditional) */ if (flag) { diff --git a/target/hexagon/mmvec/decode_ext_mmvec.c b/target/hexagon/mmvec/decode_ext_mmvec.c index c1320406df..f850d0154d 100644 --- a/target/hexagon/mmvec/decode_ext_mmvec.c +++ b/target/hexagon/mmvec/decode_ext_mmvec.c @@ -28,21 +28,15 @@ check_new_value(Packet *pkt) { /* .new value for a MMVector store */ int i, j; - const char *reginfo; - const char *destletters; - const char *dststr = NULL; uint16_t def_opcode; - char letter; for (i = 1; i < pkt->num_insns; i++) { uint16_t use_opcode = pkt->insn[i].opcode; if (GET_ATTRIB(use_opcode, A_DOTNEWVALUE) && GET_ATTRIB(use_opcode, A_CVI) && GET_ATTRIB(use_opcode, A_STORE)) { - int use_regidx = strchr(opcode_reginfo[use_opcode], 's') - - opcode_reginfo[use_opcode]; - g_assert(pkt->insn[i].new_read_idx != -1 && - pkt->insn[i].new_read_idx == use_regidx); + int use_regidx = pkt->insn[i].new_read_idx; + g_assert(pkt->insn[i].new_read_idx != -1); /* * What's encoded at the N-field is the offset to who's producing * the value. @@ -70,33 +64,19 @@ check_new_value(Packet *pkt) /* def_idx is the index of the producer */ def_opcode = pkt->insn[def_idx].opcode; - reginfo = opcode_reginfo[def_opcode]; - destletters = "dexy"; - for (j = 0; (letter = destletters[j]) != 0; j++) { - dststr = strchr(reginfo, letter); - if (dststr != NULL) { - break; - } - } - if ((dststr == NULL) && GET_ATTRIB(def_opcode, A_CVI_GATHER)) { + if ((pkt->insn[def_idx].dest_idx == -1) && + GET_ATTRIB(def_opcode, A_CVI_GATHER)) { pkt->insn[i].regno[use_regidx] = def_oreg; pkt->insn[i].new_value_producer_slot = pkt->insn[def_idx].slot; } else { - if (dststr == NULL) { + if (pkt->insn[def_idx].dest_idx == -1) { /* still not there, we have a bad packet */ g_assert_not_reached(); } - g_assert(pkt->insn[def_idx].dest_idx != -1 && - pkt->insn[def_idx].dest_idx == dststr - reginfo); - int def_regnum = pkt->insn[def_idx].regno[dststr - reginfo]; + int def_regnum = + pkt->insn[def_idx].regno[pkt->insn[def_idx].dest_idx]; /* Now patch up the consumer with the register number */ pkt->insn[i].regno[use_regidx] = def_regnum ^ def_oreg; - /* special case for (Vx,Vy) */ - dststr = strchr(reginfo, 'y'); - if (def_oreg && strchr(reginfo, 'x') && dststr) { - def_regnum = pkt->insn[def_idx].regno[dststr - reginfo]; - pkt->insn[i].regno[use_regidx] = def_regnum; - } /* * We need to remember who produces this value to later * check if it was dynamically cancelled diff --git a/target/hexagon/opcodes.c b/target/hexagon/opcodes.c index 1f7f3def38..02ae9cf787 100644 --- a/target/hexagon/opcodes.c +++ b/target/hexagon/opcodes.c @@ -36,34 +36,6 @@ const char * const opcode_names[] = { #undef OPCODE }; -const char * const opcode_reginfo[] = { -#define IMMINFO(TAG, SIGN, SIZE, SHAMT, SIGN2, SIZE2, SHAMT2) /* nothing */ -#define REGINFO(TAG, REGINFO, RREGS, WREGS) REGINFO, -#include "op_regs_generated.h.inc" - NULL -#undef REGINFO -#undef IMMINFO -}; - - -const char * const opcode_rregs[] = { -#define IMMINFO(TAG, SIGN, SIZE, SHAMT, SIGN2, SIZE2, SHAMT2) /* nothing */ -#define REGINFO(TAG, REGINFO, RREGS, WREGS) RREGS, -#include "op_regs_generated.h.inc" - NULL -#undef REGINFO -#undef IMMINFO -}; - - -const char * const opcode_wregs[] = { -#define IMMINFO(TAG, SIGN, SIZE, SHAMT, SIGN2, SIZE2, SHAMT2) /* nothing */ -#define REGINFO(TAG, REGINFO, RREGS, WREGS) WREGS, -#include "op_regs_generated.h.inc" - NULL -#undef REGINFO -#undef IMMINFO -}; const char * const opcode_short_semantics[] = { #define DEF_SHORTCODE(TAG, SHORTCODE) [TAG] = #SHORTCODE, From patchwork Thu Mar 7 03:23:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1528C5475B for ; Thu, 7 Mar 2024 03:24:41 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4MC-0001Tj-Jr; Wed, 06 Mar 2024 22:23:44 -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 1ri4MA-0001TS-NK for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:42 -0500 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4M8-0005kt-Ry for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:42 -0500 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7c872a07d57so20560739f.0 for ; Wed, 06 Mar 2024 19:23:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781819; x=1710386619; 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=5r8V+dWA3RVhS5vfjxAmsItqAa6Frdq+W5yFoj18eJ8=; b=nNvl6gJddO/L3FSPeF0f0qonKJuh8ej23h2DWNRZgTSBNScxkdiqIhtMqghnp4T6fq E6J1LbWUZhs0wndSomqJekqwCGUxzeyyJ89VmNEHGFT+S9gwg+7PiUATxO+6HByUy9fB Lcnvf6cBVGo2ua6IMkdrD7RNCq8MNnEeBxFzBEW/x3OP3YqxFgY23NstPw2TByW1kcCT rqMCTuEd4nXzKhW0+FwJQCxlvlJmMo9wfLE/ZNxdGSICKZwwcdn0kIBAIEu1JwgXViG9 SEVgPryGlDTh9bFF3Mk7EuWtY/mz0qMriZhEeSAW5G0/Ms3hJJ7m9P6d+AyXaQf2THhO g+bw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781819; x=1710386619; 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=5r8V+dWA3RVhS5vfjxAmsItqAa6Frdq+W5yFoj18eJ8=; b=dMeFkKPLoXN2CSJxDFq5GwxBnS2pzywQhrOy+ThQh1JKuxvRiOIApqwyp+eSLUdQi+ zPWJzR4I+lCwM4GjB3JOV/Aq/L7kktpm/XFJ+FCDlHWei6ji2xqWidZU+jmZD5zMIqYo hyPautFxBHTt1Q6RGf0i4lEpXn1rWd4qWHNjfsrrJNBA4nLsFPM6H5Nhtr7zqhfG0mKI 6sZWZXz9UkpV6Cnf4QlbK9Zmq2kAPtPWXlD/bMc9M2ycRM35mIuuGby1nCdwmhqyYAXc pPH1H/1Al4rzI6lJEln2czL6dOm+bG5MgsOED97CyFF5sYa4IOO1x+80/Z2dvfG3JPEf Cz/g== X-Gm-Message-State: AOJu0Yw3+kIhvwFZKSXfWR3/Sv+Kx0oq6BFBvBrnpTNRJ+AG7P0cN3RD UUQk8UkhIPcxAuqThFxISd7ZnwniCE+7X99Stz/iM9Q1bAmwfziy7r/FoqJ4JAI= X-Google-Smtp-Source: AGHT+IGKqaar5XrSt6zDPlLGkQx78csZj8zjHpFDaQH1HXeQhfGT/cFkqzjUxN+ry+WjWb5BzbbQyQ== X-Received: by 2002:a6b:c94f:0:b0:7c8:45d4:6313 with SMTP id z76-20020a6bc94f000000b007c845d46313mr11474318iof.10.1709781818787; Wed, 06 Mar 2024 19:23:38 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:37 -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 7/9] Hexagon (target/hexagon) Remove gen_op_regs.py Date: Wed, 6 Mar 2024 20:23:25 -0700 Message-Id: <20240307032327.4799-8-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=ltaylorsimpson@gmail.com; helo=mail-io1-xd2b.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, WEIRD_QUOTING=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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain --- target/hexagon/README | 1 - target/hexagon/gen_op_regs.py | 125 ---------------------------------- target/hexagon/meson.build | 14 +--- 3 files changed, 2 insertions(+), 138 deletions(-) delete mode 100755 target/hexagon/gen_op_regs.py diff --git a/target/hexagon/README b/target/hexagon/README index 746ebec378..065c05154d 100644 --- a/target/hexagon/README +++ b/target/hexagon/README @@ -43,7 +43,6 @@ target/hexagon/gen_semantics.c. This step produces That file is consumed by the following python scripts to produce the indicated header files in /target/hexagon gen_opcodes_def.py -> opcodes_def_generated.h.inc - gen_op_regs.py -> op_regs_generated.h.inc gen_printinsn.py -> printinsn_generated.h.inc gen_op_attribs.py -> op_attribs_generated.h.inc gen_helper_protos.py -> helper_protos_generated.h.inc diff --git a/target/hexagon/gen_op_regs.py b/target/hexagon/gen_op_regs.py deleted file mode 100755 index 7b7b33895a..0000000000 --- a/target/hexagon/gen_op_regs.py +++ /dev/null @@ -1,125 +0,0 @@ -#!/usr/bin/env python3 - -## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. -## -## 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 - - -## -## Generate the register and immediate operands for each instruction -## -def calculate_regid_reg(tag): - def letter_inc(x): - return chr(ord(x) + 1) - - ordered_implregs = ["SP", "FP", "LR"] - srcdst_lett = "X" - src_lett = "S" - dst_lett = "D" - retstr = "" - mapdict = {} - for reg in ordered_implregs: - reg_rd = 0 - reg_wr = 0 - if ("A_IMPLICIT_WRITES_" + reg) in hex_common.attribdict[tag]: - reg_wr = 1 - if reg_rd and reg_wr: - retstr += srcdst_lett - mapdict[srcdst_lett] = reg - srcdst_lett = letter_inc(srcdst_lett) - elif reg_rd: - retstr += src_lett - mapdict[src_lett] = reg - src_lett = letter_inc(src_lett) - elif reg_wr: - retstr += dst_lett - mapdict[dst_lett] = reg - dst_lett = letter_inc(dst_lett) - return retstr, mapdict - - -def calculate_regid_letters(tag): - retstr, mapdict = calculate_regid_reg(tag) - return retstr - - -def strip_reg_prefix(x): - y = x.replace("UREG.", "") - y = y.replace("MREG.", "") - return y.replace("GREG.", "") - - -def main(): - hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) - hex_common.init_registers() - tagregs = hex_common.get_tagregs(full=True) - tagimms = hex_common.get_tagimms() - - with open(sys.argv[3], "w") as f: - for tag in hex_common.tags: - regs = tagregs[tag] - rregs = [] - wregs = [] - regids = "" - for regtype, regid, _, numregs in regs: - reg = hex_common.get_register(tag, regtype, regid) - if reg.is_read(): - if regid[0] not in regids: - regids += regid[0] - rregs.append(regtype + regid + numregs) - if reg.is_written(): - wregs.append(regtype + regid + numregs) - if regid[0] not in regids: - regids += regid[0] - for attrib in hex_common.attribdict[tag]: - if hex_common.attribinfo[attrib]["rreg"]: - rregs.append(strip_reg_prefix(attribinfo[attrib]["rreg"])) - if hex_common.attribinfo[attrib]["wreg"]: - wregs.append(strip_reg_prefix(attribinfo[attrib]["wreg"])) - regids += calculate_regid_letters(tag) - f.write( - f'REGINFO({tag},"{regids}",\t/*RD:*/\t"{",".join(rregs)}",' - f'\t/*WR:*/\t"{",".join(wregs)}")\n' - ) - - for tag in hex_common.tags: - imms = tagimms[tag] - f.write(f"IMMINFO({tag}") - if not imms: - f.write(""",'u',0,0,'U',0,0""") - for sign, size, shamt in imms: - if sign == "r": - sign = "s" - if not shamt: - shamt = "0" - f.write(f""",'{sign}',{size},{shamt}""") - if len(imms) == 1: - if sign.isupper(): - myu = "u" - else: - myu = "U" - f.write(f""",'{myu}',0,0""") - f.write(")\n") - - -if __name__ == "__main__": - main() diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build index fb480afc03..b3a0944d3b 100644 --- a/target/hexagon/meson.build +++ b/target/hexagon/meson.build @@ -1,5 +1,5 @@ ## -## Copyright(c) 2020-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2020-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -45,7 +45,6 @@ hexagon_ss.add(semantics_generated) # shortcode_generated.h.inc # tcg_func_table_generated.c.inc # printinsn_generated.h.inc -# op_regs_generated.h.inc # op_attribs_generated.h.inc # opcodes_def_generated.h.inc # @@ -76,15 +75,6 @@ printinsn_generated = custom_target( ) hexagon_ss.add(printinsn_generated) -op_regs_generated = custom_target( - 'op_regs_generated.h.inc', - output: 'op_regs_generated.h.inc', - depends: [semantics_generated], - depend_files: [hex_common_py, attribs_def], - command: [python, files('gen_op_regs.py'), semantics_generated, attribs_def, '@OUTPUT@'], -) -hexagon_ss.add(op_regs_generated) - op_attribs_generated = custom_target( 'op_attribs_generated.h.inc', output: 'op_attribs_generated.h.inc', @@ -110,7 +100,7 @@ hexagon_ss.add(opcodes_def_generated) # gen_dectree_import = executable( 'gen_dectree_import', - 'gen_dectree_import.c', opcodes_def_generated, op_regs_generated, + 'gen_dectree_import.c', opcodes_def_generated, native: true, build_by_default: false) iset_py = custom_target( From patchwork Thu Mar 7 03:23:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D797C5475B for ; Thu, 7 Mar 2024 03:25:31 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4ME-0001UO-CU; Wed, 06 Mar 2024 22:23:46 -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 1ri4MC-0001Tm-Uf for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:45 -0500 Received: from mail-io1-xd2b.google.com ([2607:f8b0:4864:20::d2b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4MA-0005lD-7X for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:44 -0500 Received: by mail-io1-xd2b.google.com with SMTP id ca18e2360f4ac-7c8773a9599so15585139f.0 for ; Wed, 06 Mar 2024 19:23:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781820; x=1710386620; 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=2kAEgIdBp6Ue1btIM+Uj1VoaSgxC8giYiH5Kmbwpsfk=; b=cyPfGzXavmN2LsqNm0HomWcTyPazEM18FEX3+uzVXVLiAMpHgRJYxwTGZwhBvdCvqz JB7fl+I2JgyVDcTVVgKh17vdMH9LwZKcK3FVJ+q6C+qqY0rne72A+NsvooPEj/9+UFAq OUeqcw+R2cCgzizITNoWQfbBexK5xgTNEMmk6qs2XZh4TEHOTGFL/b2A9InpVy3wsal2 /ZIKVmO9j6Y728tz+TnYjqSc+/ArvhFedUTdHtqlcqzgCc11ZMzQPvv/B5gQg4p/Dkjj MBgzjo59xRl6hOrrvUEHPj0inzBzm4GGQc1Ww9tVM9TuO0rKBkyuHVHUnzQzauqe94Rh tJUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781820; x=1710386620; 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=2kAEgIdBp6Ue1btIM+Uj1VoaSgxC8giYiH5Kmbwpsfk=; b=N+BpgopYudfWy4NGqaIep2FvHb5d4F+OivEIL7cCkDX/0u4cE2VnaX8bK0gTW96vGn PibgRRrlLBmEJMukdRNI7pTO+n4Yi12k9hzC8mc4YqbqD/hgbzo/TVm/eLVGn3tqTP5c lJqhMEa0uQuFGCMSPGZ/ldSZdqO5YC5q4w7YyAMZPqfx4wyQ5xHpR2GNZ/A3xhjGUFzP jJqlCZaBi7hxdAflAG3sz+u2CZqtl18PHZq7JMxispEhcNACXxONbADHN7OSFFfYsYGL qaw1xLHDp/Oe970xiGvOsLxqBnaZaulV0mzBMD+sNPR6R4uxGeniQ9omwok3336g3tXf KHqw== X-Gm-Message-State: AOJu0YwEbobrs+BrA7FufhBHD6Yp4Bf7aF5ENlnpvh++/oB6v5BZvB49 VrLOoxDRXi9oYHVv0iTmWbMM+dHp37R2Dt/rP5F2upMqBdzSUkuSbjP1wd0tmgQ= X-Google-Smtp-Source: AGHT+IHIT2T4ZZKYpTAA7Wdp5OaYrH7yq6hRAa/ziZwQR33SvCttjkGp5NpYH2MCxrsEj+9vKsk9Zg== X-Received: by 2002:a5e:a50e:0:b0:7c8:3c53:1e42 with SMTP id 14-20020a5ea50e000000b007c83c531e42mr14403007iog.14.1709781820258; Wed, 06 Mar 2024 19:23:40 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:39 -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 8/9] Hexagon (target/hexagon) Remove gen_shortcode.py Date: Wed, 6 Mar 2024 20:23:26 -0700 Message-Id: <20240307032327.4799-9-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d2b; envelope-from=ltaylorsimpson@gmail.com; helo=mail-io1-xd2b.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org This data structure is not used Signed-off-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Brian Cain --- target/hexagon/opcodes.c | 7 ---- target/hexagon/README | 1 - target/hexagon/gen_shortcode.py | 63 --------------------------------- target/hexagon/meson.build | 10 ------ 4 files changed, 81 deletions(-) delete mode 100755 target/hexagon/gen_shortcode.py diff --git a/target/hexagon/opcodes.c b/target/hexagon/opcodes.c index 02ae9cf787..c8bde2f9e9 100644 --- a/target/hexagon/opcodes.c +++ b/target/hexagon/opcodes.c @@ -37,13 +37,6 @@ const char * const opcode_names[] = { }; -const char * const opcode_short_semantics[] = { -#define DEF_SHORTCODE(TAG, SHORTCODE) [TAG] = #SHORTCODE, -#include "shortcode_generated.h.inc" -#undef DEF_SHORTCODE - NULL -}; - DECLARE_BITMAP(opcode_attribs[XX_LAST_OPCODE], A_ZZ_LASTATTRIB); static void init_attribs(int tag, ...) diff --git a/target/hexagon/README b/target/hexagon/README index 065c05154d..65b4fcc0fa 100644 --- a/target/hexagon/README +++ b/target/hexagon/README @@ -46,7 +46,6 @@ header files in /target/hexagon gen_printinsn.py -> printinsn_generated.h.inc gen_op_attribs.py -> op_attribs_generated.h.inc gen_helper_protos.py -> helper_protos_generated.h.inc - gen_shortcode.py -> shortcode_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 diff --git a/target/hexagon/gen_shortcode.py b/target/hexagon/gen_shortcode.py deleted file mode 100755 index deb94446c4..0000000000 --- a/target/hexagon/gen_shortcode.py +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env python3 - -## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. -## -## 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 - - -def gen_shortcode(f, tag): - f.write(f"DEF_SHORTCODE({tag}, {hex_common.semdict[tag]})\n") - - -def main(): - hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) - hex_common.calculate_attribs() - tagregs = hex_common.get_tagregs() - tagimms = hex_common.get_tagimms() - - with open(sys.argv[3], "w") as f: - f.write("#ifndef DEF_SHORTCODE\n") - f.write("#define DEF_SHORTCODE(TAG,SHORTCODE) /* Nothing */\n") - f.write("#endif\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 == "Y6_diag": - continue - if tag == "Y6_diag0": - continue - if tag == "Y6_diag1": - continue - - gen_shortcode(f, tag) - - f.write("#undef DEF_SHORTCODE\n") - - -if __name__ == "__main__": - main() diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build index b3a0944d3b..988e7489ba 100644 --- a/target/hexagon/meson.build +++ b/target/hexagon/meson.build @@ -42,21 +42,11 @@ hexagon_ss.add(semantics_generated) # # Step 2 # We use Python scripts to generate the following files -# shortcode_generated.h.inc # tcg_func_table_generated.c.inc # printinsn_generated.h.inc # op_attribs_generated.h.inc # opcodes_def_generated.h.inc # -shortcode_generated = custom_target( - 'shortcode_generated.h.inc', - output: 'shortcode_generated.h.inc', - depends: [semantics_generated], - depend_files: [hex_common_py, attribs_def], - command: [python, files('gen_shortcode.py'), semantics_generated, attribs_def, '@OUTPUT@'], -) -hexagon_ss.add(shortcode_generated) - tcg_func_table_generated = custom_target( 'tcg_func_table_generated.c.inc', output: 'tcg_func_table_generated.c.inc', From patchwork Thu Mar 7 03:23:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13585019 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id BA714C54E58 for ; Thu, 7 Mar 2024 03:24:18 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ri4MG-0001Us-47; Wed, 06 Mar 2024 22:23:48 -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 1ri4ME-0001Ue-Ts for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:46 -0500 Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1ri4MB-0005lR-Gl for qemu-devel@nongnu.org; Wed, 06 Mar 2024 22:23:46 -0500 Received: by mail-io1-xd31.google.com with SMTP id ca18e2360f4ac-7c83fb0fa01so15914239f.1 for ; Wed, 06 Mar 2024 19:23:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1709781822; x=1710386622; 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=2mZF31pVOsPdanhM75ZSyb+FCM6gHs0R2hRgmZ/lF6E=; b=RBG5bhX/XA1TVkZc0noXV29i1RNH1tiVgYEwpxdZ/c9QXmUG5+w2Wf5A5Oyc+bEI2m z7VPcGMLoCPjFFCwKVHLjXKLtLqGsPz/hCeBBK+BghgxGi/vMxXy3k9SWv/LwfkzGZ/V aEzQR37+N+jryawcRpha2uVFo/GGSI91gK3s7EUT+kxHru1qR5v5l0IwTWftiXacZ+0w DMm/BOowogU2uwM1y2CFTgmPB1BbRUbGd4FQbzE6tC2F37MS/xzPw3US3MHGSyJmHSAL q/IL/H3EUEqIFI22sOrjH6FWnIByZppFBc7AjyXeZDjgO//hy5GVq4FZ/WFhlgjm0dTS GKfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1709781822; x=1710386622; 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=2mZF31pVOsPdanhM75ZSyb+FCM6gHs0R2hRgmZ/lF6E=; b=j8MOOmn8x8gAMAow/W4e/UAZqZVaF4/z564MSLewEoQPFfk7BUzpqm+YDHXtUh/x1U NRfvrHjm5cS7L/BpeGKU+29wmHPCtM5YYthk1L1394gEbI/qRgLR32uaA6+GcZuxOnNj zNr/zTHVlVPiFRBJEKRsyP7wyEMReesfpUCY+TxaMKvYGbkvoswBTgCwWHHUNBs/DfUj t2/ZXqjcsAMPPrR/FnlqGpPig/oHtl6AzWhEAlj+xVFde6hh5m6A9ntMe6zEzSi9i9R9 4RdDSKShOp2vmR78Uvto5e2SKVqtBaa9J6YsvKJUgvldVehIEPBTrL4e5JRjIusScalM 44qA== X-Gm-Message-State: AOJu0YwaQMonkypItwHG3mNssVkEFs8eK40REAb4yIwqEGRu8gJZQrSH 9EtONVKJP77b459vXxIIMNQ5Erk/Kxn9xrqZGUYsJqjnvt5ZNejiL/tsWnyJ7Ns= X-Google-Smtp-Source: AGHT+IG5Uvp6TK1WMriFXsCmn/81LHkatybrIYhzmbTUwWCSm7kr2s9/FC686CPPSl8Hkr0WbvBvoA== X-Received: by 2002:a6b:e204:0:b0:7c8:7d11:9d99 with SMTP id z4-20020a6be204000000b007c87d119d99mr2859496ioc.19.1709781821966; Wed, 06 Mar 2024 19:23:41 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-73-169-12-54.hsd1.co.comcast.net. [73.169.12.54]) by smtp.gmail.com with ESMTPSA id h20-20020a02c734000000b00474e9a77424sm2233990jao.147.2024.03.06.19.23.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 06 Mar 2024 19:23:40 -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 9/9] Hexagon (target/hexagon) Remove hex_common.read_attribs_file Date: Wed, 6 Mar 2024 20:23:27 -0700 Message-Id: <20240307032327.4799-10-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240307032327.4799-1-ltaylorsimpson@gmail.com> References: <20240307032327.4799-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::d31; envelope-from=ltaylorsimpson@gmail.com; helo=mail-io1-xd31.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+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org The attribinfo data structure is not used Adjust the command-line arguments to the python scripts Add hex_common.read_common_files for TCG/helper generation scripts Signed-off-by: Taylor Simpson Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Brian Cain --- target/hexagon/gen_analyze_funcs.py | 21 ++------------- target/hexagon/gen_helper_funcs.py | 21 ++------------- target/hexagon/gen_helper_protos.py | 21 ++------------- target/hexagon/gen_idef_parser_funcs.py | 5 ++-- target/hexagon/gen_op_attribs.py | 5 ++-- target/hexagon/gen_opcodes_def.py | 4 +-- target/hexagon/gen_printinsn.py | 5 ++-- target/hexagon/gen_tcg_func_table.py | 5 ++-- target/hexagon/gen_tcg_funcs.py | 21 ++------------- target/hexagon/hex_common.py | 35 +++++++++++++++---------- target/hexagon/meson.build | 31 +++++++++++----------- 11 files changed, 54 insertions(+), 120 deletions(-) diff --git a/target/hexagon/gen_analyze_funcs.py b/target/hexagon/gen_analyze_funcs.py index a9af666cef..b73b4e2349 100755 --- a/target/hexagon/gen_analyze_funcs.py +++ b/target/hexagon/gen_analyze_funcs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2022-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2022-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -67,24 +67,7 @@ def gen_analyze_func(f, tag, regs, imms): def main(): - hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) - hex_common.read_overrides_file(sys.argv[3]) - hex_common.read_overrides_file(sys.argv[4]) - ## Whether or not idef-parser is enabled is - ## determined by the number of arguments to - ## this script: - ## - ## 5 args. -> not enabled, - ## 6 args. -> idef-parser enabled. - ## - ## The 6:th arg. then holds a list of the successfully - ## parsed instructions. - is_idef_parser_enabled = len(sys.argv) > 6 - if is_idef_parser_enabled: - hex_common.read_idef_parser_enabled_file(sys.argv[5]) - hex_common.calculate_attribs() - hex_common.init_registers() + hex_common.read_common_files() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() diff --git a/target/hexagon/gen_helper_funcs.py b/target/hexagon/gen_helper_funcs.py index 9cc3d69c49..e9685bff2f 100755 --- a/target/hexagon/gen_helper_funcs.py +++ b/target/hexagon/gen_helper_funcs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -102,24 +102,7 @@ def gen_helper_function(f, tag, tagregs, tagimms): def main(): - hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) - hex_common.read_overrides_file(sys.argv[3]) - hex_common.read_overrides_file(sys.argv[4]) - ## Whether or not idef-parser is enabled is - ## determined by the number of arguments to - ## this script: - ## - ## 5 args. -> not enabled, - ## 6 args. -> idef-parser enabled. - ## - ## The 6:th arg. then holds a list of the successfully - ## parsed instructions. - is_idef_parser_enabled = len(sys.argv) > 6 - if is_idef_parser_enabled: - hex_common.read_idef_parser_enabled_file(sys.argv[5]) - hex_common.calculate_attribs() - hex_common.init_registers() + hex_common.read_common_files() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() diff --git a/target/hexagon/gen_helper_protos.py b/target/hexagon/gen_helper_protos.py index c82b0f54e4..4cc72a1581 100755 --- a/target/hexagon/gen_helper_protos.py +++ b/target/hexagon/gen_helper_protos.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -44,24 +44,7 @@ def gen_helper_prototype(f, tag, tagregs, tagimms): def main(): - hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) - hex_common.read_overrides_file(sys.argv[3]) - hex_common.read_overrides_file(sys.argv[4]) - ## Whether or not idef-parser is enabled is - ## determined by the number of arguments to - ## this script: - ## - ## 5 args. -> not enabled, - ## 6 args. -> idef-parser enabled. - ## - ## The 6:th arg. then holds a list of the successfully - ## parsed instructions. - is_idef_parser_enabled = len(sys.argv) > 6 - if is_idef_parser_enabled: - hex_common.read_idef_parser_enabled_file(sys.argv[5]) - hex_common.calculate_attribs() - hex_common.init_registers() + hex_common.read_common_files() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() diff --git a/target/hexagon/gen_idef_parser_funcs.py b/target/hexagon/gen_idef_parser_funcs.py index 550a48cb7b..eb494abba8 100644 --- a/target/hexagon/gen_idef_parser_funcs.py +++ b/target/hexagon/gen_idef_parser_funcs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 rev.ng Labs Srl. All Rights Reserved. +## Copyright(c) 2019-2024 rev.ng Labs Srl. All Rights Reserved. ## ## 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 @@ -44,13 +44,12 @@ ## def main(): hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) hex_common.calculate_attribs() hex_common.init_registers() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() - with open(sys.argv[3], "w") as f: + with open(sys.argv[-1], "w") as f: f.write('#include "macros.inc"\n\n') for tag in hex_common.tags: diff --git a/target/hexagon/gen_op_attribs.py b/target/hexagon/gen_op_attribs.py index 41074b8573..99448220da 100755 --- a/target/hexagon/gen_op_attribs.py +++ b/target/hexagon/gen_op_attribs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -25,13 +25,12 @@ def main(): hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) hex_common.calculate_attribs() ## ## Generate all the attributes associated with each instruction ## - with open(sys.argv[3], "w") as f: + with open(sys.argv[-1], "w") as f: for tag in hex_common.tags: f.write( f"OP_ATTRIB({tag},ATTRIBS(" diff --git a/target/hexagon/gen_opcodes_def.py b/target/hexagon/gen_opcodes_def.py index cddd868fe3..536f0eb68a 100755 --- a/target/hexagon/gen_opcodes_def.py +++ b/target/hexagon/gen_opcodes_def.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -29,7 +29,7 @@ def main(): ## ## Generate a list of all the opcodes ## - with open(sys.argv[3], "w") as f: + with open(sys.argv[-1], "w") as f: for tag in hex_common.tags: f.write(f"OPCODE({tag}),\n") diff --git a/target/hexagon/gen_printinsn.py b/target/hexagon/gen_printinsn.py index e570bd7c6a..8bf4d0985c 100755 --- a/target/hexagon/gen_printinsn.py +++ b/target/hexagon/gen_printinsn.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -97,11 +97,10 @@ def spacify(s): def main(): hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) immext_casere = re.compile(r"IMMEXT\(([A-Za-z])") - with open(sys.argv[3], "w") as f: + with open(sys.argv[-1], "w") as f: for tag in hex_common.tags: if not hex_common.behdict[tag]: continue diff --git a/target/hexagon/gen_tcg_func_table.py b/target/hexagon/gen_tcg_func_table.py index f998ef0992..978ac1819b 100755 --- a/target/hexagon/gen_tcg_func_table.py +++ b/target/hexagon/gen_tcg_func_table.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -25,12 +25,11 @@ def main(): hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) hex_common.calculate_attribs() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() - with open(sys.argv[3], "w") as f: + with open(sys.argv[-1], "w") as f: f.write("#ifndef HEXAGON_FUNC_TABLE_H\n") f.write("#define HEXAGON_FUNC_TABLE_H\n\n") diff --git a/target/hexagon/gen_tcg_funcs.py b/target/hexagon/gen_tcg_funcs.py index 3d8e3cb6a2..05aa0a7855 100755 --- a/target/hexagon/gen_tcg_funcs.py +++ b/target/hexagon/gen_tcg_funcs.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 ## -## Copyright(c) 2019-2023 Qualcomm Innovation Center, Inc. All Rights Reserved. +## Copyright(c) 2019-2024 Qualcomm Innovation Center, Inc. All Rights Reserved. ## ## 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 @@ -108,24 +108,7 @@ def gen_def_tcg_func(f, tag, tagregs, tagimms): def main(): - hex_common.read_semantics_file(sys.argv[1]) - hex_common.read_attribs_file(sys.argv[2]) - hex_common.read_overrides_file(sys.argv[3]) - hex_common.read_overrides_file(sys.argv[4]) - hex_common.calculate_attribs() - hex_common.init_registers() - ## Whether or not idef-parser is enabled is - ## determined by the number of arguments to - ## this script: - ## - ## 5 args. -> not enabled, - ## 6 args. -> idef-parser enabled. - ## - ## The 6:th arg. then holds a list of the successfully - ## parsed instructions. - is_idef_parser_enabled = len(sys.argv) > 6 - if is_idef_parser_enabled: - hex_common.read_idef_parser_enabled_file(sys.argv[5]) + is_idef_parser_enabled = hex_common.read_common_files() tagregs = hex_common.get_tagregs() tagimms = hex_common.get_tagimms() diff --git a/target/hexagon/hex_common.py b/target/hexagon/hex_common.py index 4bacef223f..43ca78b489 100755 --- a/target/hexagon/hex_common.py +++ b/target/hexagon/hex_common.py @@ -26,7 +26,6 @@ semdict = {} # tag -> semantics attribdict = {} # tag -> attributes macros = {} # macro -> macro information... -attribinfo = {} # Register information and misc registers = {} # register -> register functions new_registers = {} tags = [] # list of all tags @@ -257,19 +256,6 @@ def read_semantics_file(name): eval_line = "" -def read_attribs_file(name): - attribre = re.compile( - r"DEF_ATTRIB\(([A-Za-z0-9_]+), ([^,]*), " - + r'"([A-Za-z0-9_\.]*)", "([A-Za-z0-9_\.]*)"\)' - ) - for line in open(name, "rt").readlines(): - if not attribre.match(line): - continue - (attrib_base, descr, rreg, wreg) = attribre.findall(line)[0] - attrib_base = "A_" + attrib_base - attribinfo[attrib_base] = {"rreg": rreg, "wreg": wreg, "descr": descr} - - def read_overrides_file(name): overridere = re.compile(r"#define fGEN_TCG_([A-Za-z0-9_]+)\(.*") for line in open(name, "rt").readlines(): @@ -1143,3 +1129,24 @@ def helper_args(tag, regs, imms): "uint32_t part1" )) return args + + +def read_common_files(): + read_semantics_file(sys.argv[1]) + read_overrides_file(sys.argv[2]) + read_overrides_file(sys.argv[3]) + ## Whether or not idef-parser is enabled is + ## determined by the number of arguments to + ## this script: + ## + ## 4 args. -> not enabled, + ## 5 args. -> idef-parser enabled. + ## + ## The 5:th arg. then holds a list of the successfully + ## parsed instructions. + is_idef_parser_enabled = len(sys.argv) > 5 + if is_idef_parser_enabled: + read_idef_parser_enabled_file(sys.argv[4]) + calculate_attribs() + init_registers() + return is_idef_parser_enabled diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build index 988e7489ba..b0b253aa6b 100644 --- a/target/hexagon/meson.build +++ b/target/hexagon/meson.build @@ -18,7 +18,6 @@ hexagon_ss = ss.source_set() hex_common_py = 'hex_common.py' -attribs_def = meson.current_source_dir() / 'attribs_def.h.inc' gen_tcg_h = meson.current_source_dir() / 'gen_tcg.h' gen_tcg_hvx_h = meson.current_source_dir() / 'gen_tcg_hvx.h' idef_parser_dir = meson.current_source_dir() / 'idef-parser' @@ -51,8 +50,8 @@ tcg_func_table_generated = custom_target( 'tcg_func_table_generated.c.inc', output: 'tcg_func_table_generated.c.inc', depends: [semantics_generated], - depend_files: [hex_common_py, attribs_def], - command: [python, files('gen_tcg_func_table.py'), semantics_generated, attribs_def, '@OUTPUT@'], + depend_files: [hex_common_py], + command: [python, files('gen_tcg_func_table.py'), semantics_generated, '@OUTPUT@'], ) hexagon_ss.add(tcg_func_table_generated) @@ -60,8 +59,8 @@ printinsn_generated = custom_target( 'printinsn_generated.h.inc', output: 'printinsn_generated.h.inc', depends: [semantics_generated], - depend_files: [hex_common_py, attribs_def], - command: [python, files('gen_printinsn.py'), semantics_generated, attribs_def, '@OUTPUT@'], + depend_files: [hex_common_py], + command: [python, files('gen_printinsn.py'), semantics_generated, '@OUTPUT@'], ) hexagon_ss.add(printinsn_generated) @@ -69,8 +68,8 @@ op_attribs_generated = custom_target( 'op_attribs_generated.h.inc', output: 'op_attribs_generated.h.inc', depends: [semantics_generated], - depend_files: [hex_common_py, attribs_def], - command: [python, files('gen_op_attribs.py'), semantics_generated, attribs_def, '@OUTPUT@'], + depend_files: [hex_common_py], + command: [python, files('gen_op_attribs.py'), semantics_generated, '@OUTPUT@'], ) hexagon_ss.add(op_attribs_generated) @@ -78,8 +77,8 @@ opcodes_def_generated = custom_target( 'opcodes_def_generated.h.inc', output: 'opcodes_def_generated.h.inc', depends: [semantics_generated], - depend_files: [hex_common_py, attribs_def], - command: [python, files('gen_opcodes_def.py'), semantics_generated, attribs_def, '@OUTPUT@'], + depend_files: [hex_common_py], + command: [python, files('gen_opcodes_def.py'), semantics_generated, '@OUTPUT@'], ) hexagon_ss.add(opcodes_def_generated) @@ -278,7 +277,7 @@ if idef_parser_enabled and 'hexagon-linux-user' in target_dirs output: 'idef_parser_input.h.inc', depends: [semantics_generated], depend_files: [hex_common_py], - command: [python, files('gen_idef_parser_funcs.py'), semantics_generated, attribs_def, '@OUTPUT@'], + command: [python, files('gen_idef_parser_funcs.py'), semantics_generated, '@OUTPUT@'], ) preprocessed_idef_parser_input_generated = custom_target( @@ -347,12 +346,12 @@ if idef_parser_enabled and 'hexagon-linux-user' in target_dirs # Setup input and dependencies for the next step, this depends on whether or # not idef-parser is enabled helper_dep = [semantics_generated, idef_generated_tcg_c, idef_generated_tcg] - helper_in = [semantics_generated, attribs_def, gen_tcg_h, gen_tcg_hvx_h, idef_generated_list] + helper_in = [semantics_generated, gen_tcg_h, gen_tcg_hvx_h, idef_generated_list] else # Setup input and dependencies for the next step, this depends on whether or # not idef-parser is enabled helper_dep = [semantics_generated] - helper_in = [semantics_generated, attribs_def, gen_tcg_h, gen_tcg_hvx_h] + helper_in = [semantics_generated, gen_tcg_h, gen_tcg_hvx_h] endif # @@ -366,7 +365,7 @@ helper_protos_generated = custom_target( 'helper_protos_generated.h.inc', output: 'helper_protos_generated.h.inc', depends: helper_dep, - depend_files: [hex_common_py, attribs_def, gen_tcg_h, gen_tcg_hvx_h], + depend_files: [hex_common_py, gen_tcg_h, gen_tcg_hvx_h], command: [python, files('gen_helper_protos.py'), helper_in, '@OUTPUT@'], ) hexagon_ss.add(helper_protos_generated) @@ -375,7 +374,7 @@ helper_funcs_generated = custom_target( 'helper_funcs_generated.c.inc', output: 'helper_funcs_generated.c.inc', depends: helper_dep, - depend_files: [hex_common_py, attribs_def, gen_tcg_h, gen_tcg_hvx_h], + depend_files: [hex_common_py, gen_tcg_h, gen_tcg_hvx_h], command: [python, files('gen_helper_funcs.py'), helper_in, '@OUTPUT@'], ) hexagon_ss.add(helper_funcs_generated) @@ -384,7 +383,7 @@ tcg_funcs_generated = custom_target( 'tcg_funcs_generated.c.inc', output: 'tcg_funcs_generated.c.inc', depends: helper_dep, - depend_files: [hex_common_py, attribs_def, gen_tcg_h, gen_tcg_hvx_h], + depend_files: [hex_common_py, gen_tcg_h, gen_tcg_hvx_h], command: [python, files('gen_tcg_funcs.py'), helper_in, '@OUTPUT@'], ) hexagon_ss.add(tcg_funcs_generated) @@ -393,7 +392,7 @@ analyze_funcs_generated = custom_target( 'analyze_funcs_generated.c.inc', output: 'analyze_funcs_generated.c.inc', depends: helper_dep, - depend_files: [hex_common_py, attribs_def, gen_tcg_h, gen_tcg_hvx_h], + depend_files: [hex_common_py, gen_tcg_h, gen_tcg_hvx_h], command: [python, files('gen_analyze_funcs.py'), helper_in, '@OUTPUT@'], ) hexagon_ss.add(analyze_funcs_generated)