From patchwork Thu Apr 20 03:26:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Taylor Simpson X-Patchwork-Id: 13217820 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 9FE6DC77B73 for ; Thu, 20 Apr 2023 03:29:33 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppKws-0003hB-Av; Wed, 19 Apr 2023 23:27:06 -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 1ppKwl-0003g0-5p for qemu-devel@nongnu.org; Wed, 19 Apr 2023 23:26:59 -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 1ppKwh-0000Io-AL for qemu-devel@nongnu.org; Wed, 19 Apr 2023 23:26:58 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33K37evo013870; Thu, 20 Apr 2023 03:26:49 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=dquF7gRGzhE5q8kic1aMnWzgS9I4VVucTlpXLV4iNmkP7flm70JnbadDxR6e+9VsF+Yx +wYYFZBpDQbqVz3M7WjQwg18MVwnXE7QfXqlsggVDy8orT4mbCh+3oiWVD5TfU5mB8qG EKrY8kCFirH4HrBDi68HP5PtvZ9Intx1v9AqOna7SpnsWDWNGdazQ7Tdjw47ilTFZtk7 L6DRlpJLHD5rM5eI7tTfNR4ZQygoFWBvjG+ucYCPht269kNpUnRN4zmLn4qZC/BQkBD0 XhvbyeMCbkkbfr9Z7z26Rdzk3405F8MpnF2MWvTZleVAKtGuy4NqzXbs9vTtnWQ5DdRr 8A== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3q2p520t7k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Apr 2023 03:26:49 +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 33K3QmY3006594; Thu, 20 Apr 2023 03:26:48 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA03.qualcomm.com (PPS) with ESMTPS id 3pyn0mbucn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Apr 2023 03:26:48 +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 33K3Qm3S006580; Thu, 20 Apr 2023 03:26:48 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 33K3Ql4f006569 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 20 Apr 2023 03:26:48 +0000 Received: by hu-devc-sd-u20-a-1.qualcomm.com (Postfix, from userid 47164) id 1165F6A2; Wed, 19 Apr 2023 20:26:47 -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 09/11] Hexagon (target/hexagon) Remove unused slot variable in helpers Date: Wed, 19 Apr 2023 20:26:32 -0700 Message-Id: <20230420032634.105311-10-tsimpson@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230420032634.105311-1-tsimpson@quicinc.com> References: <20230420032634.105311-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: 9TZ_cMq1q4hl4T6B4OSDmj7ELk6Dp3Nz X-Proofpoint-GUID: 9TZ_cMq1q4hl4T6B4OSDmj7ELk6Dp3Nz 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-19_16,2023-04-18_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxscore=0 bulkscore=0 spamscore=0 clxscore=1015 impostorscore=0 suspectscore=0 phishscore=0 adultscore=0 mlxlogscore=531 malwarescore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304200025 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