From nobody Tue Feb 10 13:34:18 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=quicinc.com ARC-Seal: i=1; a=rsa-sha256; t=1683929906; cv=none; d=zohomail.com; s=zohoarc; b=BY5226iAoMKOO9aeuGZTX/OEgPFgN2L7+SSP0ND+flCjs287A7Hl6IAqfr2l4XzqgKlfioLoQs9UWED2nYdYPTEGbUA0eXjM1dy8BaBtXj/Im2PycgglO156ytE7HuQMvOMzNGPnf7OGhAI5z/jQFduyMG1p5/7XLYivqnk+qVU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1683929906; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=q8rVk585sqCCCPERi9C3KMMQl+drhCc0mg86va4ZA4M=; b=kQalbtgyqYvez+5/Kvzmn/SSC3RU8wMxayqUlnXiIjxWVN/ivVwkQmUiYmltPQcjon+VDL42SD5RsY33yjimn1Cpt+vZiAFKVWSpei2F/v0hexJV0p52UI6bSwq2RHTpPb9TmQSBE4wwidQEkjtKpFnVAYUEPpRfoHxlk9Y7Nns= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1683929906341225.61722173604426; Fri, 12 May 2023 15:18:26 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pxb4t-0007Ii-Ld; Fri, 12 May 2023 18:17:31 -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 1pxb4r-0007HS-Si for qemu-devel@nongnu.org; Fri, 12 May 2023 18:17:29 -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 1pxb4p-0003fb-V3 for qemu-devel@nongnu.org; Fri, 12 May 2023 18:17:29 -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 34CKIhhH026876; Fri, 12 May 2023 22:17:24 GMT Received: from nalasppmta01.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qhfww21r0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 22:17:24 +0000 Received: from pps.filterd (NALASPPMTA01.qualcomm.com [127.0.0.1]) by NALASPPMTA01.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTP id 34CMF2Eu000961; Fri, 12 May 2023 22:17:23 GMT Received: from pps.reinject (localhost [127.0.0.1]) by NALASPPMTA01.qualcomm.com (PPS) with ESMTPS id 3qh5sk7yac-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 22:17:23 +0000 Received: from NALASPPMTA01.qualcomm.com (NALASPPMTA01.qualcomm.com [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 34CMHN3J003604; Fri, 12 May 2023 22:17:23 GMT Received: from hu-devc-sd-u20-a-1.qualcomm.com (hu-tsimpson-lv.qualcomm.com [10.47.204.221]) by NALASPPMTA01.qualcomm.com (PPS) with ESMTPS id 34CMHMO4003591 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 12 May 2023 22:17:23 +0000 Received: by hu-devc-sd-u20-a-1.qualcomm.com (Postfix, from userid 47164) id 58615682; Fri, 12 May 2023 15:17:22 -0700 (PDT) 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=q8rVk585sqCCCPERi9C3KMMQl+drhCc0mg86va4ZA4M=; b=YGEFEumCk9pXCRwYBaaFf3szBgchEhvaAOwCu1szKOTPAJjCXuq0VHJxFsU3987Wj724 /tD80f7lxWN2LtAdw5Defi7/3N1jc+/xagvuOnsEHU2BFwlbP0uCB7+IoNgRItQ+5Zu4 BOf7eB+qN2yLQzBv30DMPeUe5p+SrC9VeGRMps9yk6PhtjgK/EwaV57zcxcm8fBtalSg lbZ83Mu6m3Ke6AYJx+pwXiRET3APQv4lllgQopPzukOzHf5psb/NPHm6tu+L7Kovu5gw blc8yD0eErmygbCaOyUXTniTQndLflHQmSc+8iZDP+WaIeOoAfUtsCd8RiwTEDKuGp1k zA== 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, Sid Manning Subject: [PULL 42/44] Hexagon (gdbstub): fix p3:0 read and write via stub Date: Fri, 12 May 2023 14:47:04 -0700 Message-Id: <20230512214706.946068-43-tsimpson@quicinc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230512214706.946068-1-tsimpson@quicinc.com> References: <20230512214706.946068-1-tsimpson@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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: gJNEcZmF0ukcaFsSncEOhdhT-Y5U59eW X-Proofpoint-GUID: gJNEcZmF0ukcaFsSncEOhdhT-Y5U59eW 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-05-12_14,2023-05-05_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 priorityscore=1501 lowpriorityscore=0 mlxlogscore=469 malwarescore=0 spamscore=0 clxscore=1015 adultscore=0 mlxscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2305120186 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @quicinc.com) X-ZM-MESSAGEID: 1683929907394100003 From: Brian Cain Signed-off-by: Brian Cain Co-authored-by: Sid Manning Signed-off-by: Sid Manning Co-authored-by: Matheus Tavares Bernardino Signed-off-by: Matheus Tavares Bernardino Reviewed-by: Taylor Simpson Signed-off-by: Taylor Simpson Message-Id: <32e7de567cdae184a6781644454bbb19916c955b.1683214375.git.quic_m= athbern@quicinc.com> --- target/hexagon/gdbstub.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/target/hexagon/gdbstub.c b/target/hexagon/gdbstub.c index 46083da620..a06fed9f18 100644 --- a/target/hexagon/gdbstub.c +++ b/target/hexagon/gdbstub.c @@ -25,6 +25,14 @@ int hexagon_gdb_read_register(CPUState *cs, GByteArray *= mem_buf, int n) HexagonCPU *cpu =3D HEXAGON_CPU(cs); CPUHexagonState *env =3D &cpu->env; =20 + if (n =3D=3D HEX_REG_P3_0_ALIASED) { + uint32_t p3_0 =3D 0; + for (int i =3D 0; i < NUM_PREGS; i++) { + p3_0 =3D deposit32(p3_0, i * 8, 8, env->pred[i]); + } + return gdb_get_regl(mem_buf, p3_0); + } + if (n < TOTAL_PER_THREAD_REGS) { return gdb_get_regl(mem_buf, env->gpr[n]); } @@ -37,6 +45,14 @@ int hexagon_gdb_write_register(CPUState *cs, uint8_t *me= m_buf, int n) HexagonCPU *cpu =3D HEXAGON_CPU(cs); CPUHexagonState *env =3D &cpu->env; =20 + if (n =3D=3D HEX_REG_P3_0_ALIASED) { + uint32_t p3_0 =3D ldtul_p(mem_buf); + for (int i =3D 0; i < NUM_PREGS; i++) { + env->pred[i] =3D extract32(p3_0, i * 8, 8); + } + return sizeof(target_ulong); + } + if (n < TOTAL_PER_THREAD_REGS) { env->gpr[n] =3D ldtul_p(mem_buf); return sizeof(target_ulong); --=20 2.25.1