From nobody Sun Apr 12 02:49:50 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=gmail.com ARC-Seal: i=1; a=rsa-sha256; t=1771880310; cv=none; d=zohomail.com; s=zohoarc; b=QyJl+7YVebyxKdJo15D/u/mB3cdKm0WeS6rKFZJw1Oo+d1PwaH9c+ABnoqmY2tks0sUF9RALFF6yUMMfLqksfIGxPLQi0VK15qLhJwz/XNyL00FtGcL7Rd6iCs+k9mHATWYPDTU1hbk3EnNUNN2mzmcRPuWQycrDQAZbJ9uuTjc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1771880310; 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=05BLbE1y2qcTIXCrfk6WLG4//N7sVc0Cn/mxSAr9j2s=; b=XDdTJpD4u7cOvJ5T39sRhOeNaI+MOWlKpl1iXgG1h6n/zw/jJaRDwoQkRf2IUKfKA4nqsWJzs5F0zSfK8k26biqmL4DmRFAsvCu+ko12mMcw7qn8rr5ihrgQoic1GVxG77s1akAUN8ZitLLrW7v/ww3gNL/KhppEc8KS4LbMyGc= 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 1771880310399487.9237951685162; Mon, 23 Feb 2026 12:58:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vucyx-0006cT-Va; Mon, 23 Feb 2026 15:56:43 -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 1vucyv-0006bU-Sd for qemu-devel@nongnu.org; Mon, 23 Feb 2026 15:56:41 -0500 Received: from mail-ot1-x333.google.com ([2607:f8b0:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vucyu-00081t-7q for qemu-devel@nongnu.org; Mon, 23 Feb 2026 15:56:41 -0500 Received: by mail-ot1-x333.google.com with SMTP id 46e09a7af769-7d18a9d2b1aso4542579a34.2 for ; Mon, 23 Feb 2026 12:56:39 -0800 (PST) Received: from taylor-ubuntu.hsd1.co.comcast.net (c-75-70-169-246.hsd1.co.comcast.net. [75.70.169.246]) by smtp.gmail.com with ESMTPSA id 46e09a7af769-7d52d04dbf1sm8011996a34.22.2026.02.23.12.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Feb 2026 12:56:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1771880199; x=1772484999; 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=05BLbE1y2qcTIXCrfk6WLG4//N7sVc0Cn/mxSAr9j2s=; b=AZiyJaQadNmN/jBxpY+emCjOMP3KX/v0Cz2SgY0O4lfxyq6lAq7Fl8wYM6spJ3Qpdq ViGoOZ69DBu8KbiHWLyIuGI+IV+RvJt/vrjlqFNW0UZi+12+t4P7/EThezF0lYgoCqiR L39U0VUjFIG+GK/WIPoa0mBJaWGrnp7CqEcxtSeQF5Ksh4uWo7NbwzNVeR30+0bW3DoO 3blztA1EcjBXbDBOBWXKuRspSUoc2tpnYWhFvyW3kASGrf5KLFIzZiUPtvUAG/byTyX7 KZgyDy5OzpjaW7sqIfBw6b6XNn1DbfUJ181JuxZLbdgm8tCD279hSL+KD9L1ggTxU0Hq esBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771880199; x=1772484999; 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=05BLbE1y2qcTIXCrfk6WLG4//N7sVc0Cn/mxSAr9j2s=; b=guyLF7DW37+UQwjJZePt2FyO0R9pHYlOVF92UOV1IJ/0SD55JuTcVFRxogE73GAAV1 m5K0usdEya9YbJV73ZoAXuqtHHVQ3qG5OhnDqzgdpjnTndBYfDGL/zehG/C3Iifchep+ QkdE/bQcXLg1a4S5jhkz8NeXSYB3EG403yIEuxFhlrXvEVu/cBdKM++s2yBL5jBqaL3Z O/gHunBULs1fIm3bslmxA1age8XBcnTgMa5wNxecQZ6kmjYYKoz0oRPa2mr2f+JfqIsx LqrQ9DPHTNTbukRR9PxqGMggrZM+cGPm8HOqIknd67/1OfHCY3O7UZz08cNdZv5Ya+z1 Xaug== X-Gm-Message-State: AOJu0Yxx6N6HjBzvJZwz+/YDuFKHGFIkbwKD8JQcwqM0UQsAiyutNeBY EzGZ7cAKCYNlblMp1oSquhf9m81DIgTeOKZrPHxrSU9AOZ1DDqBgoVATSauDWQ== X-Gm-Gg: AZuq6aIjYGfC5G1OG7zuIRqHNze2T5+i42+z2pcOqqmY6vEoJ57GP/2MJK3PFYdl7Ar 47QMtEZ1dpjcYMGZe85v+a45Hk++4JulfSV1cwIRu60b5WgTJbC1qx6V6Rg/mcA3fGhovL8iVd0 mQeChiaDRccQ8hrbC/w4B1CXoKjH/uy5hQsKj9neUj6zQe+M4fUdaKZTXK9Er3G/j7kA02wEUMI PNX7TZuBXzEXB5I5YTbLa6QUdx5BzVefFas15/dTDucnZDrYjWbN3852PCq3K2rKj67TG7d8sUb bHRPoIyNUHJAVsu/mIZVoDMj3/Xpu76seCXoqAnPc7pBYhDFTVahtPI1xgEzLI4oAUF4JqUgqbS P+sSRGEyKcpwwSSZlyiCl6BkEHXrrFcAHfIj8tqQ7w1SUoAcbE4GEQ/WsGBz+yoDZfTn+Brj+Oy sMrgQ4LoRgBLisF15ktg5/xoEKCPLkYpir4DRlK8YSX875rgclk7K5YVqH+iWnT/scpPQEehhBq DJ9ohqUpDxQfylRyrNNg1cS6Yce+IPNKiqgwQ== X-Received: by 2002:a05:6830:850e:10b0:7d4:96c3:3f97 with SMTP id 46e09a7af769-7d52bdf88a0mr4537396a34.2.1771880198887; Mon, 23 Feb 2026 12:56:38 -0800 (PST) From: Taylor Simpson To: qemu-devel@nongnu.org Cc: brian.cain@oss.qualcomm.com, matheus.bernardino@oss.qualcomm.com, sid.manning@oss.qualcomm.com, marco.liebel@oss.qualcomm.com, richard.henderson@linaro.org, philmd@linaro.org, ale@rev.ng, anjo@rev.ng, ltaylorsimpson@gmail.com Subject: [PATCH 5/8] Hexagon (tests/tcg/hexagon) Add tests for vreg multiple writes Date: Mon, 23 Feb 2026 13:56:29 -0700 Message-ID: <20260223205632.223714-6-ltaylorsimpson@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260223205632.223714-1-ltaylorsimpson@gmail.com> References: <20260223205632.223714-1-ltaylorsimpson@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=2607:f8b0:4864:20::333; envelope-from=ltaylorsimpson@gmail.com; helo=mail-ot1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, 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: qemu development 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 @gmail.com) X-ZM-MESSAGEID: 1771880311936158500 Signed-off-by: Taylor Simpson --- tests/tcg/hexagon/multiple-writes.c | 46 +++++++++++++++++++++++++++++ tests/tcg/hexagon/Makefile.target | 1 + 2 files changed, 47 insertions(+) diff --git a/tests/tcg/hexagon/multiple-writes.c b/tests/tcg/hexagon/multip= le-writes.c index 4305903547..b93f2ab32e 100644 --- a/tests/tcg/hexagon/multiple-writes.c +++ b/tests/tcg/hexagon/multiple-writes.c @@ -199,6 +199,49 @@ static int test_post_increment3(void) return sig; } =20 +static int test_vreg_legal_predicated(void) +{ + int sig; + + asm volatile( + "r0 =3D #0\n" + "r1 =3D ##1f\n" + "memw(%1) =3D r1\n" + "r2 =3D #7\n" + "r3 =3D #13\n" + "p0 =3D cmp.eq(r2, r3)\n" + "{\n" + " if (p0) v0 =3D v1\n" + " if (!p0) v0 =3D v2\n" + "}\n" + "1:\n" + "%0 =3D #23\n" + : "=3Dr"(sig) + : "r"(&resume_pc) + : "r0", "r1", "r2", "r3", "p0", "v0", "v1", "memory"); + + return sig; +} + +static int test_vreg_illegal(void) +{ + int sig; + + asm volatile( + "r0 =3D #0\n" + "r1 =3D ##1f\n" + "memw(%1) =3D r1\n" + ".word 0x1e0361e0 /* { v0 =3D v1 */\n" + ".word 0x1e03e2e0 /* v0 =3D v2 } */\n" + "1:\n" + "%0 =3D r0\n" + : "=3Dr"(sig) + : "r"(&resume_pc) + : "r0", "r1", "memory"); + + return sig; +} + int main() { struct sigaction act; @@ -224,6 +267,9 @@ int main() assert(test_post_increment2() =3D=3D SIGILL); assert(test_post_increment3() =3D=3D SIGILL); =20 + assert(test_vreg_legal_predicated() =3D=3D 23); + assert(test_vreg_illegal() =3D=3D SIGILL); + puts("PASS"); return EXIT_SUCCESS; } diff --git a/tests/tcg/hexagon/Makefile.target b/tests/tcg/hexagon/Makefile= .target index f86f02bb31..ea73413bf4 100644 --- a/tests/tcg/hexagon/Makefile.target +++ b/tests/tcg/hexagon/Makefile.target @@ -118,6 +118,7 @@ vector_add_int: CFLAGS +=3D -mhvx -fvectorize hvx_misc: hvx_misc.c hvx_misc.h hvx_misc: CFLAGS +=3D -mhvx hvx_histogram: CFLAGS +=3D -mhvx -Wno-gnu-folding-constant +multiple-writes: CFLAGS +=3D -mhvx v68_hvx: v68_hvx.c hvx_misc.h v6mpy_ref.c.inc v68_hvx: CFLAGS +=3D -mhvx -Wno-unused-function v69_hvx: v69_hvx.c hvx_misc.h --=20 2.43.0