From patchwork Fri Apr 7 20:45: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: 13205413 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 B9628C6FD1D for ; Fri, 7 Apr 2023 20:46:35 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pksxn-0005ro-EF; Fri, 07 Apr 2023 16:45:39 -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 1pksxi-0005r6-RJ for qemu-devel@nongnu.org; Fri, 07 Apr 2023 16:45:36 -0400 Received: from mx0a-0031df01.pphosted.com ([205.220.168.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pksxe-0004uF-TL for qemu-devel@nongnu.org; Fri, 07 Apr 2023 16:45:33 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 337KXYuW009619; Fri, 7 Apr 2023 20:45:25 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=from : to : cc : subject : date : message-id : mime-version : content-type : content-transfer-encoding; s=qcppdkim1; bh=W/erd8CBZtNGhOURkIvOv6t+x3nxJRlJnYVI1d4fXNs=; b=E6mtiFbTalDyEuxDqnQCDRc1evgLxTIgfJhwZIDcVkeyzVR5LPZOc36R2sEIBuIHYIrp +GLgM1KE8IFM47xKo/ovCjwN5J903Sgs/MBaj+FohEqi2xsn8mbpzWs1WKv/Lm47EHDq YRV6eSHzhdhH+91jMmzKZgIUN+dDnrok8ejORPhHmGehJjDmFWlEhcw8q0ONB9AzEwAW DQ7lm42opbCDhLofWVl6LiHFDepHH4qSsDMd1Xx14Olp+Nb/np5Uht2nwRyluiKr6ug0 2ccbruMuH+A+FS9FfY3YNe4K8ek53SQzPu+0HkImGnEB+/IhaESJ2C4hOxjTq7DbeYGN eA== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3pt5s9tj8d-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Apr 2023 20:45:25 +0000 Received: from pps.filterd (NALASPPMTA04.qualcomm.com [127.0.0.1]) by NALASPPMTA04.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 337KjOb7009029; Fri, 7 Apr 2023 20:45:24 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 3ppdpmdh7q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Apr 2023 20:45:24 +0000 Received: from NALASPPMTA04.qualcomm.com (NALASPPMTA04.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 337KjOZX009024; Fri, 7 Apr 2023 20:45:24 GMT Received: from hu-devc-sd-u20-a-1.qualcomm.com (hu-tsimpson-lv.qualcomm.com [10.47.204.221]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 337KjN5S009023 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Apr 2023 20:45:24 +0000 Received: by hu-devc-sd-u20-a-1.qualcomm.com (Postfix, from userid 47164) id A66BA586; Fri, 7 Apr 2023 13:45:23 -0700 (PDT) From: Taylor Simpson To: qemu-devel@nongnu.org Cc: tsimpson@quicinc.com, richard.henderson@linaro.org, philmd@linaro.org, ale@rev.ng, anjo@rev.ng, bcain@quicinc.com, quic_mathbern@quicinc.com Subject: [PATCH] Hexagon (target/hexagon) Remove unused slot variable in helpers Date: Fri, 7 Apr 2023 13:45:21 -0700 Message-Id: <20230407204521.357244-1-tsimpson@quicinc.com> X-Mailer: git-send-email 2.25.1 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-GUID: uYVu4SgmsbkMY9JI20okE74ukpDt_ZG6 X-Proofpoint-ORIG-GUID: uYVu4SgmsbkMY9JI20okE74ukpDt_ZG6 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-07_13,2023-04-06_03,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 bulkscore=0 adultscore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 mlxlogscore=474 priorityscore=1501 clxscore=1015 spamscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304070187 Received-SPF: pass client-ip=205.220.168.131; envelope-from=tsimpson@qualcomm.com; helo=mx0a-0031df01.pphosted.com X-Spam_score_int: -24 X-Spam_score: -2.5 X-Spam_bar: -- X-Spam_report: (-2.5 / 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, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+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 --- target/hexagon/macros.h | 2 +- target/hexagon/op_helper.h | 2 +- target/hexagon/op_helper.c | 2 +- target/hexagon/gen_helper_funcs.py | 2 -- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/target/hexagon/macros.h b/target/hexagon/macros.h index 482a9c787f..b978fd1840 100644 --- a/target/hexagon/macros.h +++ b/target/hexagon/macros.h @@ -28,7 +28,7 @@ #define READ_REG(NUM) (env->gpr[(NUM)]) #define READ_PREG(NUM) (env->pred[NUM]) -#define WRITE_RREG(NUM, VAL) log_reg_write(env, NUM, VAL, slot) +#define WRITE_RREG(NUM, VAL) log_reg_write(env, NUM, VAL) #define WRITE_PREG(NUM, VAL) log_pred_write(env, NUM, VAL) #endif 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 c9a156030e..63a5b9b202 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 7a224b66e6..6edd82c423 100755 --- a/target/hexagon/gen_helper_funcs.py +++ b/target/hexagon/gen_helper_funcs.py @@ -265,8 +265,6 @@ def gen_helper_function(f, tag, tagregs, tagimms): if i > 0: 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 i=0