From nobody Sat Jan 3 12:33:00 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=reject dis=none) header.from=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1767384907; cv=none; d=zohomail.com; s=zohoarc; b=UCIWcbsKa/wOULyRPPH9wH4y1jGGR0I6v0Lcpa2eYH2e+cPnqMIu7wcSytmrnbBxcxG9Madyg1EaiR2RRLv8XLsUcW79CZ2nYOCU02Gu7LGERG3AouD+EhMhCYayhOjfXHJWGsXVuBa416FnZE8D/Ex7SLjokAlmXboA9Mae3TY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767384907; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QBMJWAlfc7qnoPuxJDYcNqX8Vn0orrK0iCmCIBWb1Zc=; b=CAZTCfRarotgKfxmEljjc9cn4kb2EoHEaLxK9Oc6bRAHk7pPtERaufA9HdN6FI9D+y6p+LGdCiQrqyyBKNrNdQwC+pgw8sntkeGy8ZGF4IOb6QLWvtqVBUv+m/r4S+qatXzeg22yb8iQtu0Sc7PmuNpY1sOpaxCAn4ghfMU2tI4= 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=reject dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767384907193736.1246474229827; Fri, 2 Jan 2026 12:15:07 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vblVv-00040I-FU; Fri, 02 Jan 2026 15:12:47 -0500 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 1vblVg-0003sd-4b for qemu-devel@nongnu.org; Fri, 02 Jan 2026 15:12:32 -0500 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 1vblVZ-0002TG-5w for qemu-devel@nongnu.org; Fri, 02 Jan 2026 15:12:26 -0500 Received: from pps.filterd (m0279873.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6029WEl93961332 for ; Fri, 2 Jan 2026 20:12:24 GMT Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4bd77v49j5-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 02 Jan 2026 20:12:23 +0000 (GMT) Received: by mail-pg1-f200.google.com with SMTP id 41be03b00d2f7-be8c77ecc63so18903706a12.2 for ; Fri, 02 Jan 2026 12:12:23 -0800 (PST) Received: from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com. [129.46.96.20]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b140c42e7esm1794621eec.22.2026.01.02.12.12.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jan 2026 12:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= QBMJWAlfc7qnoPuxJDYcNqX8Vn0orrK0iCmCIBWb1Zc=; b=L6t4d+IsM33471I4 11fRkJ4mPIIOrBeKAvj3B+RmuBP/+IfpZ4dXRVBZAXR6oR3yT2rlYz1MsSNcXiik PqDmuEyea5RmEfU/a8Zac6aR5PIJXfM0qCZPyxF2PicHMOIGmMts3Ht5hFyHTGho wVT61B0kEIN4NitTlJiGZ5hOvnojBwkhMQTJEfmzqN5eWokA3+K/4GVZLoaaetuj +RoPFB3KUQUI9LLEQjuf64Er2z16OcMLAIkeRKSg6CrTWD/S5TpXcQlf+BZbC/n4 M5YX+KHFUTuLHbdnKm0tHOTC5K9mqVURgEKmp2PxMZ56/XxqLBG9ih4KAIBMSnoC ncTMfg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1767384743; x=1767989543; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QBMJWAlfc7qnoPuxJDYcNqX8Vn0orrK0iCmCIBWb1Zc=; b=Eb9faVDk/zZr4SqxNdaQrpp06JBKIxnaew8rvOaIJqtZwVccSyPNAusz8aMrR4tEBG WJszNfZ5q2q7cxTqgshkPIDyLICE1EFQ5IIBpBocySQe8LZVdm9rgY5o9qmGO5Owourk UKH+JNJJNtvkGJiXPYvt6dFgzDnA6zVE9ucA1xvuuPG4HBuD5gLwHDyVs0Y1KJX4HOZK NEVaUjTYfpJ7bd/mCBRW1SsIAD5rLuPkxQH2EMi5bDMSP8HWtCpLh7LcytxAWHEFPGyO 1LWmEYNM2ed9QnFP59lfjZK9LB9RijpJVXkLNSp4SIPbfUnLCCzFTPPmGV2UTy7trCUO Bq+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767384743; x=1767989543; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=QBMJWAlfc7qnoPuxJDYcNqX8Vn0orrK0iCmCIBWb1Zc=; b=Z/0zcWUtevenQymO1XzHuWBMYnSRH/4bwcaWQVbc1ULKh8//TZrLnS6C+L7Hney4Tc cJympYU6gOMcegnmQEh31xuqUhAG8M26xRqU27/LXb5R3IdwZtuBDc9MmCBDn6o6LBd0 DA+cO1Rkug2zycMcKcaawK3VUi9H1xl1jjrBI5SIMGp3weuRZTuApKDfoXNOoOmZBUci nT26hactEqnORF4K0ETCXZvH/wQactI5KHQBRbWBw+6/sVwDcyq/meFuByhBTcckmL7x rCk1joEdnDkLecDxTRWwt1twnPo4F3AblCXSkbEXzbvT3ObQhp1kG4cgQHsO/4D8Xued unjw== X-Gm-Message-State: AOJu0YxZswTkMSlkwebaUZ07At1VNQ1nkjHmSUatieqq/klvG9LIReQH t3UTi7BtbkbSgcHk+RAT02Q6AfhIIaqT62kuBOpoa3mRn2XY1dgtzo6v1TRIj9wmokeJeVzZOa8 zWon2Ld9VyBi4qd25i86DqUSKTBep0T4SkgRv4A4sNLvOP7vZK2HGLS/wgzUR3MlRLg== X-Gm-Gg: AY/fxX4D6cyWBxjZVtXOfz26NfNoNavj10jlrmRgX9QczmwgMVSrMdG2XZNzQjBBqBh VQjSuv5PKaKQHwCET5ty11ZiyOj/Uop5/9rkgC3dKRhrFQQRNnhlg/PpI5sD96jYDyQ1WLCPH2T XqoZ+z8mrhVIcoJKVg203qv4XPqm76/sDbPzM2feFVBLI/pui5V3ALVbgkbNR2rALi2lS66u/WT +I96GaW3OAiYZOb8JwGuRAhf2C9yVG6XlIyW6ppxI9h9iZ/UoSgnDrIxrUChrlDb7L0pSG9FTXD Gh0+ppWeMvKUFXBO0wSJdmfrjmfwyjonJeMrDAss/gTG8SZezJu+bKS6jRE36JNmBWML1TOvLIc rVShPQ7J5cJ1SHDZrf8cszwwOKv+48z7R/zGgq6h3CSMgS0FL3TDdouxiZA== X-Received: by 2002:a05:693c:250d:b0:2b0:4e86:8155 with SMTP id 5a478bee46e88-2b05ebb2bc7mr28901676eec.14.1767384742639; Fri, 02 Jan 2026 12:12:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGKYW8BxvnSZnWDRSXHHH7R9op9muNR7A/83uD2bamYHFsNWuVvwG4eQBLCcqG1Gw/UYFtqrg== X-Received: by 2002:a05:693c:250d:b0:2b0:4e86:8155 with SMTP id 5a478bee46e88-2b05ebb2bc7mr28901660eec.14.1767384742084; Fri, 02 Jan 2026 12:12:22 -0800 (PST) From: Brian Cain To: qemu-devel@nongnu.org, richard.henderson@linaro.org Cc: brian.cain@oss.qualcomm.com, ltaylorsimpson@gmail.com Subject: [PULL 4/9] Hexagon (tests/tcg/hexagon) Add test for USR changes in packet Date: Fri, 2 Jan 2026 12:12:00 -0800 Message-Id: <20260102201205.2050363-5-brian.cain@oss.qualcomm.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20260102201205.2050363-1-brian.cain@oss.qualcomm.com> References: <20260102201205.2050363-1-brian.cain@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: gHJuVB96CMo-kd5z_e-UpRgZXBVXHPLB X-Proofpoint-ORIG-GUID: gHJuVB96CMo-kd5z_e-UpRgZXBVXHPLB X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwMTAyMDE4MSBTYWx0ZWRfXzSNyeHfBPXnB gpuFcZxtlbG520K9NKH/ACXEP4nIGq2DZXoWUdxKb7KcNTTo0Nzhs3hACZgPm9oTnZ6kCQSBj8y +7rh2f0ys6IyH3/pSgkQQarO3F1+qko5/rmaGNHqQypT2ps56Bhohs8TiqV1B9AWdwItoNYZYF3 ezf1hNiWNxNrCA9Sfuoo1F2AJW0RIZDMIPM06zZeUOTgDXMn7UrwuhQv0Xz7MtbvXz3isE7dTV8 AoCsTzP1PDex+yIi1g2YY8gSOgy+kQ2msqlmJh14q08Aemfv1TCu0sR/g3YcPtUPskeLTi0IKA+ BqiFgo32LjHCwEJHa7ygYFuRw8jM+LXYzKutysbPG17WFjE31dB0CcfkxehKTsBHoxvYj01vrhf etI0m2dFEdpzWtvyuqLawnqpS9dBf1qEZozseOYgiVu+5J3k5dY1dVVQxHa5Ntwv3ryfeUyyVTw NEwsZzbnOty0IE5rgpg== X-Authority-Analysis: v=2.4 cv=ev7SD4pX c=1 sm=1 tr=0 ts=695826a7 cx=c_pps a=oF/VQ+ItUULfLr/lQ2/icg==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17 a=IkcTkHD0fZMA:10 a=vUbySO9Y5rIA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=GHvY5Ttzp4-mifQX6oYA:9 a=QEXdDO2ut3YA:10 a=3WC7DwWrALyhR5TkjVHa:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1121,Hydra:6.1.9,FMLib:17.12.100.49 definitions=2026-01-02_03,2025-12-31_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 bulkscore=0 malwarescore=0 clxscore=1015 adultscore=0 phishscore=0 impostorscore=0 lowpriorityscore=0 spamscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2512120000 definitions=main-2601020181 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 (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.180.131; envelope-from=brian.cain@oss.qualcomm.com; helo=mx0b-0031df01.pphosted.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @qualcomm.com) X-ZM-MESSAGEID: 1767384909252158500 From: Taylor Simpson Signed-off-by: Taylor Simpson Reviewed-by: Brian Cain Signed-off-by: Brian Cain --- tests/tcg/hexagon/usr.c | 54 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/tests/tcg/hexagon/usr.c b/tests/tcg/hexagon/usr.c index f0b23d312b..ef1787c64c 100644 --- a/tests/tcg/hexagon/usr.c +++ b/tests/tcg/hexagon/usr.c @@ -608,6 +608,58 @@ TEST_CMP_xx(uint32_t, uint32_t, FUNC, SRC1, SRC2, RES,= USR_RES) #define TEST_CMP_PP(FUNC, SRC1, SRC2, RES, USR_RES) \ TEST_CMP_xx(uint64_t, uint64_t, FUNC, SRC1, SRC2, RES, USR_RES) =20 +static void test_usr_packets(void) +{ + uint32_t usr_out; + /* Test setting USR bits inside and outside packets */ + asm(CLEAR_USRBITS \ + "r10 =3D satub(%[val_0xfff]) /* Set usr.OVF */\n= \t" + "{\n\t" + " r11 =3D convert_uw2sf(%[val_0x010020a5]) /* Set usr.FPINPF *= /\n\t" + " r10 =3D memw(%[err]) /* Force pkt commit= */\n\t" + "}\n\t" + "{\n\t" + " r11 =3D sfadd(%[SF_one], %[SF_SNaN]) /* Set usr.FPINVF *= /\n\t" + " r10 =3D add(r10, #1) /* No pkt commit */= \n\t" + "}\n\t" + "%[usr_out] =3D usr\n\t" + : [usr_out]"=3Dr"(usr_out) + : [val_0xfff]"r"(0xfff), + [SF_one]"r"(SF_one), [SF_SNaN]"r"(SF_SNaN), + [val_0x010020a5]"r"(0x010020a5), + [err]"m"(err) + : "r2", "r10", "r11", "usr"); + check32(usr_out & 0x3f, USR_OVF | USR_FPINVF | USR_FPINPF); + + /* Test setting several USR bits in the same packet (no pkt commit) */ + asm(CLEAR_USRBITS \ + "{\n\t" + " r10 =3D satub(%[val_0xfff]) /* Set usr.OVF */\n= \t" + " r12 =3D sfadd(%[SF_one], %[SF_SNaN]) /* Set usr.FPINVF *= /\n\t" + "}\n\t" + "%[usr_out] =3D usr\n\t" + : [usr_out]"=3Dr"(usr_out) + : [val_0xfff]"r"(0xfff), + [SF_one]"r"(SF_one), [SF_SNaN]"r"(SF_SNaN) + : "r2", "r10", "r11", "r12", "usr"); + check32(usr_out & 0x3f, USR_OVF | USR_FPINVF); + + /* Test setting several USR bits in the same packet (with pkt commit) = */ + asm(CLEAR_USRBITS \ + "{\n\t" + " r10 =3D satub(%[val_0xfff]) /* Set usr.OVF */\n= \t" + " r11 =3D convert_uw2sf(%[val_0x010020a5]) /* Set usr.FPINPF *= /\n\t" + " r12 =3D memw(%[err]) /* Force pkt commit= */\n\t" + "}\n\t" + "%[usr_out] =3D usr\n\t" + : [usr_out]"=3Dr"(usr_out) + : [val_0xfff]"r"(0xfff), + [val_0x010020a5]"r"(0x010020a5), + [err]"m"(err) + : "r2", "r10", "r11", "r12", "usr"); + check32(usr_out & 0x3f, USR_OVF | USR_FPINPF); +} + int main() { TEST_R_OP_R(satub, 0, 0, USR_CLEAR); @@ -1097,6 +1149,8 @@ int main() TEST_Rp_OP_R(sfinvsqrta, SF_small_neg, SF_HEX_NaN, 0x00, USR_FP= INVF); TEST_Rp_OP_R(sfinvsqrta, SF_SNaN, SF_HEX_NaN, 0x00, USR_FP= INVF); =20 + test_usr_packets(); + puts(err ? "FAIL" : "PASS"); return err; } --=20 2.34.1