From patchwork Tue May 23 20:36:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matheus Tavares Bernardino X-Patchwork-Id: 1785425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=HBJfW4Cm; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QQmN55SkKz20Q6 for ; Wed, 24 May 2023 06:37:41 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1YkI-0000Mh-0D; Tue, 23 May 2023 16:36:38 -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 1q1YkF-0000Ll-VG for qemu-devel@nongnu.org; Tue, 23 May 2023 16:36:35 -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 1q1YkE-0005UG-8B for qemu-devel@nongnu.org; Tue, 23 May 2023 16:36:35 -0400 Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34NK84Ru022046 for ; Tue, 23 May 2023 20:36:31 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-transfer-encoding; s=qcppdkim1; bh=6gYIsrxnpEoDRMWGSCaHoMZzNttFGJ3YmoA0FetGEbo=; b=HBJfW4CmurMoOGBK7LAqJF+G+FBBnYmrdcxish/SqgBy4aIeXNiVL6rA1I2h1sitBauV zJ8pb6y/o9TvW6KVZj2UexIkhLC9WepntPaM1BtvY75by1ttbwZ5E0g8W5nDKN+1o5v6 QY/GJmNauVr3PXqHE8g4AG1bhVqiBjC4eXC1ZDIrUpy1MPxS6YOnPzmqRPio+Tl77bH5 ifnQR7AHYXid1YBeUDHZAKpesrFLM8Eyb+A/O6dbNt/EjMdGKhXHn4sEYvRfDBTQkyst 2aKy6Y8ROPSuvUsCvoPEWyIegXh70OrqQZQMFj3UifvdY9Kq/8bC78xdGKbSJIQFD39s Jg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qrpmm2d8q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 May 2023 20:36:31 +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 34NKXe6A021350 for ; Tue, 23 May 2023 20:36:30 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 3qpq9kujbe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 May 2023 20:36:30 +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 34NKaULT025391 for ; Tue, 23 May 2023 20:36:30 GMT Received: from hu-devc-sd-u20-a-1.qualcomm.com (hu-mathbern-lv.qualcomm.com [10.47.235.147]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 34NKaSIl025383 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 20:36:30 +0000 Received: by hu-devc-sd-u20-a-1.qualcomm.com (Postfix, from userid 4229910) id AFC807425; Tue, 23 May 2023 17:36:28 -0300 (-03) From: Matheus Tavares Bernardino To: qemu-devel@nongnu.org Cc: tsimpson@quicinc.com, bcain@quicinc.com, quic_mliebel@quicinc.com Subject: [PATCH 1/2] target/hexagon/*.py: remove undef vars from bad_register() Date: Tue, 23 May 2023 17:36:26 -0300 Message-Id: X-Mailer: git-send-email 2.37.2 In-Reply-To: References: 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: IqhbyTWxXjZOQPOHcQLxHLrY-_iONf7K X-Proofpoint-GUID: IqhbyTWxXjZOQPOHcQLxHLrY-_iONf7K X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-23_13,2023-05-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 clxscore=1015 mlxscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 bulkscore=0 adultscore=0 mlxlogscore=642 spamscore=0 malwarescore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305230164 Received-SPF: pass client-ip=205.220.168.131; envelope-from=mathbern@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.249, RCVD_IN_DNSWL_LOW=-0.7, 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some calls to `hex_common.bad_register()` in Hexagon python files are passing undefined variables. Let's remove those. Signed-off-by: Matheus Tavares Bernardino --- target/hexagon/gen_helper_funcs.py | 8 ++++---- target/hexagon/gen_tcg_funcs.py | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/hexagon/gen_helper_funcs.py b/target/hexagon/gen_helper_funcs.py index e80550f94e..367d08aceb 100755 --- a/target/hexagon/gen_helper_funcs.py +++ b/target/hexagon/gen_helper_funcs.py @@ -87,9 +87,9 @@ def gen_helper_arg_opn(f, regtype, regid, i, tag): elif hex_common.is_new_val(regtype, regid, tag): gen_helper_arg_new(f, regtype, regid, i) else: - hex_common.bad_register(regtype, regid, toss, numregs) + hex_common.bad_register(regtype, regid) else: - hex_common.bad_register(regtype, regid, toss, numregs) + hex_common.bad_register(regtype, regid) def gen_helper_arg_imm(f, immlett): @@ -135,7 +135,7 @@ def gen_helper_dest_decl_opn(f, regtype, regid, i): else: gen_helper_dest_decl(f, regtype, regid, i) else: - hex_common.bad_register(regtype, regid, toss, numregs) + hex_common.bad_register(regtype, regid) def gen_helper_src_var_ext(f, regtype, regid): @@ -185,7 +185,7 @@ def gen_helper_return_opn(f, regtype, regid, i): else: gen_helper_return(f, regtype, regid, i) else: - hex_common.bad_register(regtype, regid, toss, numregs) + hex_common.bad_register(regtype, regid) ## diff --git a/target/hexagon/gen_tcg_funcs.py b/target/hexagon/gen_tcg_funcs.py index c73467b840..c87ea856f7 100755 --- a/target/hexagon/gen_tcg_funcs.py +++ b/target/hexagon/gen_tcg_funcs.py @@ -354,9 +354,9 @@ def genptr_src_read_opn(f, regtype, regid, tag): elif hex_common.is_new_val(regtype, regid, tag): genptr_src_read_new(f, regtype, regid) else: - hex_common.bad_register(regtype, regid, toss, numregs) + hex_common.bad_register(regtype, regid) else: - hex_common.bad_register(regtype, regid, toss, numregs) + hex_common.bad_register(regtype, regid) def gen_helper_call_opn(f, tag, regtype, regid, toss, numregs, i): @@ -468,7 +468,7 @@ def genptr_dst_write_opn(f, regtype, regid, tag): else: genptr_dst_write(f, tag, regtype, regid) else: - hex_common.bad_register(regtype, regid, toss, numregs) + hex_common.bad_register(regtype, regid) ## From patchwork Tue May 23 20:36:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matheus Tavares Bernardino X-Patchwork-Id: 1785423 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=dGgWDhhh; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4QQmMv1z6xz20Q6 for ; Wed, 24 May 2023 06:37:31 +1000 (AEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q1YkJ-0000OF-Aq; Tue, 23 May 2023 16:36: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 1q1YkH-0000MT-9L for qemu-devel@nongnu.org; Tue, 23 May 2023 16:36:37 -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 1q1YkE-0005UJ-FM for qemu-devel@nongnu.org; Tue, 23 May 2023 16:36:37 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 34NKQb0x016616 for ; Tue, 23 May 2023 20:36:31 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-transfer-encoding; s=qcppdkim1; bh=SB4agyBZ9C3rI/3K1kpfrYbO+nPO0h0dBEq762HPj3k=; b=dGgWDhhhunvaEuO+PfPAvg9tivvzqySuZmY2FdqiztCdf41C3H3Gy95lrRso+4Hcjbl6 zZ3RR480cyWCTWY5TUF+s9rnIwXpexmJX4dm77blc5M1m7U2+7LdMjHA0W1oODw7/TLi pPsV7bCNs8UXVHrDih8ARhrzNW3qJahaOtYtMH7Tx/t0RHKWIt/Suejut5mvwc2mqZbr 3fMs1wrKIjg0xZN1KKl3d4YNhFwhjqpQL30irJxkmAGLufI2tGHiljv2Svtl55RIX4V0 E7/oywyhWEsQhkczOEceDQilYSIpzeR2vfivA4IXrFkG62rkiLXEd+mDIeuru6eN1fFj jw== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qr8qrbybt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 May 2023 20:36:31 +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 34NKZWhS024583 for ; Tue, 23 May 2023 20:36:31 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 3qpq9kujbg-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 23 May 2023 20:36:31 +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 34NKZVkD024574 for ; Tue, 23 May 2023 20:36:30 GMT Received: from hu-devc-sd-u20-a-1.qualcomm.com (hu-mathbern-lv.qualcomm.com [10.47.235.147]) by NALASPPMTA04.qualcomm.com (PPS) with ESMTPS id 34NKaSY0025384 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 23 May 2023 20:36:30 +0000 Received: by hu-devc-sd-u20-a-1.qualcomm.com (Postfix, from userid 4229910) id BFC4E742B; Tue, 23 May 2023 17:36:28 -0300 (-03) From: Matheus Tavares Bernardino To: qemu-devel@nongnu.org Cc: tsimpson@quicinc.com, bcain@quicinc.com, quic_mliebel@quicinc.com Subject: [PATCH 2/2] Hexagon: fix outdated `hex_new_*` references in comments Date: Tue, 23 May 2023 17:36:27 -0300 Message-Id: X-Mailer: git-send-email 2.37.2 In-Reply-To: References: 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: LKmSYAvabWmvpENzjrDOQrRHtpNqlK4- X-Proofpoint-ORIG-GUID: LKmSYAvabWmvpENzjrDOQrRHtpNqlK4- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-05-23_13,2023-05-23_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 spamscore=0 priorityscore=1501 impostorscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 mlxscore=0 lowpriorityscore=0 clxscore=1015 mlxlogscore=430 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305230164 Received-SPF: pass client-ip=205.220.168.131; envelope-from=mathbern@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.249, RCVD_IN_DNSWL_LOW=-0.7, 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+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Some code comments refer to hex_new_value and hex_new_pred_value, which have been transferred to DisasContext and, in the case of hex_new_value, should now be accessed through get_result_gpr(). Let's update these comments to reflect the new state of the codebase. Since they are only meant to assist developers, we can replace the old names with some pseudocode when convenient. Signed-off-by: Matheus Tavares Bernardino --- target/hexagon/genptr.c | 10 +++++----- target/hexagon/translate.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/hexagon/genptr.c b/target/hexagon/genptr.c index cb2aa28a19..8d11d928c9 100644 --- a/target/hexagon/genptr.c +++ b/target/hexagon/genptr.c @@ -880,7 +880,7 @@ static void gen_endloop0(DisasContext *ctx) /* * if (hex_gpr[HEX_REG_LC0] > 1) { * PC = hex_gpr[HEX_REG_SA0]; - * hex_new_value[HEX_REG_LC0] = hex_gpr[HEX_REG_LC0] - 1; + * result_gpr(HEX_REG_LC0) = hex_gpr[HEX_REG_LC0] - 1; * } */ TCGLabel *label3 = gen_new_label(); @@ -899,7 +899,7 @@ static void gen_endloop1(DisasContext *ctx) /* * if (hex_gpr[HEX_REG_LC1] > 1) { * PC = hex_gpr[HEX_REG_SA1]; - * hex_new_value[HEX_REG_LC1] = hex_gpr[HEX_REG_LC1] - 1; + * result_gpr(HEX_REG_LC1) = hex_gpr[HEX_REG_LC1] - 1; * } */ TCGLabel *label = gen_new_label(); @@ -948,11 +948,11 @@ static void gen_endloop01(DisasContext *ctx) /* * if (hex_gpr[HEX_REG_LC0] > 1) { * PC = hex_gpr[HEX_REG_SA0]; - * hex_new_value[HEX_REG_LC0] = hex_gpr[HEX_REG_LC0] - 1; + * result_gpr(HEX_REG_LC0) = hex_gpr[HEX_REG_LC0] - 1; * } else { * if (hex_gpr[HEX_REG_LC1] > 1) { - * hex_next_pc = hex_gpr[HEX_REG_SA1]; - * hex_new_value[HEX_REG_LC1] = hex_gpr[HEX_REG_LC1] - 1; + * next_pc = hex_gpr[HEX_REG_SA1]; + * result_gpr(HEX_REG_LC1) = hex_gpr[HEX_REG_LC1] - 1; * } * } */ diff --git a/target/hexagon/translate.c b/target/hexagon/translate.c index b18f1a9051..8838ab2364 100644 --- a/target/hexagon/translate.c +++ b/target/hexagon/translate.c @@ -556,7 +556,7 @@ static void gen_start_packet(DisasContext *ctx) } /* - * Preload the predicated pred registers into hex_new_pred_value[pred_num] + * Preload the predicated pred registers into ctx->new_pred_value[pred_num] * Only endloop instructions conditionally write to pred registers */ if (ctx->need_commit && pkt->pkt_has_endloop) {