From patchwork Fri Apr 21 16:49:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13220364 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 8C8A8C77B7C for ; Fri, 21 Apr 2023 16:51:55 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pptx3-0005tJ-PD; Fri, 21 Apr 2023 12:49:37 -0400 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 1pptx1-0005sS-K5 for qemu-devel@nongnu.org; Fri, 21 Apr 2023 12:49:35 -0400 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 1pptwy-00044E-Nz for qemu-devel@nongnu.org; Fri, 21 Apr 2023 12:49:35 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33LEfI3Q017719; Fri, 21 Apr 2023 16:49:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=qcppdkim1; bh=50OsvpRrBPJdukAjztDTtCcoxO+thbRN3RSNqie1GkA=; b=DpFEtUZ8BvtHKtp3EXpVuPPDDmW/LXl2jT4+86lJc3Bi6kvGshmWReOtpVHTOLSHqL2W RvWNrIw9rcYxhflx/cu9jFuuNvNdPs8x/NIdGX0Kk2eUOxs88UxuogyltfAuIuvfnOFS FbVyL+PlbANiYccsimjvhfE3CVcV3+OW7Hv6YyD3yQglmYathbRpEhmg2VWdViOZHgrV A8I1kKjAbwnRIVI1c/NuIrzl8DvfWSV5El3IbzOcOOMOZAN3wc15/1BWYiOGzHwH5hys r8LoNRDEqkdSWiT7XvluoA7lMam5MPCKEGmCcDCpEgn00OIJj1iJF/L2nwjRa9b7BzBV yw== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q3ap72fe1-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 16:49:28 +0000 Received: from pps.filterd (NALASPPMTA03.qualcomm.com [127.0.0.1]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 33LGnREB027572; Fri, 21 Apr 2023 16:49:27 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA03.qualcomm.com (PPS) with ESMTPS id 3pyn0mpn09-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 16:49:27 +0000 Received: from NALASPPMTA03.qualcomm.com (NALASPPMTA03.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33LGnRUB027562; Fri, 21 Apr 2023 16:49:27 GMT Received: from hu-devc-sd-u20-a-1.qualcomm.com (hu-tsimpson-lv.qualcomm.com [10.47.204.221]) by NALASPPMTA03.qualcomm.com (PPS) with ESMTPS id 33LGnQCQ027555 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 21 Apr 2023 16:49:27 +0000 Received: by hu-devc-sd-u20-a-1.qualcomm.com (Postfix, from userid 47164) id 2DFE96A5; Fri, 21 Apr 2023 09:49:26 -0700 (PDT) From: Taylor Simpson To: qemu-devel@nongnu.org Cc: tsimpson@quicinc.com, richard.henderson@linaro.org, philmd@linaro.org, peter.maydell@linaro.org, bcain@quicinc.com, quic_mathbern@quicinc.com, stefanha@redhat.com, ale@rev.ng, anjo@rev.ng, quic_mliebel@quicinc.com Subject: [PULL v2 09/10] Hexagon (target/hexagon) Remove unused slot variable in helpers Date: Fri, 21 Apr 2023 09:49:21 -0700 Message-Id: <20230421164922.3608183-10-tsimpson@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230421164922.3608183-1-tsimpson@quicinc.com> References: <20230421164922.3608183-1-tsimpson@quicinc.com> MIME-Version: 1.0 X-QCInternal: smtphost X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: dENCtGptrW15Y5UpdEn1UXGtv1gE6t1Z X-Proofpoint-GUID: dENCtGptrW15Y5UpdEn1UXGtv1gE6t1Z X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-21_08,2023-04-21_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 clxscore=1015 lowpriorityscore=0 phishscore=0 mlxlogscore=531 impostorscore=0 suspectscore=0 priorityscore=1501 mlxscore=0 adultscore=0 bulkscore=0 spamscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304210147 Received-SPF: pass client-ip=205.220.180.131; envelope-from=tsimpson@qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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 slot variable in helpers was only passed to log_reg_write function where the argument is unused. - Remove declaration from generated helper functions - Remove slot argument from log_reg_write Signed-off-by: Taylor Simpson Reviewed-by: Richard Henderson Message-Id: <20230407204521.357244-1-tsimpson@quicinc.com> --- target/hexagon/macros.h | 14 +++++++------- target/hexagon/op_helper.h | 2 +- target/hexagon/op_helper.c | 2 +- target/hexagon/gen_helper_funcs.py | 2 -- 4 files changed, 9 insertions(+), 11 deletions(-) diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index 21b5b5a06c..9ddfc91b1d 100644 --- a/target/hexagon/macros.h +++ b/target/hexagon/macros.h @@ -347,9 +347,9 @@ static inline TCGv gen_read_ireg(TCGv result, TCGv val, int shift) #define fREAD_LR() (env->gpr[HEX_REG_LR]) -#define fWRITE_LR(A) log_reg_write(env, HEX_REG_LR, A, slot) -#define fWRITE_FP(A) log_reg_write(env, HEX_REG_FP, A, slot) -#define fWRITE_SP(A) log_reg_write(env, HEX_REG_SP, A, slot) +#define fWRITE_LR(A) log_reg_write(env, HEX_REG_LR, A) +#define fWRITE_FP(A) log_reg_write(env, HEX_REG_FP, A) +#define fWRITE_SP(A) log_reg_write(env, HEX_REG_SP, A) #define fREAD_SP() (env->gpr[HEX_REG_SP]) #define fREAD_LC0 (env->gpr[HEX_REG_LC0]) @@ -377,13 +377,13 @@ static inline TCGv gen_read_ireg(TCGv result, TCGv val, int shift) #define fHINTJR(TARGET) { /* Not modelled in qemu */} #define fWRITE_LOOP_REGS0(START, COUNT) \ do { \ - log_reg_write(env, HEX_REG_LC0, COUNT, slot); \ - log_reg_write(env, HEX_REG_SA0, START, slot); \ + log_reg_write(env, HEX_REG_LC0, COUNT); \ + log_reg_write(env, HEX_REG_SA0, START); \ } while (0) #define fWRITE_LOOP_REGS1(START, COUNT) \ do { \ - log_reg_write(env, HEX_REG_LC1, COUNT, slot); \ - log_reg_write(env, HEX_REG_SA1, START, slot);\ + log_reg_write(env, HEX_REG_LC1, COUNT); \ + log_reg_write(env, HEX_REG_SA1, START);\ } while (0) #define fSET_OVERFLOW() SET_USR_FIELD(USR_OVF, 1) diff --git a/target/hexagon/op_helper.h b/target/hexagon/op_helper.h index 34b3a53975..db22b54401 100644 --- a/target/hexagon/op_helper.h +++ b/target/hexagon/op_helper.h @@ -27,7 +27,7 @@ uint32_t mem_load4(CPUHexagonState *env, uint32_t slot, target_ulong vaddr); uint64_t mem_load8(CPUHexagonState *env, uint32_t slot, target_ulong vaddr); void log_reg_write(CPUHexagonState *env, int rnum, - target_ulong val, uint32_t slot); + target_ulong val); void log_store64(CPUHexagonState *env, target_ulong addr, int64_t val, int width, int slot); void log_store32(CPUHexagonState *env, target_ulong addr, diff --git a/target/hexagon/op_helper.c b/target/hexagon/op_helper.c index 099c111a8c..3cc71b69d9 100644 --- a/target/hexagon/op_helper.c +++ b/target/hexagon/op_helper.c @@ -53,7 +53,7 @@ G_NORETURN void HELPER(raise_exception)(CPUHexagonState *env, uint32_t excp) } void log_reg_write(CPUHexagonState *env, int rnum, - target_ulong val, uint32_t slot) + target_ulong val) { HEX_DEBUG_LOG("log_reg_write[%d] = " TARGET_FMT_ld " (0x" TARGET_FMT_lx ")", rnum, val, val); diff --git a/target/hexagon/gen_helper_funcs.py b/target/hexagon/gen_helper_funcs.py index c4e04508f8..c73d792580 100755 --- a/target/hexagon/gen_helper_funcs.py +++ b/target/hexagon/gen_helper_funcs.py @@ -308,8 +308,6 @@ def gen_helper_function(f, tag, tagregs, tagimms): f.write(", ") f.write("uint32_t part1") f.write(")\n{\n") - if not hex_common.need_slot(tag): - f.write(" uint32_t slot __attribute__((unused)) = 4;\n") if hex_common.need_ea(tag): gen_decl_ea(f) ## Declare the return variable