From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384774; cv=none; d=zohomail.com; s=zohoarc; b=e7me/xFRvPXFAiVVP7ZMURPDYM2yfbYBfkLQIkyasAiSVrvMIzdxcYGfr+hCzL65N6HDF+4vhW7OD6M0R5cKRXex0nZYHEOSC/4dOtsaTOeWbbJaVI6tMnfKmV6uayYGuA/+nk9WWEOY/TeKkKBsDVURnY/0Xm+PF77/Eez2JWo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384774; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=wPXrh5g8kF53RbTwh48RpR45J4qfOxXYj+zhnpZeRbo=; b=Zs6dgIkztYIhsGx6vVUL5i9N1CxW0PEzZ7sRrqhbHY5eLarc8GSqkbXbpsQYBCHoSTwb4rgC0RhtCEKMtGXh6qyFakoZIaK4YIo5Qcd31CgnXjcxUh8GgOuaJEevA0Z+TSoPva8AWvPBY5CSIorVpsjGF4D/85D1ZN0IIzhS09Y= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384774059999.4959699800503; Fri, 30 Oct 2026 11:26:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrIm-0004YR-3D; Fri, 30 Oct 2026 14:26:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrIk-0004VT-DY for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:06 -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 1xMrIg-0002N0-Hh for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:05 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHu6Wq3430798 for ; Fri, 30 Oct 2026 18:26:00 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmfjs-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:26:00 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f1e62510cso221695385a.1 for ; Fri, 30 Oct 2026 11:26:00 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4ac09ad35fdsm50035595e9.2.2026.10.30.11.25.55 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:25:55 -0700 (PDT) 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= wPXrh5g8kF53RbTwh48RpR45J4qfOxXYj+zhnpZeRbo=; b=ZCDngQv5N3Phdzfq uFIzZUneF7wokZXe4Ow7b9b7NgwNrAgG+MdVNIiDA82AvzJZqZ+gFSsHVovT+b6D jhd2sL1HozaE1whChHCSXx23kqn3xp/58gjrC/kiF0I2ImdYG7UNUFjjNc+w1g3w B7taOA7J9oNBXmk6ayU1ctouRLnIkRSjOvHmdzs5vdeGa3JjPmFu4+T+qcGFUMvt QiioFRslkj/fnFXcpoyifCdzj/kgc5MMP45D3NjaE46K8nsvkq46BohKU1hbX5nJ GTq6a4pSIWZFyhwpcpohZ43AN9XIUAE68fWm4aedcwsqOLf8ImRJb+VF2Svl+r2S XvaDoA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384759; x=1793989559; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=wPXrh5g8kF53RbTwh48RpR45J4qfOxXYj+zhnpZeRbo=; b=KkNEvaeyu4zUAYCPtb599IuyYXuFLcShBujjc7+uJH5sIX3R+SPZDNO3g2cipSH/bx JRkEnuMFn6dG+K4NAvTd8W4KYLsNe0U7Q4Wyu5OZT2duRTFkksv/titXBnq4x2Y5LvHW I8D/AeEAGtjqgWUykvtkUbUF35Kjk4XiB6Koh5CVwcHXylvLU4o+v99oAyJYfTbzw/F5 CcEpUvW/I4H1EFn1dnO1KrWOSqhRqvEeJwr/4p7x4q35/ltJlPy+OWaPse4AMmvFV6Xg vho/9lTpnyXNVWNqCHzMb2qG8Fjn9WQ4ZmMkwzv9Hqye6DYCQFjTmZSLal8ugW/DiRA2 3kzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384759; x=1793989559; h=content-transfer-encoding:content-type: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 :content-type; bh=wPXrh5g8kF53RbTwh48RpR45J4qfOxXYj+zhnpZeRbo=; b=p3KBURNGj5IQTl4jjlzsURaMkF1psOHrSxqtWTW765kR6lZEl1RNXV+7rXCg+GWmDw tN2jDj/HGNlE7ik+0fIrarmncn4J8D0+vG5Cytrw96EUJhat8DRAiDBZ2NtqDkMJax4U aZBoxzPz3acOmc2DQN+F4PQVMxQ/e9u+IFy+zggUzJinY82DrYdgI3OM7T3j8bB5kdI1 x/kaMSq9AwRyxxik00irgnKc5WMy2M83WdsxR6/t0dHjUFef8Peg3GewsYeWdL/oM1cp TbyyfDhsKgCLf0j5McAoEfVlgDoonV8RObtzVDI2U/NO245KmdXrpi5sCVRWzhv1Do4U ooKA== X-Gm-Message-State: AFq9FYKwtmsWBz/DP40QrGjb7NDUIGBoodokX7jy5rAQATg0vOFJJwW1 OrrkMGhmW49l8wZWhvQqNq6sDNR2IGXT4nH/1rR/PeLgBFaumxkgrAxGLSlCvVCO+clevFUM1dY LEuEneBRBFPqbJU6ia2swpQraIyQB1MnsLOkvnMxdFJ1X7i6c8kW0PVVfaFSMVIFtD4iN X-Gm-Gg: AYBFou20IibclFYUG8ZUpdofLppdbTQ6Rj9hzjW2NrMI1y6rs3nl4kquYz5+tR9D/K/ OyFi8kZfiK5+GEA6vHbQPOlzlJ53IgUH3QX6vdtwHiFcCzsag3rI/TRvSga2pzE6YAiV1G6GsTS rtIlCIAPqiHaCDRsT9tBr0poKNcVlsOMsDNB7UVI6jyanFjgxDo3FCtaLhkfTA8W2cm5uycN9ul Wu3haRvTtJo6VxyEUxsYXOty6syYpfkvWF77CE5/8lIUWh9olc4ox7LtLnvpKiDMWwpQG8fga1k yccl9XuNoHt/j58BLSdH66K/5Dxm/qp3RkkYNwtvc+Ix4ihQTV2xPgYxOeBgIt3aLJHuLvYgzzY NG0fLlmf0tu95JCJ2cMMWt36seAjJqOG6U8A4uRGSa//CKW4MwHvWQyqb4lBo/N0A/+zRzurthb ggp7sHBxSv5KfvDBqYJQ3D++DD3lRdwQ== X-Received: by 2002:a05:620a:4409:b0:93e:f97f:f245 with SMTP id af79cd13be357-9442173e65fmr530434285a.30.1793384759277; Fri, 30 Oct 2026 11:25:59 -0700 (PDT) X-Received: by 2002:a05:620a:4409:b0:93e:f97f:f245 with SMTP id af79cd13be357-9442173e65fmr530429885a.30.1793384758792; Fri, 30 Oct 2026 11:25:58 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 01/12] tests/docker: Add the mips32r6el toolchain on Debian cross container Date: Fri, 30 Oct 2026 19:25:34 +0100 Message-ID: <20261030182546.2508-2-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfXz9FRB4ZqoTcv hgJ23rtjR7VzKM/dldWM8jO4tOzXNwhJ1iPJB7UpsmnjpVFcBPemFm9iepk8JJ+fWqzp/rmEnoF k1s8q319+vRyqSTEsQJgo5v06+BWZv11+NsWBdjSU1EJRymoywTibnkt++iU9p3ooF7iSjZiqMc a+PJYjKoq12VZmdNUoJMHFkXBlSbJ5ITa+OTrPH5S4OlpbbzBiruiMR5BIT06Md5Ck6w5asa9MV 7+A5jL8t70FjVNMKBKFHvaYG1Gtn+5OGcxwLWNLpYGWwzuihjqYlSSeFoTlwDgPP3HLEvwXeFaM CLg521cKWfcHC3bqanODTTErhd+Zi+4c2uuznK/1Eqm5ZhaH7EO99Eb3hKzbg7u6OuZsoI5FRSn Z5pK422ubcfmZtAQ42GgJvrakFQnprSZS/QNRAzo/DIv6mu2HG3dmIW26FaHxOwDmtkcN2d77IO 5R0FR7Y9Iyq5ajIokWw== X-Proofpoint-GUID: xEDgYEk-GmfZIU2i9pN7gM3p-toV8HEM X-Proofpoint-ORIG-GUID: xEDgYEk-GmfZIU2i9pN7gM3p-toV8HEM X-Authority-Analysis: v=2.4 cv=IumL47/g c=1 sm=1 tr=0 ts=6ae4e138 cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=WYtM1JM4fG2UmubedU8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX1GbgBLdm+p8j tjpe9geW7Sk84i3WyxloWEDXmQlbZWU/CGoFGxWd9f+PYchwZTDLJr75KhFPMdpcaUXWE9rE0Sv EYinbWK4N8zqgIG7sJTa+FujVz0LPH0= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 clxscore=1015 spamscore=0 bulkscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384776628158500 Use mipsisa32r6el-linux-gnu-gcc for the little-endian MIPS32R6 tests and install its compiler, binutils and libc development packages in the shared Debian cross image. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/docker/dockerfiles/debian-all-test-cross.docker | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/docker/dockerfiles/debian-all-test-cross.docker b/tests/= docker/dockerfiles/debian-all-test-cross.docker index eefc03c49a4f..4bbed2cdf08c 100644 --- a/tests/docker/dockerfiles/debian-all-test-cross.docker +++ b/tests/docker/dockerfiles/debian-all-test-cross.docker @@ -89,6 +89,9 @@ RUN apt update && \ libc6-dev-mips64el-cross \ gcc-mipsel-linux-gnu \ libc6-dev-mipsel-cross \ + gcc-mipsisa32r6el-linux-gnu \ + binutils-mipsisa32r6el-linux-gnu \ + libc6-dev-mipsr6el-cross \ gcc-mipsisa64r6-linux-gnuabi64 \ libc6-dev-mips64r6-cross \ gcc-mipsisa64r6el-linux-gnuabi64 \ --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384804; cv=none; d=zohomail.com; s=zohoarc; b=a+rD5y99NKU8cNjv2lqAxB5v7iyEz1msaEa/HSFyKwus5D1VumPUW/RxR1kKw9onVIKMb5xi2LI4zrNEv+rfHYBawIt9Dx8/6l9oma8A7tEdbsRLSAnepPRRdzxKWjDeCEOKczKCRaeHQIm5R35khr7U6rX9ShbyOtmG7/FvZs8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384804; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=xchSFkoLT7wQreEItSdHtwnzmQxPcqqOKW9v2LldNaY=; b=UzddmRqCb5sRKT60kAeNrdiqwAXHAvvjPs9YTWTfvzGKLmmFXN+szaEjX2+gaQBm9AkRqm+8nWufP4yN+D9EP1ATWgOwsmjj3vyOQUE6d1VIojDnkYebEFveiJLK8aSH+vVUOKdMT9Vw3A6TLGFlKOE4lQve+yD8l9tflfGFpy4= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 179338480474799.19290323059579; Fri, 30 Oct 2026 11:26:44 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrIr-0004bh-Iq; Fri, 30 Oct 2026 14:26:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrIq-0004ZW-0M for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:12 -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 1xMrIn-0002NH-CW for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:11 -0400 Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHu7ml373325 for ; Fri, 30 Oct 2026 18:26:07 GMT Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmev1-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:26:07 +0000 (GMT) Received: by mail-vs1-f71.google.com with SMTP id ada2fe7eead31-7c0f07b4e97so770878137.0 for ; Fri, 30 Oct 2026 11:26:07 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b81c74sm4457451f8f.36.2026.10.30.11.26.05 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:26:05 -0700 (PDT) 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= xchSFkoLT7wQreEItSdHtwnzmQxPcqqOKW9v2LldNaY=; b=BuXYLCvThmdaxK/H yDWc+gpGhRXUjLT3Uzw4M7Dm73EaUJUgoiGa88NmH+dyrkfolkZwo6ZwyoLQ1bKS 3cLVQuhE8c3d8r7/sLqAm735SBxMZrXR9FitO8E8qGN5f54VcT3YMjDzz8R0QOGL p9n8eK5Wm8AO5S5BStCxN5zMjaJAkdnZH9VrDp0MA+Ay3njShx3T6hiaFrJY67MB yeGcmsWFTK9HQfAMRdffvqWDYioSwJxLF6BKTyDbpllaLCpLU0j+8UhchGWpT8gQ gaELz1xZfBoJi1bRcKY/jRvdEDZRamJ9Gow/hDY1KcXw5Ic7A0ZBdc1JytNPBDQf RbecFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384767; x=1793989567; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=xchSFkoLT7wQreEItSdHtwnzmQxPcqqOKW9v2LldNaY=; b=TJHi/bow0QHf1YqGkMg0HocSOdq03e0DdgxXFLp3tIemAPi0O6neutKUUHaVow7CuT XM/K5BjQfL28LbzK14rLedXdOrPQlsuxxzmFGtJAsPAqlgMbtw+eJ2FMQpy4J2CvNoK8 ZaifbgSHfMEkLnV831BGm1+sMv1wCOQ8gVdtSFDQ1e7gxMtdm1p1AI3zMYHyXOMlQFom EmZSE/8/UGIoQDguXzf80CX5frVYmkRHJH+xG8RWMTUZLRf3O29ij8GDF8kFpY9f6C5a O8YHbz3wFZOq07qbvmYPQ9WSqOsi1c97rBci13CTMxH/WBy6+rcvrMiGmDfthedM5OBg oWow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384767; x=1793989567; h=content-transfer-encoding:content-type: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 :content-type; bh=xchSFkoLT7wQreEItSdHtwnzmQxPcqqOKW9v2LldNaY=; b=LQ/BVuvLJvCeiZFHEBCPk5so1oc5Wu6jS5ieCcYosz4XHtQ7TDYe1APuve8w+lY6q4 FMOXg3TKvv1I7mvL0LNV87QIOdaLlB/ceuJbzPUZJ/nSH5XqFikJD9dZj/o1I2y/wMZA 1sC1wEvT8s8ggd5KD6TL2u8o9F1d3/MDOqIVFwvQBz7xm8CKN9APQfxJNBTj5Jn91Nyq Hv39Lnf+Ck5emLbpT5jMS7vElDuXQ5q57Wjh7l4WWW6nvCUfe0bwnL+RjnqBBBuDaEbA tiH9hzgjjWXZYOA6kczAjCqgRfohNHTdeiveWFHBbiIYAX51cdKtegKyj16enytFSWxZ Uxsg== X-Gm-Message-State: AFq9FYLLH457wFgyR3xdWigQySgFwuj+5WcPoL7mN/fkAg6XMe+1hgsF 97ZKQ7WRn4SQm9nJ9KyqBhciC0iD+V48l8NlnRMQ/vU+hD7wnQBslX0CxSpywGC6vZ8ASILf3HM tEeaG1C1jUijRMgDBT06wIVML/6WOnAHgV0OMjZZMHbKuagGMx/2NpQg+eOATsE+a7W/o X-Gm-Gg: AYBFou3Hxc9jw2mhnJPKBomkV/mdmVNpE9AVZhQJuVe1ptctW+0TJe3ddmV5wCy0n1I z1lDCptpSmmrzR4mzq/yhHuS3A+pefUXQsVz4QTu0KL8SzL+Q4SgdhONMg0KLyqhzPXmG+ObBMk oykCBf5+rOet5IZzup4qidQV7wnIK4SA55CDEnKdt4YitAdWmC8NM7FAUu0v3oOyeyGdt4rFO3g 7JQW9AeWScvZtcwZHgxcfzQv/fUZv/3yh5juuFdSVW7ChliFprw5rqAkudiYJOuDMiHbhRPHh8Y jzIyUMoXL/SFL51140AttiNKeCmkAeAQJob6z9RG/wN2gNFsIh/U0MwFefWmaP5jkq0vton6XZk fTZ0kocmwDSkkq548+wcjnwshk41SwLFqf5NsOyK3uoAfC5nTYAxcN60YHOh/nvKoViCtKymCxq B0ngnzHD9s1C9AMYs= X-Received: by 2002:a05:6102:5244:b0:7c3:e156:da3c with SMTP id ada2fe7eead31-7d072c3bcedmr1884733137.15.1793384766909; Fri, 30 Oct 2026 11:26:06 -0700 (PDT) X-Received: by 2002:a05:6102:5244:b0:7c3:e156:da3c with SMTP id ada2fe7eead31-7d072c3bcedmr1884717137.15.1793384766449; Fri, 30 Oct 2026 11:26:06 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno , Paolo Bonzini , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= Subject: [PATCH v2 02/12] meson: Add the tcg_tests_cross_cc/cflags options for mips32r6el Date: Fri, 30 Oct 2026 19:25:35 +0100 Message-ID: <20261030182546.2508-3-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfXx7UmvzvlDUoD O7CNGV16pJjp02cY6QuYCa/Iarj9OxksKLV5DigHjuWVsbEXtaeQbWlZ67Oma7nPPaQdachNSP7 vIzB0tezfLpNufCVt5rzRDCqGxcJWzouZACC3Vnx/xB2O/JR/+EebEhi2TMX3ETYp0NUWzedHwm e2x7hFac6xB9IT4pmto4Jp41ZqbomkuKgYQk77k8p9m7h/mdPSTmogTzPE2B9VFZcxL57vAlSw3 mZdbWJRjg+kMpADglHiz+B/QekK+J8kyT5A2k4LBFb/cRPF4QC775Eo3Ep1lvlNtkPf8xQ58wkN rBnrEuBrpSUzlUAHd5XU8BN+s5TOqGzpscnq08IGWX+yWnUbXaIEt8SXfbFZBr9Q/UokMs9qtbw f+taU7KcnKUtcSXN8QTHitokjDxFwy0YFLhi6IeAj0qvmljbvXZUKTjgQpeiyp6YbUSzOhhf8xR iIBM+pb5SGlaVPTFULA== X-Proofpoint-ORIG-GUID: Zaiye1QA_X5gjGCp20eJ82PrM6vOqaPX X-Authority-Analysis: v=2.4 cv=IeoSymqa c=1 sm=1 tr=0 ts=6ae4e13f cx=c_pps a=P2rfLEam3zuxRRdjJWA2cw==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_glEPmIy2e8OvE2BGh3C:22 a=EUspDBNiAAAA:8 a=ClBwLX5JVu_AAdhY8JwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=ODZdjJIeia2B_SHc_B0f:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX8FzN+h5++4Hv oXwjOWsZuJu+hI1Ig63Kf0/FgamnjeJ5bPxKR2ackq/7zr40Ab0E6K4NeCMiz1Qxw7Cdp671Xt6 IuXvzuwbJeprSCIMbcWZvuE3buZWAdg= X-Proofpoint-GUID: Zaiye1QA_X5gjGCp20eJ82PrM6vOqaPX X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 adultscore=0 spamscore=0 lowpriorityscore=0 bulkscore=0 priorityscore=1501 malwarescore=0 impostorscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384806143154100 Add meson tcg_tests_cross_cc/cflags options for mips32r6el, similarly of the previous mips32r5el commit c7b1a7bc9d33 ("tests/tcg/mipsel/mips32r5el: add msa tests"). This allows compiling TCG tests for the mips32r6el-linux-user targets. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- meson_options.txt | 4 ++++ scripts/meson-buildoptions.sh | 2 ++ 2 files changed, 6 insertions(+) diff --git a/meson_options.txt b/meson_options.txt index 895c6e63c28a..9ae8e44ab54e 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -461,6 +461,10 @@ option('tcg_tests_cross_cc_mips32r5el', type: 'string', description: 'cc for mips32r5el tcg tests') option('tcg_tests_cross_cflags_mips32r5el', type: 'string', description: 'cflags for mips32r5el tcg tests') +option('tcg_tests_cross_cc_mips32r6el', type: 'string', + description: 'cc for mips32r6el tcg tests') +option('tcg_tests_cross_cflags_mips32r6el', type: 'string', + description: 'cflags for mips32r6el tcg tests') option('tcg_tests_cross_cc_or1k', type: 'string', description: 'cc for or1k tcg tests') option('tcg_tests_cross_cflags_or1k', type: 'string', diff --git a/scripts/meson-buildoptions.sh b/scripts/meson-buildoptions.sh index 14990966d31d..0f8b56bd7f8c 100644 --- a/scripts/meson-buildoptions.sh +++ b/scripts/meson-buildoptions.sh @@ -539,6 +539,7 @@ _meson_option_parse() { --tcg-tests-cross-cc-m68k=3D*) quote_sh "-Dtcg_tests_cross_cc_m68k=3D$= 2" ;; --tcg-tests-cross-cc-mips=3D*) quote_sh "-Dtcg_tests_cross_cc_mips=3D$= 2" ;; --tcg-tests-cross-cc-mips32r5el=3D*) quote_sh "-Dtcg_tests_cross_cc_mi= ps32r5el=3D$2" ;; + --tcg-tests-cross-cc-mips32r6el=3D*) quote_sh "-Dtcg_tests_cross_cc_mi= ps32r6el=3D$2" ;; --tcg-tests-cross-cc-mips64=3D*) quote_sh "-Dtcg_tests_cross_cc_mips64= =3D$2" ;; --tcg-tests-cross-cc-mips64el=3D*) quote_sh "-Dtcg_tests_cross_cc_mips= 64el=3D$2" ;; --tcg-tests-cross-cc-mips64r6=3D*) quote_sh "-Dtcg_tests_cross_cc_mips= 64r6=3D$2" ;; @@ -566,6 +567,7 @@ _meson_option_parse() { --tcg-tests-cross-cflags-m68k=3D*) quote_sh "-Dtcg_tests_cross_cflags_= m68k=3D$2" ;; --tcg-tests-cross-cflags-mips=3D*) quote_sh "-Dtcg_tests_cross_cflags_= mips=3D$2" ;; --tcg-tests-cross-cflags-mips32r5el=3D*) quote_sh "-Dtcg_tests_cross_c= flags_mips32r5el=3D$2" ;; + --tcg-tests-cross-cflags-mips32r6el=3D*) quote_sh "-Dtcg_tests_cross_c= flags_mips32r6el=3D$2" ;; --tcg-tests-cross-cflags-mips64=3D*) quote_sh "-Dtcg_tests_cross_cflag= s_mips64=3D$2" ;; --tcg-tests-cross-cflags-mips64el=3D*) quote_sh "-Dtcg_tests_cross_cfl= ags_mips64el=3D$2" ;; --tcg-tests-cross-cflags-mips64r6=3D*) quote_sh "-Dtcg_tests_cross_cfl= ags_mips64r6=3D$2" ;; --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384791; cv=none; d=zohomail.com; s=zohoarc; b=G5mkL0FVimBU1ORsUXVD2Zbx3U5oZL+neyDxcNvK+CKenZUVKf69lzOEA1c01xyRijqaf3e6nzoLxud4A4s7jXt44llDYZ16c8sF+KJ6O488f5Drhde7oeYZSXkfYWmYyj75ALu0+m74u/45sjRLFbHEjoeVIDdZKFPasrzF1wA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384791; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=8T+PXjA1MazucRVsOm0Wf+5tkdK1+xYvTzAlABrrqhc=; b=KjvS9vmtdj3hahnx4XYx3RubrjqtPXDuV+x9toX2h1lCT8u36h794A9HJUgAb+jjVrH6pXsHM46+xExY0Gcr8vC+oE1xtUxgcIirak2TysXWahKGGicxIcs77Wne9kiPdym3DAsrcLAFocWV5hFUYkX3efeoaDD7rBPgV0oePeU= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384791139242.863214248659; Fri, 30 Oct 2026 11:26:31 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrIy-0004dB-QR; Fri, 30 Oct 2026 14:26:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrIx-0004d0-To for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:19 -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 1xMrIw-0002NT-3f for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:19 -0400 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 69UHu1Pg4025480 for ; Fri, 30 Oct 2026 18:26:17 GMT Received: from mail-vs1-f71.google.com (mail-vs1-f71.google.com [209.85.217.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmd9e-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:26:17 +0000 (GMT) Received: by mail-vs1-f71.google.com with SMTP id ada2fe7eead31-7bf08dc2fc8so203037137.0 for ; Fri, 30 Oct 2026 11:26:17 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b79059sm4801816f8f.30.2026.10.30.11.26.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:26:13 -0700 (PDT) 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= 8T+PXjA1MazucRVsOm0Wf+5tkdK1+xYvTzAlABrrqhc=; b=IdIn0OBwF2RIJCgK LnsruewR1KhLE2u+8L8OWasJkIHISww+LSo9OUN2inXjxwWMH0PvYhscovVQ0Fd/ 6euvMY4TOrYxKU2T0i4qffCM9L+uRLhfU6xlLEfRtukvq6LUGMGooBAFzMxRrLxA 7uFX9OlpVaA0BoD4QPIe+qtWTnBdRVwzQgvLiIxmqidsYyJ+obngn58xeISpT1D1 U5i7QYKxFDWtClKfWj6oTxV5o/kSe7bP0tbzq44zbWSq6+5Ia3DMzdGpuflj3Yn4 XHYyqmUK7ZBtNZ4+MfpB6xeVAGygvHLPeat9awjUWjaO8+hiRcfJvp3YL4RSL1cZ QtPLOw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384776; x=1793989576; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=8T+PXjA1MazucRVsOm0Wf+5tkdK1+xYvTzAlABrrqhc=; b=ZVJWt0n7Ot6QNTljjWCAfFuY5TwymWJJu+qlsTyXLhxminG2PS1/VEWkhmJFB6Q637 TLNgH5QihitT0pJvJhxqxXGeDFZ4hZs2i6ICLCTJVTz4NrwHv7sOwnqEBTilApzbVF/r Y3Ru7Ji0rr763Xv3kWG17WRqyZVSEQKeOYvkXLOhSV13dgqc+NyCNOUnuAq1wL6SWLfg ymsFzG8TT7bMeMfSVacDS8EO9Os3eO7gKlRf/TFZ5o4Xp6y0S6w+gEn+g3LOiyHt0NNa YChAAQgR829CDj+1ezaIrO7fo1dys/4AqDNmboyaKos8/Qr6M5bCc07+9ow8F3D8Wbul ahSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384776; x=1793989576; h=content-transfer-encoding:content-type: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 :content-type; bh=8T+PXjA1MazucRVsOm0Wf+5tkdK1+xYvTzAlABrrqhc=; b=FG81kLQ+OrKTl4Iu1tn96edZaDbZDC49CGYlV4jJQx1MPzTcKg9fPaYxhgYpw16XDC CUekw5Qh0QmfMX6Ei4BzetcvHSP8u5DJlCKcIC+r4SKL9InzCKwy5Np/e4IAR90GjM9E Gamgv5tegI3pOFXWL44a3wAnw+2o+lQN/8+qbEaJ6I8rtFmyKRIT1NQ2i/jjT/8NZQj5 HYiFUtKCNteRXMNzdkxanSd5lcX1rodmwlG5H++jxo60zxEpvE92++Qk+8cXhWUx3qdt gImAe6b/3VQWqufhLSHzyL+X2AkGiN0dGkJYYFhaDpoVwjNEUtqzqAa8TrrPlCFUAgki YvEw== X-Gm-Message-State: AFq9FYLZh7D9YUI5odUAQZ4M0Gb+1/n0abmQh4JlBx59XDboJA175wNK F6bfCMw+n7e52lWi22xeUf8gEE1m7uzJ54eBEOcaITKJn7GH0ee8TgiRQ110v8XeZpHyVXR/aEm V+89b6kqnaehHFGOAcM2CSD0HT1omv9D/tKQQzqlBWy5rFhxfZ7E89/MID/oXglrRC/Uk X-Gm-Gg: AYBFou2eJUwDuJCipGkEuqzADgz/J4RB5eTyoYnHoACpTmu1MGsOREIjz/tnZQxErZq dWV6YR/zP34cUD8I63kDO3+e6l8X240SQp1ifTe20jGBW4ZXXR4jFVXnje3rHL8wnLin9LMiL7a 5IgxFbxj7yGa8ecLojOE1l0icqvYmWACDV0EBqWrHbOJCASQQmOctYkuYrGImb1eQR+fJY+sMZg NLHmXnLjdD0f6c/KOiA09m4Y9xAqRkN7Yi71YvAOy14c0yW2T4/asylfYifO5cxAWG+LF/VObOY E8NUyMDfezVOnBKAYAMoHFsJQs0m1IYh35nkBCjT5/987dLPM+s5IO8Vi2BInuFMB0/sHTtOfmo V0ZsEig73wZCRb4smbPrwDxbxR6yalbBTAu8dy4pAiXLKnG+f2yG+wRHFeHyL1DqXbDs5m6VAke pgVCDdJ8rH5g+1J3M+siifP0ARj9fdoQ== X-Received: by 2002:a05:6102:c01:b0:7cc:776:6c41 with SMTP id ada2fe7eead31-7d072c9f864mr1334122137.22.1793384776498; Fri, 30 Oct 2026 11:26:16 -0700 (PDT) X-Received: by 2002:a05:6102:c01:b0:7cc:776:6c41 with SMTP id ada2fe7eead31-7d072c9f864mr1334110137.22.1793384776020; Fri, 30 Oct 2026 11:26:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 03/12] tests/tcg/mipsel: Add MIPS32R6 logic tests Date: Fri, 30 Oct 2026 19:25:36 +0100 Message-ID: <20261030182546.2508-4-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: ZIlL3nCb52InbQu_0sZH0RBsioOQviip X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX+Fz+EMVhNbdd HAu26Mbrn+4e6UTT+bDUiMjm+yMSvVZJcvhC1YAaHUojTgEKBb4tgkYZpLh6gJf1EU4pMbKTbJH qaDsskyO4emNiCZqb4VhVR/KNC6X4B0= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX87wluSDiA4/V FfzVjj0XLv3WHsiIgoaFP7OnsSJNvnmqVpgVJYpnw++Vs7D3GchKZVq82wCBMGLqnQVLchXSXUG nba95DdCPQKToJMNTOuxm7u3BQsRcXgDtjCOkAYyGllWS0jf1ndGa1RxNvht/8yrmqdeM+4/ooW 7xd55L0nBvoibPAACKFeWR7lVi4b6ogn8Ph7zbipLRT0/iy2a4+wcsIFWaWvsrm/xIQUrmcEudL wwnL41cGMdPi8vYDYruc+AvUTIjAGpTiCCW2Tgb+mHLBBoSJIZgS9SzQSwMS2x5/W1NpDw+9L87 1d7tanNKxYX5lcJ5iy7oJxac4ECVqa2bdVhBiMWvzaOokQPNV8yGnNyVNOiaPXR++wOlpehneSX /VZm/KWdOo0dHuIkEeJl7PdRETldjsAme/u56hR0FP5B+VXVxSYNkLmSAt6Qhoug+6hOkiHf2XC nvgTRlGJDSUY+db39JQ== X-Proofpoint-ORIG-GUID: ZIlL3nCb52InbQu_0sZH0RBsioOQviip X-Authority-Analysis: v=2.4 cv=TpVzFzXh c=1 sm=1 tr=0 ts=6ae4e149 cx=c_pps a=P2rfLEam3zuxRRdjJWA2cw==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=rJkE3RaqiGZ5pbrm-msn:22 a=EUspDBNiAAAA:8 a=6_gWjx6qscrDNB68990A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=ODZdjJIeia2B_SHc_B0f:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 lowpriorityscore=0 bulkscore=0 phishscore=0 priorityscore=1501 impostorscore=0 adultscore=0 suspectscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384792916158500 Add a mips32r6el-linux-user target running, on mips32r6-generic, 32-bit versions of the Release 6 tests that don't need 64-bit registers, starting with and, nor, or and xor. Output is TAP. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mips/include/wrappers_mips32r6.h | 61 ++++++++++++++++++++++ tests/tcg/mipsel/test_mips32r6_logic.c | 60 +++++++++++++++++++++ tests/tcg/mipsel/meson.build | 29 ++++++++++ 3 files changed, 150 insertions(+) create mode 100644 tests/tcg/mips/include/wrappers_mips32r6.h create mode 100644 tests/tcg/mipsel/test_mips32r6_logic.c diff --git a/tests/tcg/mips/include/wrappers_mips32r6.h b/tests/tcg/mips/in= clude/wrappers_mips32r6.h new file mode 100644 index 000000000000..316aa69ef582 --- /dev/null +++ b/tests/tcg/mips/include/wrappers_mips32r6.h @@ -0,0 +1,61 @@ +/* + * Wrappers for MIPS32R6 instructions operating on 32-bit values + * (32-bit counterpart of wrappers_mips64r6.h). + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#ifndef WRAPPERS_MIPS32R6_H +#define WRAPPERS_MIPS32R6_H + +#include + +#define DO_MIPS32R6__RD__RS(suffix, mnemonic) \ +static inline void do_mips32r6_##suffix(const uint32_t *input, \ + uint32_t *output) \ +{ \ + __asm__ volatile ( \ + "lw $t1, 0(%0)\n\t" \ + #mnemonic " $t0, $t1\n\t" \ + "sw $t0, 0(%1)\n\t" \ + : \ + : "r" (input), "r" (output) \ + : "t0", "t1", "memory" \ + ); \ +} + +#define DO_MIPS32R6__RD__RS_RT(suffix, mnemonic) \ +static inline void do_mips32r6_##suffix(const uint32_t *input1, \ + const uint32_t *input2, \ + uint32_t *output) \ +{ \ + __asm__ volatile ( \ + "lw $t1, 0(%0)\n\t" \ + "lw $t2, 0(%1)\n\t" \ + #mnemonic " $t0, $t1, $t2\n\t" \ + "sw $t0, 0(%2)\n\t" \ + : \ + : "r" (input1), "r" (input2), "r" (output) \ + : "t0", "t1", "t2", "memory" \ + ); \ +} + +DO_MIPS32R6__RD__RS(CLO, clo) +DO_MIPS32R6__RD__RS(CLZ, clz) +DO_MIPS32R6__RD__RS(BITSWAP, bitswap) + +DO_MIPS32R6__RD__RS_RT(SLLV, sllv) +DO_MIPS32R6__RD__RS_RT(SRLV, srlv) +DO_MIPS32R6__RD__RS_RT(SRAV, srav) + +DO_MIPS32R6__RD__RS_RT(MUL, mul) +DO_MIPS32R6__RD__RS_RT(MUH, muh) +DO_MIPS32R6__RD__RS_RT(MULU, mulu) +DO_MIPS32R6__RD__RS_RT(MUHU, muhu) + +DO_MIPS32R6__RD__RS_RT(AND, and) +DO_MIPS32R6__RD__RS_RT(NOR, nor) +DO_MIPS32R6__RD__RS_RT(OR, or) +DO_MIPS32R6__RD__RS_RT(XOR, xor) + +#endif diff --git a/tests/tcg/mipsel/test_mips32r6_logic.c b/tests/tcg/mipsel/test= _mips32r6_logic.c new file mode 100644 index 000000000000..b640aa0975b5 --- /dev/null +++ b/tests/tcg/mipsel/test_mips32r6_logic.c @@ -0,0 +1,60 @@ +/* + * MIPS32R6 tests: logical instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include + +#include "../include/tap.h" +#include "../mips/include/wrappers_mips32r6.h" +#include "../mips/include/test_inputs_32.h" + +typedef void (*binary_op_32)(const uint32_t *, const uint32_t *, uint32_t = *); +typedef uint32_t (*ref_op_32)(uint32_t, uint32_t); + +static uint32_t ref_and(uint32_t a, uint32_t b) { return a & b; } +static uint32_t ref_nor(uint32_t a, uint32_t b) { return ~(a | b); } +static uint32_t ref_or(uint32_t a, uint32_t b) { return a | b; } +static uint32_t ref_xor(uint32_t a, uint32_t b) { return a ^ b; } + +static int check_op(const char *name, binary_op_32 op, ref_op_32 ref, + const uint32_t *input, size_t count) +{ + int fail =3D 0; + + for (size_t i =3D 0; i < count; i++) { + for (size_t j =3D 0; j < count; j++) { + uint32_t a =3D input[i], b =3D input[j], res =3D 0; + + op(&a, &b, &res); + if (res !=3D ref(a, b)) { + TAP_INFO("%s: %08x, %08x: got %08x expected %08x", + name, a, b, res, ref(a, b)); + fail =3D 1; + } + } + } + return fail; +} + +static int run(const char *name, binary_op_32 op, ref_op_32 ref) +{ + int ret =3D 0; + + ret |=3D check_op(name, op, ref, b32_pattern, PATTERN_INPUTS_32_SHORT_= COUNT); + ret |=3D check_op(name, op, ref, b32_random, RANDOM_INPUTS_32_SHORT_CO= UNT); + tap_report(!ret, "MIPS32R6 logic %s", name); + return ret; +} + +int main(void) +{ + TAP_START(); + run("AND", do_mips32r6_AND, ref_and); + run("NOR", do_mips32r6_NOR, ref_nor); + run("OR", do_mips32r6_OR, ref_or); + run("XOR", do_mips32r6_XOR, ref_xor); + + return tap_done(); +} diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build index 1951c3c437fb..d64cf50f5a05 100644 --- a/tests/tcg/mipsel/meson.build +++ b/tests/tcg/mipsel/meson.build @@ -63,3 +63,32 @@ if 'qemu-mipsel' in emulators } } endif + +tests =3D [] + +tests_mips32r6 =3D [ + 'test_mips32r6_logic.c', +] + +foreach src: tests_mips32r6 + tests +=3D { + src: { + 'cflags': ['-mabi=3D32', '-march=3Dmips32r6'], + 'qemu_args': ['-cpu', 'mips32r6-generic'], + 'protocol': 'tap', + } + } +endforeach + +if 'qemu-mipsel' in emulators + tcg_tests +=3D { + 'mips32r6el-linux-user': { + 'cc': 'mipsisa32r6el-linux-gnu-gcc', + 'cc_dockerfile': 'debian-all-test-cross', + 'folder': 'mipsel', + 'gdb_arch': 'mipsel', + 'qemu': emulators['qemu-mipsel'], + 'tests': tests, + } + } +endif --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384807; cv=none; d=zohomail.com; s=zohoarc; b=GzaVGZbxwUMVf9FW5N7vI6DIFFCnDBnQIsjvCzHpll+ARZ6PMUnWgOt4s0TjI2DOwwZbVo3BwkWXRVXK7kyJikvgHk5Sfu1zFgQZhanCedR+dK0HUrOARjBVQ6lWtkjQpKSjLiFx5VFECz+7SV09w8KCaK2Em5lwZ4ntQbP79vE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384807; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6knj1FqNDjOOPz6rPUgsAINPofFtFMiUO9a4F7H+3+M=; b=RLOJESYukIGArJddlkD5h+tVtMYdebNjrqyjx9+LfuXWZjyGoSKbfWdIexeCqH23Zt7buF5+VwFZ9RqGKzVeS/epZTwzCYTp5KhMS15mggx34sSpNdwuIlAN54DbjUkbMuLMgqWAYTeYtUva5IawGS5PW/hAFbcdXiGfBYX67F4= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384807072679.2787620129978; Fri, 30 Oct 2026 11:26:47 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrJB-0005B5-9r; Fri, 30 Oct 2026 14:26:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrJ6-000522-I9 for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:28 -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 1xMrJ4-0002Nd-M3 for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:28 -0400 Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHu2nw839496 for ; Fri, 30 Oct 2026 18:26:25 GMT Received: from mail-qv1-f71.google.com (mail-qv1-f71.google.com [209.85.219.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme754e47-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:26:24 +0000 (GMT) Received: by mail-qv1-f71.google.com with SMTP id 6a1803df08f44-91becce058aso21341766d6.0 for ; Fri, 30 Oct 2026 11:26:24 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4abf5b289f7sm76646045e9.5.2026.10.30.11.26.21 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:26:22 -0700 (PDT) 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= 6knj1FqNDjOOPz6rPUgsAINPofFtFMiUO9a4F7H+3+M=; b=oYBsTUzIxt2f4aIt ktodsBKeqEFxMGo1scBGGpgng96LrDfRbLdKo+1MQsHaYuEy0CLCIgMWs80s/19L HHcCs4nRnEZuFt1yJToYQ0JEua92OERQaONrY/rLEnUHpJ0YDqQu+eY+U/6782bo tB9dhECD0zcWRuwWCEIx0YbhAtN6bcYn4dISXVXxl8a6kN9fMuQtoWnHwWVmaTmm U8SJVJdNIGuzRFJYPFbKojF/yPsD+Yv/YOUTHnCO7nQY8wYAP7sxBOyT1Kx6wj2M HIgW3nN2YBGbROiEB6twIBzd2fB5r2T9rBZ1Z+OxlsVptcqaEu21bYwDaRy7wUB6 bPHOMQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384784; x=1793989584; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=6knj1FqNDjOOPz6rPUgsAINPofFtFMiUO9a4F7H+3+M=; b=idUanCwzGLY+IlY5Jg8PDU55bcLeok7EljKaGJZ37hIJ5y9nghjIp+fya7S0L7NGIs xBBK2l0fFIu4BEhRgJ11SF5T9ymSkVI7BDYVtm2nUnZeM23Bp5zsU0BAxnykTDAltsiF 5vmj1QOYNzlpAkikpWVUCnE9AfFtGau/HFLTBdwXkRbDYqCA9kANUWsy6H0C4yf0fVOd KUONSIvIL4JZfD7I1IyxLIUtQY//iwGN2Jw1y0cJy6TYjKcvR7+RPMhu+lp6bW11mvjq xLWBVwCWueuaX2563pcw+PDMIs4Z6sT3ENTmYLPJ60yKonaMmJq1o5uY7++XXo3mvq/q vq6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384784; x=1793989584; h=content-transfer-encoding:content-type: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 :content-type; bh=6knj1FqNDjOOPz6rPUgsAINPofFtFMiUO9a4F7H+3+M=; b=RkBycWvpRbXNsJQdI8FCWJdIxStz7Rs7+gn/V3IWY8DPhXnt+NjIxJ77Yl1ejWvTTw CYsZ/lRfAuAKISz9P7wVH50N4gDcsBXqrQbZuo2xpVmFK6r3RFuoWQ18BfjKPAibRMdT G4dTKpj2WujwJqCFfXRenj2mm4+LFm9yplxRulYgH/8HjNJZhsWDFDruwuXbnHH1VHpa wgFzsSR+ZKdW6RReHsB3uP740EZVKik7L39qz+Vyhe/UP2mN+BMvrB084WMYxtv82P27 EsjXWIz/Hr53erP4RDFz2je3aE9t19hVpmPIAmYYd7xu8DJbI25wpZUSORMTjpw6l7UL M3Lg== X-Gm-Message-State: AFq9FYLlnODAiQLhDCAtxXWlRpp/FLdZ4Ha2mqFouzEzqsvsnMZjplXw wdxdCjip6n5s2aDrJ5zbouGANXnARtk6r0baAJFuNzLEfGtYX0uNlMQCIw82k/bYs2i8ASdfU2J iC87h93p3LO7f0Bd4CH+pzft0m78Zai6gEmUJjI6pdY2z4bt/yNhVjL292VXWbYoZ0Di8 X-Gm-Gg: AYBFou2tnDN3ZZgs1axDN+7p+qlslbkC/AMjA0Jaa14YZBS/qG8c4D6SGiyDov3v6S0 GeEHlyhVo1ltyQ9mLK0on6Yz7vnfCrr+/eIKu5vyR0RexXoZ4eS9NpGkvROy96da9qGfOqBKQ86 cIYdoAbYt2FE0G8jXTVWG4eP2q2QL5T8T/jaF0yke6N9hbZzUzmjZD8vkI0/U4dP309zRekJStr ASLGq1OQosQTdtXYsuBDNWu7CKw4aAuJ0Na1oJ7IwbRUKknpv9gdw1+mSGP0o/HGiEFUZRTw/hn ehOmA3KW/0Tr6jQspUXLi74IKOk8M5xhBVsI3zxS6b5s9Aar4G66EgEt3YQWPh0Ybxom/JRsJf9 hF5a5h9hm23U/x+J8l9X1unt1Dj+imr33o85RoJxc1Pia8JcODMEotjV/0hCB18Dy3X9og4foje UtVCKMcfVR+6J/Xkb6i8dbNKpgzzx6Tg== X-Received: by 2002:a05:620a:29d4:b0:93a:82a:71e5 with SMTP id af79cd13be357-944216f062fmr521201285a.19.1793384783659; Fri, 30 Oct 2026 11:26:23 -0700 (PDT) X-Received: by 2002:a05:620a:29d4:b0:93a:82a:71e5 with SMTP id af79cd13be357-944216f062fmr521196285a.19.1793384783207; Fri, 30 Oct 2026 11:26:23 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 04/12] tests/tcg/mipsel: Add MIPS32R6 shift tests Date: Fri, 30 Oct 2026 19:25:37 +0100 Message-ID: <20261030182546.2508-5-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: ys2dUs85ayLiojGZYZNiflKmagJzTtHI X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX8QoAFsAz8fdV npd48OhBpJuewFQ8KPDM3ovL9p3X/woAeCTPBQ5GMoTHnwJlwei0iSpoxUzlqbjDcuyiR3VM7/s /MvN6igNEnm/CTd0OmOfHlS9fLc7CztUeKbde+RioG19/RM6ESPID438Q2rd1llUpfFmnoBp1oL o5CE71+Xiz82TKY8oCDz6rxkGVy1Ld5WO16LuAgbs3yJYd6Kq0r6dsvs9p+p6E9xamFarP9BVMC ik/oGPPN/3QY1JXQ+iTVHRIPdkldphx2orcwGDOE+a36G6tYglIOvCVCoX/Q0GXD8yP7rU0fUoA W9LhWofgGXFyLTq7fAOWvdiIb95zllsnSJCdjw4+WlF90sqIxpbH2F4FhMgHDpPyHkcofDSY9xV 7Tj2iwQa3Mdh4kWv+7o4kk369TZiXKcQEo/mhfsaVtXlnOiW/nLEZcIhmhbV81/hOXYxS7P4o1i O2Rito6toLAuIo2fQ4Q== X-Proofpoint-ORIG-GUID: ys2dUs85ayLiojGZYZNiflKmagJzTtHI X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX5gX3FMOqwxP2 LWL20x4j8vTfGk0j8HtekA8d4GfuUYzqUyedySXNhRIB2bQtKNYUsKRzq+9NMy2c4qP704j1K3p XxedAxHrEoLi4O3FKxq0Wh5yatXAGnw= X-Authority-Analysis: v=2.4 cv=KdtHIgYD c=1 sm=1 tr=0 ts=6ae4e150 cx=c_pps a=UgVkIMxJMSkC9lv97toC5g==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=uLWhfN5tPcu-BnL75HQA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1HOtulTD9v-eNWfpl4qZ:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 phishscore=0 suspectscore=0 priorityscore=1501 malwarescore=0 adultscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384809085158500 Test SLLV, SRLV and SRAV. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mipsel/test_mips32r6_shift.c | 73 ++++++++++++++++++++++++++ tests/tcg/mipsel/meson.build | 1 + 2 files changed, 74 insertions(+) create mode 100644 tests/tcg/mipsel/test_mips32r6_shift.c diff --git a/tests/tcg/mipsel/test_mips32r6_shift.c b/tests/tcg/mipsel/test= _mips32r6_shift.c new file mode 100644 index 000000000000..0594796709f3 --- /dev/null +++ b/tests/tcg/mipsel/test_mips32r6_shift.c @@ -0,0 +1,73 @@ +/* + * MIPS32R6 tests: shift instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include + +#include "../include/tap.h" +#include "../mips/include/wrappers_mips32r6.h" +#include "../mips/include/test_inputs_32.h" + +typedef void (*binary_op_32)(const uint32_t *, const uint32_t *, uint32_t = *); +typedef uint32_t (*ref_op_32)(uint32_t, uint32_t); + +/* Only the low 5 bits of the shift amount (rs) are used. */ +static uint32_t ref_sllv(uint32_t a, uint32_t b) { return a << (b & 31); } +static uint32_t ref_srlv(uint32_t a, uint32_t b) { return a >> (b & 31); } +static uint32_t ref_srav(uint32_t a, uint32_t b) +{ + return (uint32_t)((int32_t)a >> (b & 31)); +} + +static int check_one(const char *name, binary_op_32 op, ref_op_32 ref, + uint32_t a, uint32_t b) +{ + uint32_t res =3D 0; + + op(&a, &b, &res); + if (res !=3D ref(a, b)) { + TAP_INFO("%s: %08x, %08x: got %08x expected %08x", + name, a, b, res, ref(a, b)); + return 1; + } + return 0; +} + +static int run(const char *name, binary_op_32 op, ref_op_32 ref) +{ + int ret =3D 0; + + /* Value/amount pairs from the input tables. */ + for (size_t i =3D 0; i < PATTERN_INPUTS_32_SHORT_COUNT; i++) { + for (size_t j =3D 0; j < PATTERN_INPUTS_32_SHORT_COUNT; j++) { + ret |=3D check_one(name, op, ref, b32_pattern[i], b32_pattern[= j]); + } + } + for (size_t i =3D 0; i < RANDOM_INPUTS_32_SHORT_COUNT; i++) { + for (size_t j =3D 0; j < RANDOM_INPUTS_32_SHORT_COUNT; j++) { + ret |=3D check_one(name, op, ref, b32_random[i], b32_random[j]= ); + } + } + /* Every shift amount (including ones with ignored high bits). */ + for (size_t i =3D 0; i < PATTERN_INPUTS_32_SHORT_COUNT; i++) { + for (uint32_t sa =3D 0; sa < 64; sa++) { + ret |=3D check_one(name, op, ref, b32_pattern[i], sa); + } + } + tap_report(!ret, "MIPS32R6 shift %s", name); + return ret; +} + +int main(void) +{ + int ret =3D 0; + + TAP_START(); + ret |=3D run("SLLV", do_mips32r6_SLLV, ref_sllv); + ret |=3D run("SRLV", do_mips32r6_SRLV, ref_srlv); + ret |=3D run("SRAV", do_mips32r6_SRAV, ref_srav); + + return tap_done(); +} diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build index d64cf50f5a05..3c40a556ad46 100644 --- a/tests/tcg/mipsel/meson.build +++ b/tests/tcg/mipsel/meson.build @@ -68,6 +68,7 @@ tests =3D [] =20 tests_mips32r6 =3D [ 'test_mips32r6_logic.c', + 'test_mips32r6_shift.c', ] =20 foreach src: tests_mips32r6 --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384813; cv=none; d=zohomail.com; s=zohoarc; b=e+/RPgjcG+OmFX4ZYwqRye/6YbrH6KOVVSGdaRAREFKRChPP4nU4kwVEgfU2FysHefoD556Zztcu4CAkDaRi1AoGnsgxsGUbiYnMKsWEZCYemap3xeGlpSu1vjz66hBWf1oBUAvdLsRoDci4Z+6HQiD8Ej063qANfGn05Wd05/s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384813; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=/ppuAHVKzdnaZcaz0VZJLUE/73N1uz51RNcxnbHlXUU=; b=GFDQ06vEtoqFKBpWaWAs45TnlNno1v5LmLSnuPNMWqdUgh46yS6VSmJpnbyIMi+rc0lhRMB+e/QIa0aiUHU4jyR6nkEgdvmWmBgcuBTs77p6AgS8lJBo8R0lMZaby7dx7/KofDzYYqACbYJ/ptdeqpwP4+/sT2Z9Wm1ZLLU1G+k= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384813766746.0962744744179; Fri, 30 Oct 2026 11:26:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrJP-0005L1-2Z; Fri, 30 Oct 2026 14:26:47 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrJH-0005FS-3X for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:39 -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 1xMrJE-0002O3-IT for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:38 -0400 Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHu2xM4011198 for ; Fri, 30 Oct 2026 18:26:34 GMT Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmc69-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:26:34 +0000 (GMT) Received: by mail-ua1-f71.google.com with SMTP id a1e0cc1a2514c-9905fc56b60so829656241.1 for ; Fri, 30 Oct 2026 11:26:34 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b8c0b6sm4244898f8f.41.2026.10.30.11.26.31 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:26:31 -0700 (PDT) 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= /ppuAHVKzdnaZcaz0VZJLUE/73N1uz51RNcxnbHlXUU=; b=Cz0yPf5PldBy4sRK LIj5pZEIjrFOKSwZPo0rL7oPBMOgL9zBrMci0LDsJZMrJZcnJR8YAdT3t/oRWTiM +ZEq0/6zehd0o29W1dZBoNiEUwIZyB/oz1B1U+GAYHXWDKr7FnshXvx1BHu5d+WS +Yj0NRQZ4q17l7gSo8IFbVnbf2ABC5ydgVxgHRH6HNNf7XQqhR66AK97C5QWxciR E1ofIQdQGIux480p0Qo5Mcb7f/cdDMVw+aM7u9+ktrM1Mzllq2G84Ej6a2pvRvVN DDDxBEolbFHFyBpzDtAUfBO+tgyUibbAmZ+nXtSPWKgumaXFfXBTjf1n79CIc/1P dfEUAw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384794; x=1793989594; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=/ppuAHVKzdnaZcaz0VZJLUE/73N1uz51RNcxnbHlXUU=; b=XsNHBKEh5WBSHEctWY0qAgPEhj/n44FK62dR7A8W0gyzdpfh65Cmc45icCEsYEDmVt pUfPK56PPA57FlvExuU0XxINg5PV0ee7pS70ltv22iqYOm5trtydnNK/FtpaheaTcdzW cTBHGLj5q93xJp6dust3xK1apYxW9Oqe76IWVy6DPqQOwld4cYJIP/NntRd0PFigGVgG OiFEi7kiQFii/6xB6y4n/e9u92urpjtfFR8r+d8VU/cd/AZIeQuHxoz87nXA5BSYWOgN GMxsfDcuLuef1nz6Tyge2byAJ2eamincx7jkW1j3X/ylzp9zXk91yKNFzRQLyq3/zEp/ SpoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384794; x=1793989594; h=content-transfer-encoding:content-type: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 :content-type; bh=/ppuAHVKzdnaZcaz0VZJLUE/73N1uz51RNcxnbHlXUU=; b=kaUzf7G66i7ER9nxbLeuo7XDhXNT+lRDUJosB9Dk0bamc4B/334QhGAvR+itXO3opg RH3tZn9mCO4AqV4MicS8UPpWdLEJmwSomIOxDuLTLqLa0kU041sbzuuPBT8cjJmlMn19 g4ovqBvdOEL1CXRM6Eab1D9gNBRu/nVFjZxTXG4zsmurYNqEUMLQgbMVaypssPV5l3mK nT9+xYz3YqiEsVbUzwqpVHBH/2YYK/2Rsma4ZDaBrs0ny2IZHDbrt2CtO8B5EZ7T3ozq s9fHNrWcxnaud3ErRy03z46kfjC1Vdlvrr18nR720wjlCRxXSuioW3ip3BtkNSenu6zN QF2g== X-Gm-Message-State: AFq9FYLz7KCle2rDMCFlCoIs6KcJEC/7gPHEyZ5aDmmpRDIOQIl1O1Zf lO11TULeoknpWvoEapVgtK7I5Y4tjblNG+LGGr5yzLAevJjsRC9DTkLlwpn+US/y9rqoRpkbBZp N0fr3W+xhhGacuC0Iz55ypWsNHwaEqSBb6QjhbQA7Vgz2Rke/gJPIUobu4XSxln/IZP+D X-Gm-Gg: AYBFou0htGfDoGnfg/gvJoB+B/fiC0waDzGhLuQXnlEk+DgHc0wseR8IBlWisRpDKwl wr66SMyfrSZ5G6OeHK6ytXJ3iwiIA/mi/e/9S5CdfH3ALfMvmmwZMVg9iTnslIaN6O9ojgVwCv4 WPpsW+BtqkNft59VvY83KrHOf4AyS+ACPWygLSkKfs7xXmdThrgO2TnBpRm3yyoYrHtY8dbZbc2 b9+RNrscbLgS1gCinH4UC9J12L65SVgwVwaTKNymej4i3H3T3rPydEDsUGQcTA1hrZM7NYGBpCO NLdXzuMmS0wSr/hQSfk0Vf6H8XKrrNVhDdGxm0SnQ+bho9+Z7ON8ZMp12sGG+NafNDDZVPNHwQE FyNxNrYGdhgOmeIzjiXiP2cY0k9EDniDq7iKggic6Yjg9ClkFq9AMr0sWad9Ui3YWdXCmZb9jmq cqiQSS+obCPgmxSbPzkfXMlLR30Qt2aw== X-Received: by 2002:a67:e112:0:b0:7b0:bd98:68df with SMTP id ada2fe7eead31-7d0543acf6dmr1734066137.41.1793384793704; Fri, 30 Oct 2026 11:26:33 -0700 (PDT) X-Received: by 2002:a67:e112:0:b0:7b0:bd98:68df with SMTP id ada2fe7eead31-7d0543acf6dmr1734052137.41.1793384793231; Fri, 30 Oct 2026 11:26:33 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 05/12] tests/tcg/mipsel: Add MIPS32R6 bit operation tests Date: Fri, 30 Oct 2026 19:25:38 +0100 Message-ID: <20261030182546.2508-6-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-ORIG-GUID: 5xuKWk4QGdQAE2Rieu58D0Y58hz7P1Ni X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX9QlOBpIcOK/i p5WDaW+qZg2V6IByy9tDHE7VxNDRPwdXnu5PSL73/kt7JckAbvwieuNCjY2e4NO+vAeEMDXZLlK 35OokSa4f+Bh1253QTJUffahKnlPlCc= X-Authority-Analysis: v=2.4 cv=DfSCOftW c=1 sm=1 tr=0 ts=6ae4e15a cx=c_pps a=KB4UBwrhAZV1kjiGHFQexw==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=gowsoOTTUOVcmtlkKump:22 a=EUspDBNiAAAA:8 a=xpWpbzVTnifO-OPWo9MA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=o1xkdb1NAhiiM49bd1HK:22 X-Proofpoint-GUID: 5xuKWk4QGdQAE2Rieu58D0Y58hz7P1Ni X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfXz9dyzt/A4xXO pCkB0odnIrVN6GI/+TwdMHDJp4ptVjgB2142Opb1obwElYR6qTWTbAeMZowfgncuACsecn5s/vn l6mSHfvvvhW4B3IwvUcGNttzihPXnc9yo78qtC+VMe1TJ0xW873xUJRUWXL9IjZc1o3owIkDqAc RrhPbtUYoGFkhwKdOJN5DJTD+BHqbJ+CzgMvqIGSFnzWrK+3kj2aRU+LaBf360b5bowCS6yb5h5 Mrq/CzbMwsv3UGWCwFbNgkXw1xaLokGaXCfqUAJ1KvDGN5dKPo8Z478f4AdshNWidSQYtIPn3hr fcakO/ZfmcwJKOYQx3ueV4WjKFiLQVc65C/HqfzVeiMCU7KRR00vr9FHaDAstiCI8D9IoAOKSca 8XgOFGNZ2QpYYYvLQZa0aORIg/ufzt/cIC5pBSZn/rVEaY2Z817hNR+uBkncu92/SqexkPhretC Z2lxi1byfwSLB9r+9Lw== X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 malwarescore=0 adultscore=0 priorityscore=1501 spamscore=0 phishscore=0 bulkscore=0 lowpriorityscore=0 clxscore=1015 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384815169158500 Test CLO, CLZ and bitswap. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mipsel/test_mips32r6_bitops.c | 79 +++++++++++++++++++++++++ tests/tcg/mipsel/test_mips32r6_shift.c | 8 +-- tests/tcg/mipsel/meson.build | 1 + 3 files changed, 83 insertions(+), 5 deletions(-) create mode 100644 tests/tcg/mipsel/test_mips32r6_bitops.c diff --git a/tests/tcg/mipsel/test_mips32r6_bitops.c b/tests/tcg/mipsel/tes= t_mips32r6_bitops.c new file mode 100644 index 000000000000..8546209b50dd --- /dev/null +++ b/tests/tcg/mipsel/test_mips32r6_bitops.c @@ -0,0 +1,79 @@ +/* + * MIPS32R6 tests: bit operations instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include + +#include "../include/tap.h" +#include "../mips/include/wrappers_mips32r6.h" +#include "../mips/include/test_inputs_32.h" + +typedef void (*unary_op_32)(const uint32_t *, uint32_t *); +typedef uint32_t (*ref_op_32)(uint32_t); + +static uint32_t ref_clz(uint32_t a) { return a ? __builtin_clz(a) : 32; } +static uint32_t ref_clo(uint32_t a) { return ref_clz(~a); } + +/* BITSWAP reverses the bit order inside each byte. */ +static uint32_t ref_bitswap(uint32_t a) +{ + uint32_t res =3D 0; + + for (int byte =3D 0; byte < 4; byte++) { + for (int bit =3D 0; bit < 8; bit++) { + if (a & (1u << (byte * 8 + bit))) { + res |=3D 1u << (byte * 8 + 7 - bit); + } + } + } + return res; +} + +static int check_all(const char *name, unary_op_32 op, ref_op_32 ref, + const uint32_t *input, size_t count) +{ + int fail =3D 0; + + for (size_t i =3D 0; i < count; i++) { + uint32_t a =3D input[i], res =3D 0; + + op(&a, &res); + if (res !=3D ref(a)) { + TAP_INFO("%s: %08x: got %08x expected %08x", + name, a, res, ref(a)); + fail =3D 1; + } + } + return fail; +} + +static int run(const char *name, unary_op_32 op, ref_op_32 ref) +{ + int ret =3D 0; + + ret |=3D check_all(name, op, ref, b32_pattern, PATTERN_INPUTS_32_COUNT= ); + ret |=3D check_all(name, op, ref, b32_random, RANDOM_INPUTS_32_COUNT); + /* Every leading-run length, for both polarities. */ + for (int n =3D 0; n < 32; n++) { + uint32_t v[2] =3D { 0xffffffffu >> n, ~(0xffffffffu >> n) }; + + ret |=3D check_all(name, op, ref, v, 2); + v[0] =3D 1u << n; + v[1] =3D ~(1u << n); + ret |=3D check_all(name, op, ref, v, 2); + } + tap_report(!ret, "MIPS32R6 bitops %s", name); + return ret; +} + +int main(void) +{ + TAP_START(); + run("CLO", do_mips32r6_CLO, ref_clo); + run("CLZ", do_mips32r6_CLZ, ref_clz); + run("BITSWAP", do_mips32r6_BITSWAP, ref_bitswap); + + return tap_done(); +} diff --git a/tests/tcg/mipsel/test_mips32r6_shift.c b/tests/tcg/mipsel/test= _mips32r6_shift.c index 0594796709f3..6828e90dd8af 100644 --- a/tests/tcg/mipsel/test_mips32r6_shift.c +++ b/tests/tcg/mipsel/test_mips32r6_shift.c @@ -62,12 +62,10 @@ static int run(const char *name, binary_op_32 op, ref_o= p_32 ref) =20 int main(void) { - int ret =3D 0; - TAP_START(); - ret |=3D run("SLLV", do_mips32r6_SLLV, ref_sllv); - ret |=3D run("SRLV", do_mips32r6_SRLV, ref_srlv); - ret |=3D run("SRAV", do_mips32r6_SRAV, ref_srav); + run("SLLV", do_mips32r6_SLLV, ref_sllv); + run("SRLV", do_mips32r6_SRLV, ref_srlv); + run("SRAV", do_mips32r6_SRAV, ref_srav); =20 return tap_done(); } diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build index 3c40a556ad46..0c43c31e7355 100644 --- a/tests/tcg/mipsel/meson.build +++ b/tests/tcg/mipsel/meson.build @@ -67,6 +67,7 @@ endif tests =3D [] =20 tests_mips32r6 =3D [ + 'test_mips32r6_bitops.c', 'test_mips32r6_logic.c', 'test_mips32r6_shift.c', ] --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384848; cv=none; d=zohomail.com; s=zohoarc; b=F81smTOJyaVlMPcvWuSkaIRqVXOtcKXpHtLVSul0IoF+gciKE6id9oi6cQkUEMpou4Z1VCSWAdqOY8/dilFuLK7pcCs61n1mcXQd2wUAkwgnBfKtFogYxCgfNBeXVO4MxhfqahljxJeQQF9wFnh5g35Bm1Qurfih38fFJGQN034= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384848; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=vNVWGdOVkLyuYQuMwSc51RTwjflq/O6HmabTzbjht1w=; b=Ate/z55vxV+1ZDUFgcnAe4EniG2eqHVr+Gx05+/gV1iBs+lsviq6jb3KhRQQNMkijGU+YgOnD0Tq3+hINgJLHnUBy57V4AiyhvYHsEWIZcq8pZUVXNe13U8JetVyRZUdht7A5hDyO6CG+STsjYYQ5IvKvJe1fJNVDLF4zGcoeLs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384848078320.9659441860763; Fri, 30 Oct 2026 11:27:28 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrJV-0005ae-D6; Fri, 30 Oct 2026 14:26:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrJO-0005LF-W5 for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:47 -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 1xMrJK-0002OV-VA for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:44 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHuRAW411176 for ; Fri, 30 Oct 2026 18:26:42 GMT Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qvd6s-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:26:41 +0000 (GMT) Received: by mail-ua1-f72.google.com with SMTP id a1e0cc1a2514c-99082f450bfso764208241.2 for ; Fri, 30 Oct 2026 11:26:41 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b79059sm4803702f8f.30.2026.10.30.11.26.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:26:39 -0700 (PDT) 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= vNVWGdOVkLyuYQuMwSc51RTwjflq/O6HmabTzbjht1w=; b=aCidrasexKOOoaHd lXbG+FMJlyeY20Ashs0qqBhxvp6MCes87jWU55OTRcixNcd+Dew2DgVI+qHC/FgF u1WUcs+ru5JQi6FKpQT8JR/kPiFXW2X7bGwCVsOrw39c+6W956bNV7m83NLghgGW BUJm2BAdMF8KJxpBHHxxdWjfkJRsH3qTJD2zjx0m1Xtm57RbI2zfhNghmRo9TJBl sU4PaIhaEmJLK6VZBQIeABDpjM1GN7SshIvkNoa5XaoRCf0qN3d443G1rayByXb4 0eGdPMrYyADht9ndhX4qeMvsNVFzuewZO2/mouWdy6vXrCP/P/biG/WQyNxVfW5/ wy++EA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384801; x=1793989601; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=vNVWGdOVkLyuYQuMwSc51RTwjflq/O6HmabTzbjht1w=; b=Q3rDvu106asEDkWAXCi6EX5tpXOs3lNky6wk8s7MdYy7XLgpH5vF9XW+FJafVd+UKe qhi+cqra53ZbdalI36ZgZLeZm5FkdA97E82fZG7zCjLblZNEUj835nBkqKE/9+sOgcT2 uLz5p2vSv7RDkJU5er3XWKmTsFoKFHO0yAT4HBdhyx5OJqYO8k2/QYK6qRBqFHT1aDu1 kPH9m0esiJjQ0UG3vH6WdjJLuAcanIcpS3Nke4MtT/a4a/X+PiWfYmbuohGOZ2wEavQ3 gCNqlbFK6kWiVirth1phlX4tmm2mfdi5KhIR/lbjdZw13iVhth8dCaVwqLKBsFp/v5HL xlQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384801; x=1793989601; h=content-transfer-encoding:content-type: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 :content-type; bh=vNVWGdOVkLyuYQuMwSc51RTwjflq/O6HmabTzbjht1w=; b=VLVxjHmRGsu3ptfH3k3Jw2BWatSv5YfsNOq9P8tCGVP8BMdWbW4O98pH7lnGfN2a4b +R1UczpLW9Sa3D32yI60a/PdAS1q5Fe0zDbdPnug+8MyoHdJstG9fwDkmwIfYVd6vdVW wI8ACJREC9vcvIBitGIg1ZYTg3lCcWDtFkLfo8QjgPQ0JzrT3izYsb0DVw8Q7sxEkECC N2TMX5rA0/r8kyhYrjo4nDILD+kPVkik7hEXMIjwQh/HmsU5fICVLjjzIo2m7NH22I7I GeAFH8D1Bsf+YpHGFXTahf88C/+qpyFJeHj/oLTK8RlAdvzb9NoZ072G4GWoo31ZY87L S2mg== X-Gm-Message-State: AFq9FYJgN4t9vgPdLOX4F+UX+Po7vGAJAf5p4bcAWLTlxoEmi7swKHF7 3vO9T6br52C6oYK/3wzl672oD1jpgOExmNP+6W3T0ksGqXjpOSw7EkdQIn7qKMPWzOBYR7FoCH7 5TfwUluDX2XcxZ1dw1Tg4ydUElpzEa2+F97j28t+uWwTvnkkIgurbvuXmrn5opcINA4NQ X-Gm-Gg: AYBFou39d1oEFbXzrDxZ0npfU6NhK2Cr1Ypo82YxQfUwVvKrBvXfD8TnquhLtsPN2zC T3+jDWGQ9fRMinHATTqjTg70ijsX627YT51yUx/SRUVGT1yWMpsmtXLpMiLT26bY382hWh4k+eD czvFYYmf+Sn3KtcIUA/w70cF1A+52snqr6LUwSTCS8Ldtt4kY/xDeYclCO6HjGcBjPj+vJTs9F+ MhJCNk2mlUb9nrQFBusV21oI/JqeGPOnIUDsAJVMn8NHM1Wi0S1lo0/dR9f7OKBjh02p07+Y3cJ lUbVNDh0OtaktcrVkHMLgf5qGjySw0kzREdNRkJWwAlMaaJVu5yy1dAJe67/XR9aQQktIDwo5DC QDnkX7hBlL5p06nIg/61Hjv0qgi9AtBn8WeUlO4paUOQfKt89RA0uQkcfDFAPvYfUcnU55oAOwe BGzt3/JfuEtsqgKWTt2LFKvG+LM+TY7g== X-Received: by 2002:a05:6102:c4f:b0:7cc:3eb0:6ece with SMTP id ada2fe7eead31-7d072d53fa3mr1813921137.33.1793384801143; Fri, 30 Oct 2026 11:26:41 -0700 (PDT) X-Received: by 2002:a05:6102:c4f:b0:7cc:3eb0:6ece with SMTP id ada2fe7eead31-7d072d53fa3mr1813909137.33.1793384800718; Fri, 30 Oct 2026 11:26:40 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 06/12] tests/tcg/mipsel: Add MIPS32R6 multiply tests Date: Fri, 30 Oct 2026 19:25:39 +0100 Message-ID: <20261030182546.2508-7-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: 9-jOojpZTS1EkAAwE1UbEIBn0hI_vMXS X-Proofpoint-ORIG-GUID: 9-jOojpZTS1EkAAwE1UbEIBn0hI_vMXS X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX/uQVRaAdY/MF Td14nN1TUkiMqXXnhCDV8USiozlqJuhOpfPvCkODmiG8mQmjCsVUJOEpO3s+E3oC+zhCGhy0VGN Z4OnPJaMTJ4EmBAwIM5GJeIi3kMX6Yk67L61itUvaEzY4OWb9tTFNcPR7lP7l2cpz9GC3+4pckz ZjuZeqVMqePo1LGoUxANBJKGcbMd1tmgfoTu2sAgPb0HX+VM/G0uItpMmUMbo1iJ7jqi4t2ppok ZXl5eh9pmNlBL6JLK5SN0kXj0XM0WAiO1Oq17+DjMih5/pePnXcqgEQbgaRLC3UUDTteUKWLZXp zO1TELpDgNkyiFqXs1zWW6JDcxccU/94tn9cyOJCpGUqLANtv5IAsr4WwHjGEqzENF3oZIY7+dD PLpaczE+U7MMRq8OGxFzGQQ3cHbsbgUgBAQwIOlDx81NVeFZnIrtq7uK4uLTOJBbnRxch3+LB1M 4kVd5Vnr1z8HxXpPYcw== X-Authority-Analysis: v=2.4 cv=dPgzC+Zb c=1 sm=1 tr=0 ts=6ae4e161 cx=c_pps a=ULNsgckmlI/WJG3HAyAuOQ==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=ZA5ZHMX5kH83y_G8ek8A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1WsBpfsz9X-RYQiigVTh:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX1p8ui6/VIuvL HXkYYdjqhxMNqjrGuQdi3suV5z682k5rvZzu4JaP1+0Sjr4cgBeFO965tuR3pptQh9YlPQAXDgN q159yyZpzNO6VmBSi12oTdGmbRN2TlQ= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384849846158500 Test MUL[U] and MUH[U]. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mipsel/test_mips32r6_multiply.c | 75 +++++++++++++++++++++++ tests/tcg/mipsel/meson.build | 1 + 2 files changed, 76 insertions(+) create mode 100644 tests/tcg/mipsel/test_mips32r6_multiply.c diff --git a/tests/tcg/mipsel/test_mips32r6_multiply.c b/tests/tcg/mipsel/t= est_mips32r6_multiply.c new file mode 100644 index 000000000000..17106391107a --- /dev/null +++ b/tests/tcg/mipsel/test_mips32r6_multiply.c @@ -0,0 +1,75 @@ +/* + * MIPS32R6 tests: multiply instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include + +#include "../include/tap.h" +#include "../mips/include/wrappers_mips32r6.h" +#include "../mips/include/test_inputs_32.h" + +typedef void (*binary_op_32)(const uint32_t *, const uint32_t *, uint32_t = *); +typedef uint32_t (*ref_op_32)(uint32_t, uint32_t); + +static uint32_t ref_mul(uint32_t a, uint32_t b) +{ + return (uint32_t)((int64_t)(int32_t)a * (int32_t)b); +} + +static uint32_t ref_muh(uint32_t a, uint32_t b) +{ + return (uint32_t)(((int64_t)(int32_t)a * (int32_t)b) >> 32); +} + +static uint32_t ref_mulu(uint32_t a, uint32_t b) +{ + return (uint32_t)((uint64_t)a * b); +} + +static uint32_t ref_muhu(uint32_t a, uint32_t b) +{ + return (uint32_t)(((uint64_t)a * b) >> 32); +} + +static int check_op(const char *name, binary_op_32 op, ref_op_32 ref, + const uint32_t *input, size_t count) +{ + int fail =3D 0; + + for (size_t i =3D 0; i < count; i++) { + for (size_t j =3D 0; j < count; j++) { + uint32_t a =3D input[i], b =3D input[j], res =3D 0; + + op(&a, &b, &res); + if (res !=3D ref(a, b)) { + TAP_INFO("%s: %08x, %08x: got %08x expected %08x", + name, a, b, res, ref(a, b)); + fail =3D 1; + } + } + } + return fail; +} + +static int run(const char *name, binary_op_32 op, ref_op_32 ref) +{ + int ret =3D 0; + + ret |=3D check_op(name, op, ref, b32_pattern, PATTERN_INPUTS_32_COUNT); + ret |=3D check_op(name, op, ref, b32_random, RANDOM_INPUTS_32_COUNT); + tap_report(!ret, "MIPS32R6 multiply %s", name); + return ret; +} + +int main(void) +{ + TAP_START(); + run("MUL", do_mips32r6_MUL, ref_mul); + run("MUH", do_mips32r6_MUH, ref_muh); + run("MULU", do_mips32r6_MULU, ref_mulu); + run("MUHU", do_mips32r6_MUHU, ref_muhu); + + return tap_done(); +} diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build index 0c43c31e7355..f540d18b3bd2 100644 --- a/tests/tcg/mipsel/meson.build +++ b/tests/tcg/mipsel/meson.build @@ -69,6 +69,7 @@ tests =3D [] tests_mips32r6 =3D [ 'test_mips32r6_bitops.c', 'test_mips32r6_logic.c', + 'test_mips32r6_multiply.c', 'test_mips32r6_shift.c', ] =20 --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384839; cv=none; d=zohomail.com; s=zohoarc; b=X1XX8iwr9huTJiujY19dyRLHMRYNK3k6HEElbIw3qZXALuxSU/Nr706SI2G+r7pmfB70qCb7okB42DbrrYxBkL5Znky0YG0ikk7kceQ7Oh20NqyYaa9G85hDNlW+lckKE6m29QhTcpktdwA8Y8FUQenATVVt8IIav94OMjQKthU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384839; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=2lyv5b79nTQdp4OncOwo6NDlb6bPO/fzYsDUGatZXvw=; b=NAjAEZUGuaptwMAWV7aqy2dFLriaZyRNzHLSiPdjzpaiYeSx8d9eUtbZ0RlfR9/+Vv/9A7/78ehWF7ljHTfdiaSUeq18NKaQRd/135bwtL3Xz020IQrC6dHL4g4kxEh03ScCVjuKniNXleO52mgX9lT9fQTEQkgtZ3DrI+oOrQI= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384839955238.28509678056503; Fri, 30 Oct 2026 11:27:19 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrJb-0005zF-J1; Fri, 30 Oct 2026 14:26:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrJY-0005o6-KS for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:56 -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 1xMrJW-0002PP-Ph for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:26:56 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHuRM8411165 for ; Fri, 30 Oct 2026 18:26:54 GMT Received: from mail-ua1-f72.google.com (mail-ua1-f72.google.com [209.85.222.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qvd7e-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:26:53 +0000 (GMT) Received: by mail-ua1-f72.google.com with SMTP id a1e0cc1a2514c-988bea8fed6so782596241.2 for ; Fri, 30 Oct 2026 11:26:53 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71a4d3f9sm4920719f8f.4.2026.10.30.11.26.47 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:26:49 -0700 (PDT) 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= 2lyv5b79nTQdp4OncOwo6NDlb6bPO/fzYsDUGatZXvw=; b=OFIlwI+BJ4oETDuS tceeRtIxFjbnB+mwyysl9TO2+04QuBCtp3bElipqmuQAJxCXFlclSD2WrGu3BjqK 1WZfGXqce+fQU3eVe9/KwX+e3o4qfrneHD4sMNYsqf/Bhg9Yq1c7o9rTB/hhg2MD NkVG1uQzL0jcCoK76utUMu7YiKBT2rW3W9uRY34nnTFMjf1GQoCLhb4nGeR3MHXZ JkOjcB95017shahnXZIJAlvncHopmBc6DpICk9+DXdGWETO9GTm3rmiZjzPUKmD4 1sOdOZEaq/gGKub9dzOvhXUy5RwhE4Z+F3P++s4ElUXEkKVp4g5bM8JOxXYI3eUW tdhtYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384813; x=1793989613; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=2lyv5b79nTQdp4OncOwo6NDlb6bPO/fzYsDUGatZXvw=; b=hQRH5djSIhma6Kj6r+wkqXGC1Wcs3AhV9n9lsP2xY2KED+Nuqxu0SD2NshbNy3Z5i+ QPgkeSC62T+KVO0yQpTHL7+LnLy6em90K9CGRHOGLeIqkEcE+lxPNeW+uP2605uYUBmH oKGkFG9cDI2p8AzHsy2qimH66VWEG48uyky/U7UrSNo3LO7+LVGFf+Giv1niNfHVRYLT 1rVXusEqm9IHPukmU5x7d6Ir+aTBPQx+Bg4Q3abYcc6bVFunyTqtV/lPN58uqSrWU3vW xBH94M2w9LJ9pX/4oPYduO3Agf4zZHzwvwIZKuhAeTtjqx3N6hv74j5YSK9z3DivMFeG J/ng== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384813; x=1793989613; h=content-transfer-encoding:content-type: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 :content-type; bh=2lyv5b79nTQdp4OncOwo6NDlb6bPO/fzYsDUGatZXvw=; b=qLn2ZUrCik5Ow5R4agztWxMYMQUQQCUEpfMX5pNdSrSmF8htPHWewiKA3377ZDtb/R 9CB/5WX8dwkLBeI2td1etI9xEmNBOC8b/meOEIEck/buhW5A15GFz/Meluxpwz5AUUpv 82I5x9+1WNoDIiXtoMZ1x5cDADOLtS6epbtSUenTLCrgDFv9Ci+zgxWwTP77oXv7Qn6F PT28MK0LyrRU0b45007hUEKYb4hnZVj0fNMGKLcIVTXzPxQuZJXIje999ZFSTsSQgwhL ki/CNgkoH/3qlHVEwVQLASqvo2ZydfRHLLEgo9YcFNZCSyLacv75UslNdIhPGYdnOrZf WTOg== X-Gm-Message-State: AFq9FYLSIPInizk74tjT5itwUylYzBIVcGmyC/hPfMaeF/0zJJ3cN2z8 BOdUX2d3IdbNrip6xgqZP9mbr6bOkkLAdCtKq1XzfNWDwE+4Z3dS16tS+oeFyxSYSuzbOiM8CTz f5RLBkY2UqetlhZBVaW2tiA5dTkilWt+Iw/5JVp0jO6CfJokU+5quWAFh4+eQAHmohw1j X-Gm-Gg: AYBFou2nopN53yc8n8HlRnWCxNJ3tTPqCiUz7j1tto8NseStqEIhH4vn1Up1+dR07s7 UCG0Opx1WjyagLlJXi7/BGXlSbrldhfHX9Y5Wm11nxVc2kienhxqfpZlh3El6aNwehK/YLZ0eNm 0YJg5+hly+OmP3FzB2Putrpfh/y2uLH8tonL778Q2W3Ajlebu5POi4iNS91xuzdZitCyk4yNE3w 5guamh6bT31wqR4P2z5hZdLtkHe1e0mRlm+k1zclgkiuoDHDNfPd5XDX7NfAJW0QpHvUc2gJFRk 5sUyU3tyMvZ63YPZm8Go/nB2OdIzGGAN2bp5R5DiLJaVeBhAiv07w7yct5z8iLEAiZc79ZPDRfr auX8fD+LorH6/Go6r3SK3BwggxzLiMyUIOaMuSntFRC4WxdNuJek3CAhBGzi0Lonm2F6G+ii9/l aiJAKmMRsGDVJekLK7hxGvQjXX5+fp5w== X-Received: by 2002:a05:6102:3ec5:b0:7ce:6289:314 with SMTP id ada2fe7eead31-7d07269900fmr1755346137.14.1793384812761; Fri, 30 Oct 2026 11:26:52 -0700 (PDT) X-Received: by 2002:a05:6102:3ec5:b0:7ce:6289:314 with SMTP id ada2fe7eead31-7d07269900fmr1755326137.14.1793384812226; Fri, 30 Oct 2026 11:26:52 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 07/12] tests/tcg/mipsel: Add MIPS32R6 PC-relative tests Date: Fri, 30 Oct 2026 19:25:40 +0100 Message-ID: <20261030182546.2508-8-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: -E5I8ohcRQ6oqvg6U0nQeCkZs81U1CxR X-Proofpoint-ORIG-GUID: -E5I8ohcRQ6oqvg6U0nQeCkZs81U1CxR X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX2/drvon+KA3w YQphPNSz4fRKdaRqvKl/eogRbd/0TV9qYZYAjnkUbUEPqGrE6ufziU8nhM5EBrpof+GXjbPOlFX wLIjXClV3Kksh+OfVBeDplS5aNpyeApggKj22JlrcpeUqvV4YQLsMFy5UMbblCbtABvB1dqauSN kRiE/zLIVep69W5o9/DHJbabGHfmEBNTbQFQhuMMoa/qCFui+JTsEgqle0kq/x+JJ21Wa4dNM6q qOq3trJS9Y0kGR/PucL+5MPjX9X+gZ6h85d63sbSlQdDIq4Up9339H2olzBAwFMrLmwWU1Tnv1H azS8Z8/rX/RRZuA5HD0tZJMTJ0vmVUOzldqUYguVD1a+IOrM4Nuxy6qz1bZucOc5sNgkm6ou4fx K1+wpCsE5en+38ZmrpYvs8qM5DIQq74S5ndh6PHuWrArMUrYknNZulwNLAqPER2xLGCHqyjrSy6 Lot/aJEzuIwAKtvoVsQ== X-Authority-Analysis: v=2.4 cv=dPgzC+Zb c=1 sm=1 tr=0 ts=6ae4e16d cx=c_pps a=ULNsgckmlI/WJG3HAyAuOQ==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=Qa2biqyKpYfkMrCa2ZwA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=1WsBpfsz9X-RYQiigVTh:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfXwru5rjIWUOXk YLD0/m3p4W5A2FtsHGCP4gzSZLCKiR89en054eOUApb7Q56/3IMpZ63yjyQq1Ni+jhJce5J5KTc HG6+NC3RuWoaCf9e864rePDjfi7bZDo= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384841822158500 Test A[L]UIPC opcodes. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mipsel/test_mips32r6_pcrel.c | 88 ++++++++++++++++++++++++++ tests/tcg/mipsel/meson.build | 1 + 2 files changed, 89 insertions(+) create mode 100644 tests/tcg/mipsel/test_mips32r6_pcrel.c diff --git a/tests/tcg/mipsel/test_mips32r6_pcrel.c b/tests/tcg/mipsel/test= _mips32r6_pcrel.c new file mode 100644 index 000000000000..c93bca0ac06e --- /dev/null +++ b/tests/tcg/mipsel/test_mips32r6_pcrel.c @@ -0,0 +1,88 @@ +/* + * MIPS32R6 tests: PC-relative AUIPC and ALUIPC instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include + +#include "../include/tap.h" + +/* + * Run INSN with the immediate IMM, and probe the address of INSN with a + * second AUIPC (which yields its own address, +4 being INSN's size). + */ +#define PCREL(insn, imm, res, addr) \ + __asm__ volatile ( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + insn " %0, " #imm "\n\t" \ + "auipc %1, 0\n\t" \ + ".set pop\n\t" \ + : "=3Dr" (res), "=3Dr" (addr)) + +static int check(const char *name, uint32_t imm, uint32_t res, uint32_t pr= obe, + int aligned) +{ + /* The probe AUIPC is the instruction after the tested one. */ + uint32_t addr =3D probe - 4; + uint32_t expected =3D addr + (imm << 16); + int ok; + + if (aligned) { + expected &=3D ~0xffffu; + } + ok =3D res =3D=3D expected; + if (!ok) { + TAP_INFO("%s imm=3D0x%04x at 0x%08x: got 0x%08x expected 0x%08x", + name, imm, addr, res, expected); + } + return !ok; +} + +#define CHECK_AUIPC(imm) \ + do { \ + uint32_t res, probe; \ + PCREL("auipc", imm, res, probe); \ + ret |=3D check("AUIPC", imm, res, probe, 0); \ + } while (0) + +#define CHECK_ALUIPC(imm) \ + do { \ + uint32_t res, probe; \ + PCREL("aluipc", imm, res, probe); \ + ret |=3D check("ALUIPC", imm, res, probe, 1); \ + } while (0) + +static int test_auipc(void) +{ + int ret =3D 0; + + CHECK_AUIPC(0); + CHECK_AUIPC(1); + CHECK_AUIPC(0x7fff); + CHECK_AUIPC(0x8000); + CHECK_AUIPC(0xffff); + return ret; +} + +static int test_aluipc(void) +{ + int ret =3D 0; + + CHECK_ALUIPC(0); + CHECK_ALUIPC(1); + CHECK_ALUIPC(0x7fff); + CHECK_ALUIPC(0x8000); + CHECK_ALUIPC(0xffff); + return ret; +} + +int main(void) +{ + TAP_START(); + tap_report(!test_auipc(), "MIPS32R6 AUIPC"); + tap_report(!test_aluipc(), "MIPS32R6 ALUIPC"); + + return tap_done(); +} diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build index f540d18b3bd2..a7af2f16192f 100644 --- a/tests/tcg/mipsel/meson.build +++ b/tests/tcg/mipsel/meson.build @@ -70,6 +70,7 @@ tests_mips32r6 =3D [ 'test_mips32r6_bitops.c', 'test_mips32r6_logic.c', 'test_mips32r6_multiply.c', + 'test_mips32r6_pcrel.c', 'test_mips32r6_shift.c', ] =20 --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384863; cv=none; d=zohomail.com; s=zohoarc; b=epLjPZ3v1wP/wtMSAsDVRh+73R3IBjG7smd4tPy5tcFSA0U4hmvUsJjDVL//cX2ltcyCCO7TrA2iOee0vIhh45wxL3Ss74GAM/Ar17GKw3y1sISu/UmimBJGVzEH4WP9YX6YgRgaQ9qonOW+r6V8DJKwBhjQkVi/Gdj6Bp3q5Y4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384863; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Ni7I46VnjFceS3JA9AvWDDq+HO1ygybvqydkTriCfiI=; b=l51/MEKKEjI6utkI0WeSrDjucIywv71cv8m5PXfpAPJ4P8AAGH2aPNtjnLaHuM4oYnManrzXUr2p36XctK+sP/jPteB5brIqo4PlhBQ+KcjOYJj67KSPXEKI5edtrxGdAJs1nINoXjrALVIsbPtdK5RBgH4KWDr98E3veYZTCUo= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384863330367.683080042509; Fri, 30 Oct 2026 11:27:43 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrKA-0006Uu-LJ; Fri, 30 Oct 2026 14:27:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrJi-0006In-OT for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:09 -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 1xMrJf-0002Q7-Kr for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:05 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHuLU93669827 for ; Fri, 30 Oct 2026 18:27:02 GMT Received: from mail-ua1-f69.google.com (mail-ua1-f69.google.com [209.85.222.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmejn-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:27:02 +0000 (GMT) Received: by mail-ua1-f69.google.com with SMTP id a1e0cc1a2514c-988bea8fed6so782714241.2 for ; Fri, 30 Oct 2026 11:27:02 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b79059sm4804968f8f.30.2026.10.30.11.26.58 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:26:59 -0700 (PDT) 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= Ni7I46VnjFceS3JA9AvWDDq+HO1ygybvqydkTriCfiI=; b=n86iFd69d8yX8kIm mITbceI8mEcPVr6gmv8jXLmp1yXhO4ovzSEe5KhW4ITqnxDy4AhtNFJgsZLKOtms 0WCtT6ZJrsmOsUVint47ScXxpjQqLJywiQVXQddnrUM1uDT8HY26CwAiSbNzT7Nt X7rJNyEVUgldo06RXzMGKrPOMSEDdRfPAhcYHpV20zbpX/xPHMj1GI4PPfPw1D7w u2sSVl1JbEuHLQJaW/20jac3PV9W21x5IhKgDDNoypmLupXLAZ6iI97UcN9Xnchn MdXeqkjbM0gH7McILz9qrLjUhzpopmPc3Mpb+c8K6l07r0Le7Wd1nyL2yprEqcxY mF2i9g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384821; x=1793989621; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=Ni7I46VnjFceS3JA9AvWDDq+HO1ygybvqydkTriCfiI=; b=du88eXyxgN/fTBxOOZr5tDg7dn1SkrQ6uHcSDWKuEC7cXqsqtuktJE4zeIJV+zk55G Xqzenqxn3A6+2lKgqAuXxGze6JypKju+XIn4GrWVEQbmypGEVzewAPU9o3BpEmgzlRza rz7Du/9yyIIT8vgF0p96t14b0Q6/e5Kjjdf0gzWcrQs7OdY9uilB1C1C+ChJ41NpGwb6 +q/BOZD/DKh7ZvcgQilPCi7PPdMULIQ29CrW/6KW39sk23wD2klk9h2AJdSOJ/jy6HyR rd7KsD4BCZjGkMm+qn/HXvMndqDdrrSAJ0xWp0XtsgtY22UuE1Sw+b5mdtYRhZpMAv+k 7Ofg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384821; x=1793989621; h=content-transfer-encoding:content-type: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 :content-type; bh=Ni7I46VnjFceS3JA9AvWDDq+HO1ygybvqydkTriCfiI=; b=xAJNSWCsV4YLk0g3R70x+ttwfhvAktmIEneGRs4xy3ZwwXJ6RgbUSrXBrUl5O1SD33 8SIHhV47T3JIOJt815WoMfXqrMhEcNzd+bWezTodWuONzVem8k3NnQD/8JpLWOcCZG+3 LeH7YtPreocmgKGO8UtJ/2w2576XeD2J/Qgo6XVmG6AuU8bXFgcNqlOzXpWtCff84bWo aDt9SBCRWWAt/nTzNG9ybrBwKKlFUqAHPMiTTXkpl+saspSn29aUCsVdJLF2uaxyk5zb ZYv9bRXclFhx6Qxt7gWrp6Us9t6RBftezvg0NsMnr3kVW8yNMtooimTvZjY/P5Piq4AM FORQ== X-Gm-Message-State: AFq9FYIxlGetoEFpqocKQ3anVQ6H1DhjyJMfGF5HaIZXMLrpEKUiNQJc Yo43+t0ZksUMtX8tW69Mg7t3mr3izj8PSjTnv/jzuXlJwH9bx5FKC4uGUoMZtjd9avdX1NWujZC faini/HRGSMosMjUH1tGVvv4m0Yyix4slopqnf687+JCuvz76RYrOrYN/nZf2AW5gjjbt X-Gm-Gg: AYBFou2llJb7ObW45kq+9THG9ZyBMczzTVj5WFnpSciX4rFdg0Th7HkVb6FKGSllTA8 P5IXXQobpkA1aqAcQBcpUHi+iGWat18WP6UbsSgqp5CEtgxMJB/7aMyt2UFUoK1HYFusm0g9LA+ 9ixZaErnom4xXg64rkRu83UVxlHgau7DJ6IR614ObPfEIH59nBUEWBakjSVlB/0PZ3qL/hetulT CO41a3ceI4907zvQIze685injjVZWwLmtAi2KsxFGafLhdH4clyn3+EI0XhX/I5c6jmhElVnZYY RX7EWpHuwBbOQt7kAAAfQuGpI46iiF7oBwJUuwYfJhcwTAcYr1ZJOgn7KVfJt0HCVAbbFbrRIjc X5ef4LLZLc4IPk7KDGXJCkEnfNzs6MHroNe0KC5YQKHeiwDmcU++JNO0fiJ5z0GbGHlBrXCK5KV kHRRgImUDqCYOqyXkfEuoCpPGWS1oLnw== X-Received: by 2002:a05:6102:6888:b0:7cc:1045:604 with SMTP id ada2fe7eead31-7d07275c681mr1742559137.30.1793384821471; Fri, 30 Oct 2026 11:27:01 -0700 (PDT) X-Received: by 2002:a05:6102:6888:b0:7cc:1045:604 with SMTP id ada2fe7eead31-7d07275c681mr1742549137.30.1793384821095; Fri, 30 Oct 2026 11:27:01 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 08/12] tests/tcg/mipsel: Test MIPS32R6 SELEQZ and SELNEZ Date: Fri, 30 Oct 2026 19:25:41 +0100 Message-ID: <20261030182546.2508-9-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=KsrYSmWN c=1 sm=1 tr=0 ts=6ae4e176 cx=c_pps a=UbhLPJ621ZpgOD2l3yZY1w==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=Z1e1Q9QNEkR2sOvC9foA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=TOPH6uDL9cOC6tEoww4z:22 X-Proofpoint-ORIG-GUID: 1_4s3FYaafuWpeodxNlYD1c-gxnjhe3h X-Proofpoint-GUID: 1_4s3FYaafuWpeodxNlYD1c-gxnjhe3h X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfXxNjm6BUAoQfo AlHqV5gG3IY578Y0133HGXkYHN+m88l8wW4hUz485nLRK2wK2XqRXzc+eQlMqqLbrxwxKJWECMm HZTRrxsWLsbdZ4X4IQ6t8sh/ea+d1dghdKEqqXS8cghHtC2Oz0jwtpcG/u6O2oU/65FhXx6B1OP teItNcYn/tm+/Wgp0BA7DItkJICwgGYSQ+9+c+F4xXqA3x6cwgk//QJ3BFp2Qx+SkgFKRKmd9k/ qUEhKegmvVNI5qVWS83EMS5bGegQgR4WEbdTFSDIS65lnmGLyKQFNnCLTRNNYNFnJL3HRju6JGr uQIdqhWZ0lrd5XZD27ONy1boNE2J+J54/6pVNpN9cUZTA/G8FH7E++ClEk/i6yPzEGlV2sGpRWO X6e+uS0TqO6YMjzBS3Hrz4oG1Wp5maX5HjBLz3rp5u5kHD749b0+KfEAnK6scgbC4nyfkIyMotR wSzQM1JV2DEM2Bz4Iyg== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX9mjXctQnKWdV o+Lvl3PPxsEaujBVZf5O29DK3f/VPvCp/klW6Vbw246tJS+l2fKP4wgwc9h6jzFsrCXb1CQOVwa 2OjxkHAD30qJx+26/bv93kLMSecvB5A= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384866162158500 Test SEL[EQ/NE]Z. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mips/include/wrappers_mips32r6.h | 3 +++ tests/tcg/mipsel/test_mips32r6_logic.c | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/tests/tcg/mips/include/wrappers_mips32r6.h b/tests/tcg/mips/in= clude/wrappers_mips32r6.h index 316aa69ef582..aaa8afcae95b 100644 --- a/tests/tcg/mips/include/wrappers_mips32r6.h +++ b/tests/tcg/mips/include/wrappers_mips32r6.h @@ -58,4 +58,7 @@ DO_MIPS32R6__RD__RS_RT(NOR, nor) DO_MIPS32R6__RD__RS_RT(OR, or) DO_MIPS32R6__RD__RS_RT(XOR, xor) =20 +DO_MIPS32R6__RD__RS_RT(SELEQZ, seleqz) +DO_MIPS32R6__RD__RS_RT(SELNEZ, selnez) + #endif diff --git a/tests/tcg/mipsel/test_mips32r6_logic.c b/tests/tcg/mipsel/test= _mips32r6_logic.c index b640aa0975b5..45fc8e3a9ef7 100644 --- a/tests/tcg/mipsel/test_mips32r6_logic.c +++ b/tests/tcg/mipsel/test_mips32r6_logic.c @@ -17,6 +17,9 @@ static uint32_t ref_and(uint32_t a, uint32_t b) { return = a & b; } static uint32_t ref_nor(uint32_t a, uint32_t b) { return ~(a | b); } static uint32_t ref_or(uint32_t a, uint32_t b) { return a | b; } static uint32_t ref_xor(uint32_t a, uint32_t b) { return a ^ b; } +/* SELEQZ/SELNEZ select rs, or zero, depending on rt. */ +static uint32_t ref_seleqz(uint32_t a, uint32_t b) { return b =3D=3D 0 ? a= : 0; } +static uint32_t ref_selnez(uint32_t a, uint32_t b) { return b !=3D 0 ? a := 0; } =20 static int check_op(const char *name, binary_op_32 op, ref_op_32 ref, const uint32_t *input, size_t count) @@ -55,6 +58,8 @@ int main(void) run("NOR", do_mips32r6_NOR, ref_nor); run("OR", do_mips32r6_OR, ref_or); run("XOR", do_mips32r6_XOR, ref_xor); + run("SELEQZ", do_mips32r6_SELEQZ, ref_seleqz); + run("SELNEZ", do_mips32r6_SELNEZ, ref_selnez); =20 return tap_done(); } --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384869; cv=none; d=zohomail.com; s=zohoarc; b=jtD5L/4ME8pzXGTunoOk6Kr16g/OKV3ZAMcoG44ZkFY7X15IM5qJ7KUKPIzNfqhyjbBbBgbzLQCapxvh833gwuAD2yVVsOsEh100xvShkyvfncziqXRuLE9qkldAuRsgfEmMMzp3w7B8RCa1clEJUpQg0oiiQq6g6oU8uqMdIaw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384869; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yeJKqyM0+SrhgWbt1uHvVNcPIydQeLHIeWpBo7FwUWc=; b=MjlP30aF1hVzLWeNDex9+bMF1liJPu12WU4Tn4+gxkx4cVXaVvy5KcOCYdfCnfmy9v8tffhr+ptSzK9OC+oXLomV3sXSqLWuyogf/N66jlq0/qDa/opm7uIsHN/ibQKhsN+IC8G4rbgAo2Pbbn+LwQz81l+ss8K5J39oftGCwE8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384869182397.2610651466889; Fri, 30 Oct 2026 11:27:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrKJ-0006dQ-RN; Fri, 30 Oct 2026 14:27:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrJo-0006LN-Fi for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:17 -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 1xMrJm-0002QO-QE for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:12 -0400 Received: from pps.filterd (m0279871.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHuSMH411194 for ; Fri, 30 Oct 2026 18:27:10 GMT Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qvd87-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:27:09 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-93f2005ce21so138560885a.3 for ; Fri, 30 Oct 2026 11:27:09 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4aa81a896ecsm159692465e9.9.2026.10.30.11.27.07 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:27:07 -0700 (PDT) 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= yeJKqyM0+SrhgWbt1uHvVNcPIydQeLHIeWpBo7FwUWc=; b=JKHpk15/eOWK6ZBu pR2L8uJWrRpYBWphJqjDRGP3Abb2ahtXZTybNsnjBIyLUJH9BtPev7b68XB+h7Vq 6Tdwo+DvbJw40WqzYBchpBqXpqErWFRT+kthPH9oBAa2IOVvRLBeB/+/SRyKO292 MKqiAYH4fx2A17PfVO2KChRa6wHSyp+qNy8GaWp2KL65XXqpXVo/aSKICtcrlINl 4VnSBrH7Xzeq/CbAXxlZXhNOnaSbxaERhHxY41yhJDXraUlAGXwZcx5w38LcKY0J O/KyGioo+Rt7i5Sr6n4IERvWgDVJf8QVgUY2Cd7hL4I3vkvVI8tPSi8TL/Q4DZr1 X5goGQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384829; x=1793989629; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=yeJKqyM0+SrhgWbt1uHvVNcPIydQeLHIeWpBo7FwUWc=; b=ULcm4S20isNgMIJVT/OvMeXBrq1J0adbL5j/tRUQ9WipbUThHlTN83b1AtkrmvRb7D XvmhWHgtahBSukwDZg+q3RjOgVpnGzc24yMEpfh29a7Uo4Q/Lhu9TkRckarfX9KFjK36 U9sqqmfid5Or+O5fnYlg2kUZS0Qx3Sg8VC62Z6ShppAJ+OkSmg8/Zb6rIDm2nnfh/MF3 XZ3ZE1Il93S3OeOHRM7PW9JClM233X/B80/wlR3Bx3x/YjKbr2XPhnu6SYt0rLJE+iRs mKhxM+NIOSeiYodbMWYd0lT8Ypv+AZ1j6Vlbh+MDx7+rhYT0aqEBjdB7pbcgMQ/+OG3C gyzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384829; x=1793989629; h=content-transfer-encoding:content-type: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 :content-type; bh=yeJKqyM0+SrhgWbt1uHvVNcPIydQeLHIeWpBo7FwUWc=; b=gjaMRNwrNhhJ5aoftY04WUbuq6DR5Vs5Goa+xIO7tm3/wocJvUDpfoBioI/rjD6UAw KJ/nE0oOVd7uuqXFzOE5OJv7ld/BEhItr3gpOYlyJzusaxJA4qTeLNkzXPiC8RWCSVhM Vl4jhZmEwkGF6jw7psQfbss4+dvBX2X19jL88PkIex8LTAqrHNvB06o5+8B36k4lYwZp iDIyPyIXVkebANhe/v6ULa766tySbntpxmdHUO89zicN86h7hN+tmnNLxiDESfmqNN9h gn7gCx/+N41/oUdZPR+rj5ULm0u7+3KlyGO6PgeZM3ydXlhtx6BVbRjHi04Ks7iqhqdz mUfg== X-Gm-Message-State: AFq9FYLCr/TxPLZU/6TO3Rfi1WFfYInph4uCwaR508EgYe5kQSeYMooe vdo8p5hweGcS+RHKr4CgEok7o58lcZa41ml16QIgGtbFLUzwfKtoMcGy4YdZOLHoAWz2EAb+mCh GjoLjzGcPDiTDyYbgWLt6JZO0zrLjAWqTWsRe5dEsU2ywd69Jg5xwJYW5k7h5xK9/6kBQ X-Gm-Gg: AYBFou0I+0VYSYXYvKTt6p1iRu5nfKNCNNQO3tMq4hESZPnYmFe7F+9V7o1Ju9HqbGE TczR89nTYlf/tvEx1BS6vJryjyrS/Z8LmswfgqUn3eTh3Lha4zytQ7KFr536ZlUp/C8OxBn11fZ nvlj0FKNOweCx93fj2IBrQ3R2DM0xroYMfS1e6U7p6LxtunUOcvARXE0fg/06goCn4fPU6ld3Xx 7Wt8POg7TqkIgUhgz7iYOm7mdefh0C7yeFp0vRcFddz2edTXSB5muVhYbSc9ERnL30O/pTVBNgp tdq9bzt6VzVlmEsCV5EwGEf7nztDUAmkeCPK9jw+t7bJplE2PJsrSYe3o+X0aAzI6LWB1VVkD5U +azQ744MToRAzfUbAJVN52OTfwd/LcUP5VDoI6BTJxCMoaGSfa7G2XztbYsgqZiUyslxWHkrKYL i9y8lLyxZR4UFQ4MB35qIIzlueA7zq4A== X-Received: by 2002:a05:620a:608b:b0:943:f2ea:5ee7 with SMTP id af79cd13be357-94421659ddemr523465885a.23.1793384829166; Fri, 30 Oct 2026 11:27:09 -0700 (PDT) X-Received: by 2002:a05:620a:608b:b0:943:f2ea:5ee7 with SMTP id af79cd13be357-94421659ddemr523460985a.23.1793384828536; Fri, 30 Oct 2026 11:27:08 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 09/12] tests/tcg/mipsel: Test MIPS32R6 DIV, MOD, DIVU and MODU Date: Fri, 30 Oct 2026 19:25:42 +0100 Message-ID: <20261030182546.2508-10-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-GUID: E1qE92a7_wH44S2fNq-xonT719FCpIiJ X-Proofpoint-ORIG-GUID: E1qE92a7_wH44S2fNq-xonT719FCpIiJ X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX/GYqGodzT99z wrl9ZB/UFp52zf7SebWSzE5dYaXg1bvxPOp+MXglFyQnhG7343Yg4sqQEd4uw+n3kcAROpHHtB/ j2MZyLiTsPew3M0nkyCWUL9x+9MeCCOQzn8ntR52jCST8OOfz1sAWCd/MnGH2b3xnOQNgyRGjYM MELR6kyCYJkk3ziv1Snc0gjOkTUvBYtIj09P0fKZb7Y2UHvtODAKHzrbFH5EFcc13eHzCBnGVx8 mAS9vUTCca+ucM2YL39YJTSmcOV994UT3Iavgw1uewUQh7a/qRHvS4oqd5tYl5vir4U0WsAC2Ow oDkLWvUiLmVXfFM4Kg61NKWw0zSYPWaGHqX+Wwz1lu2CyFUE2QADWEbaufnIksC8R7Pi04anAWb 4YitaWlnAq8/GweO8nqLABEl1vIVIAwi0qloqp9t5h3Q6kvG9xyGhzI0058dbkiqlIF9sc9d7iO K0ggLKPMCu53zNLqajg== X-Authority-Analysis: v=2.4 cv=dPgzC+Zb c=1 sm=1 tr=0 ts=6ae4e17d cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=3WHJM1ZQz_JShphwDgj5:22 a=EUspDBNiAAAA:8 a=CcuutW9W_LychIfcB9YA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX/f6f67xn1+hh Ppeie+nZXJSBjDdncpW0UUP72fsiov7QejQjgw7M2YGe2OxC7iWqxgGX0zfR52j8zy87QjwviND 8vsb2AS/j7Qpr0yCM3hvwENczKq3B3I= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 impostorscore=0 spamscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 phishscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384871068154100 Test DIV[U] and MOD[U]. A zero divisor and INT_MIN / -1 are skipped: their result is UNPREDICTABLE. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mips/include/wrappers_mips32r6.h | 5 +++ tests/tcg/mipsel/test_mips32r6_multiply.c | 45 ++++++++++++++++++---- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/tests/tcg/mips/include/wrappers_mips32r6.h b/tests/tcg/mips/in= clude/wrappers_mips32r6.h index aaa8afcae95b..cbff8450b656 100644 --- a/tests/tcg/mips/include/wrappers_mips32r6.h +++ b/tests/tcg/mips/include/wrappers_mips32r6.h @@ -53,6 +53,11 @@ DO_MIPS32R6__RD__RS_RT(MUH, muh) DO_MIPS32R6__RD__RS_RT(MULU, mulu) DO_MIPS32R6__RD__RS_RT(MUHU, muhu) =20 +DO_MIPS32R6__RD__RS_RT(DIV, div) +DO_MIPS32R6__RD__RS_RT(MOD, mod) +DO_MIPS32R6__RD__RS_RT(DIVU, divu) +DO_MIPS32R6__RD__RS_RT(MODU, modu) + DO_MIPS32R6__RD__RS_RT(AND, and) DO_MIPS32R6__RD__RS_RT(NOR, nor) DO_MIPS32R6__RD__RS_RT(OR, or) diff --git a/tests/tcg/mipsel/test_mips32r6_multiply.c b/tests/tcg/mipsel/t= est_mips32r6_multiply.c index 17106391107a..a58f757b24c0 100644 --- a/tests/tcg/mipsel/test_mips32r6_multiply.c +++ b/tests/tcg/mipsel/test_mips32r6_multiply.c @@ -12,6 +12,7 @@ =20 typedef void (*binary_op_32)(const uint32_t *, const uint32_t *, uint32_t = *); typedef uint32_t (*ref_op_32)(uint32_t, uint32_t); +typedef int (*valid_op_32)(uint32_t, uint32_t); =20 static uint32_t ref_mul(uint32_t a, uint32_t b) { @@ -33,8 +34,28 @@ static uint32_t ref_muhu(uint32_t a, uint32_t b) return (uint32_t)(((uint64_t)a * b) >> 32); } =20 +/* Division by zero and INT_MIN / -1 have UNPREDICTABLE results. */ +static int valid_udiv(uint32_t a, uint32_t b) { return b !=3D 0; } +static int valid_sdiv(uint32_t a, uint32_t b) +{ + return b !=3D 0 && !(a =3D=3D 0x80000000u && b =3D=3D 0xffffffffu); +} + +static uint32_t ref_div(uint32_t a, uint32_t b) +{ + return (uint32_t)((int32_t)a / (int32_t)b); +} + +static uint32_t ref_mod(uint32_t a, uint32_t b) +{ + return (uint32_t)((int32_t)a % (int32_t)b); +} + +static uint32_t ref_divu(uint32_t a, uint32_t b) { return a / b; } +static uint32_t ref_modu(uint32_t a, uint32_t b) { return a % b; } + static int check_op(const char *name, binary_op_32 op, ref_op_32 ref, - const uint32_t *input, size_t count) + valid_op_32 valid, const uint32_t *input, size_t count) { int fail =3D 0; =20 @@ -42,6 +63,9 @@ static int check_op(const char *name, binary_op_32 op, re= f_op_32 ref, for (size_t j =3D 0; j < count; j++) { uint32_t a =3D input[i], b =3D input[j], res =3D 0; =20 + if (valid && !valid(a, b)) { + continue; + } op(&a, &b, &res); if (res !=3D ref(a, b)) { TAP_INFO("%s: %08x, %08x: got %08x expected %08x", @@ -53,12 +77,13 @@ static int check_op(const char *name, binary_op_32 op, = ref_op_32 ref, return fail; } =20 -static int run(const char *name, binary_op_32 op, ref_op_32 ref) +static int run(const char *name, binary_op_32 op, ref_op_32 ref, + valid_op_32 valid) { int ret =3D 0; =20 - ret |=3D check_op(name, op, ref, b32_pattern, PATTERN_INPUTS_32_COUNT); - ret |=3D check_op(name, op, ref, b32_random, RANDOM_INPUTS_32_COUNT); + ret |=3D check_op(name, op, ref, valid, b32_pattern, PATTERN_INPUTS_32= _COUNT); + ret |=3D check_op(name, op, ref, valid, b32_random, RANDOM_INPUTS_32_C= OUNT); tap_report(!ret, "MIPS32R6 multiply %s", name); return ret; } @@ -66,10 +91,14 @@ static int run(const char *name, binary_op_32 op, ref_o= p_32 ref) int main(void) { TAP_START(); - run("MUL", do_mips32r6_MUL, ref_mul); - run("MUH", do_mips32r6_MUH, ref_muh); - run("MULU", do_mips32r6_MULU, ref_mulu); - run("MUHU", do_mips32r6_MUHU, ref_muhu); + run("MUL", do_mips32r6_MUL, ref_mul, NULL); + run("MUH", do_mips32r6_MUH, ref_muh, NULL); + run("MULU", do_mips32r6_MULU, ref_mulu, NULL); + run("MUHU", do_mips32r6_MUHU, ref_muhu, NULL); + run("DIV", do_mips32r6_DIV, ref_div, valid_sdiv); + run("MOD", do_mips32r6_MOD, ref_mod, valid_sdiv); + run("DIVU", do_mips32r6_DIVU, ref_divu, valid_udiv); + run("MODU", do_mips32r6_MODU, ref_modu, valid_udiv); =20 return tap_done(); } --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384905; cv=none; d=zohomail.com; s=zohoarc; b=BQRtkU8vSomkn9HstYMb+Uigowwl+DYD4UpzYfnIvoQTBHb41N/4852G499qydNWMevnJKungWnCFa8LAV/8o5EzFWkQO/xJ7Me4D5ueTquLWn33uKwsp5TbST53dBuignNVaCdmmllKjla7z4F+Ff6ybKHrEPvPyDf3S3SoiMI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384905; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zyNDzZ9b0LcZqZDIK0c8/KsSh0SI5paxKhm5PlRe2Wk=; b=jjm1qc4Z1Wsj4/Cw0LKIVXTi9V9K7kMQ+L4Ay2iSvsbIXnMOGDEc8IxATnvoRgAJ/xvZ0awPnjgY9CkzA+HmoU32lebsvuB0wDuHri1xphigVu7KzaLATC0SysQRCaaRxec9Bu/7EaqgwgD/RQqkIfyBtYN9kkYYOUnYUszDSi8= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384905790787.2674802761763; Fri, 30 Oct 2026 11:28:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrKK-0006fx-G3; Fri, 30 Oct 2026 14:27:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrJy-0006TR-Eq for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:25 -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 1xMrJu-0002Qh-Qs for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:21 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHuLs63669811 for ; Fri, 30 Oct 2026 18:27:18 GMT Received: from mail-vs1-f69.google.com (mail-vs1-f69.google.com [209.85.217.69]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmekv-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:27:17 +0000 (GMT) Received: by mail-vs1-f69.google.com with SMTP id ada2fe7eead31-7bfa915da7cso882318137.1 for ; Fri, 30 Oct 2026 11:27:17 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b8a84esm4763400f8f.39.2026.10.30.11.27.14 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:27:14 -0700 (PDT) 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= zyNDzZ9b0LcZqZDIK0c8/KsSh0SI5paxKhm5PlRe2Wk=; b=OcZO3Bzyot/Y0L2H UeMNXj6f5OpPtl6QjPfmEMv3U3fm/LgDEuDt9fUP0ktMD1UamYaBgg2jB2z20A+x d52rLMQFt6iXGV1t34GATzvDW1AB1zy8KfuTjI8rSd2DnzTZQg/PsdgndRdDRWMT RFUhfevaeLyifMj4092YHsCuwkcqeVdp65ycDGRm/0Uz+C+y4YMf03LxJEmkyKTY UGv0T2yzcnn8fsoEDUXzIRb687IM7Zti5QW28Z1UyHTXltAl+E9gwzm8QZl+xbM9 FIic/repRhkrClLLlpiMo1hS0pXPjrjrlJV4uQSlAnx+MQKkZvblvuGDVSMiw16a 9MZARw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384837; x=1793989637; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=zyNDzZ9b0LcZqZDIK0c8/KsSh0SI5paxKhm5PlRe2Wk=; b=DOlkuvABmpTY52/iL3V+43QXJ09XDTWM+g3fLD6jsaJI9HC0xdMG6JwKm897j9Qiyu xoredtdo5XIGA1/xwwuI8n0Fd8zwN+i9nV65mp/OdCN0N41RqWXdlKL6WKq5eJQ32/xL Q5Qfpn8f5kB1qPG25kmhl/8A08Fx3bec3SLD7iPYKgjWgmW9hy1ErPwWKIJ9ZAtQ+1JS rjxvPPr/Atx5U8kqFW3TrRIFyz8wq9J5laZVjJe943n+J+4QUosfkXo6cAQ/oy9mWkm4 ktFo30bIgYl+liyjR28i+jSLkHaI8+SLTgrCwns371Gn+2z/KDESISNbUGeCOwWX8xcL ae/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384837; x=1793989637; h=content-transfer-encoding:content-type: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 :content-type; bh=zyNDzZ9b0LcZqZDIK0c8/KsSh0SI5paxKhm5PlRe2Wk=; b=ha654m9jz1aicOHdwCsWXWT6xiBtTalhtAoGrg7mbzAe6hbzAzzX7VdgdJEzfEJjBx /YEfnk/PK4ZR/rGx4cg0pArgwqo2DpEOZ0qk+oVgfcZH9XmAa+kF0cXi5gEGz586vVeD t2A0/BzH5UnuuX9FKiIdZkOw2jEPvNCqtad3OZcbdLL5huFvcySBWOfNDn5XQSb6WoqW ewJy7PwjIEpzM+JwsDUMhJsc+t2qTeJJCwY1dpJ5b5f6cJ7U2JnM5D/bbS2hFDBzdK1j Cdj7/ahRb0qySsbuVln849Nj3HoCZfYdSZdWjB16Fqe06g0pYUYpGKsWogcDdR+XnQRy cbWQ== X-Gm-Message-State: AFq9FYIb25eWsmyBCruPghxyhX+/eYkGFktYpbZidwC06lwnWEloUexc edRjLaOMu4ID0kqshKpBX4kYssxRP+oWe79PHL6bk9IOHzqQJ0bb+PLi5ecummJVZWK9mN0Pwns U/W+9Kr4RClnreRARPEWn0MGd5Fb2IMCPXnvopk0QbIQgWZ1qxHQBi49RLViPxDwz+Oxb X-Gm-Gg: AYBFou04iPldzox3DColxgxftzixvGXPNyOjgyxw87Xxjt3m57XJLg/a4pJj0Zxa+YF DMbrrnzMhun2I2LlInrLc9dsx8E0HEbFmqDMKzoMuvm35P9S8c6NxMoSRWfRd5hVnL9Sh4Iycl8 1dKWu+fSc0otzrA77+N5rZzxGydjScc1J0IEq1D6JjApxsEVu/TqGNpYsovrtGssQoKbCW0mh7/ jQu33zMOeL8UDrX/DCjC8H8RBxoLmR9UPzsspO0zc6YAzYoj0O3iQtXwwyFdMnHSwL+skRIcwez qyaKRtddDcKMp7reB7FYX4IO8Ryb96UDosP7Qd5upSwXJQGGQeBSBedFLWBldonl7HNgJXaNoDJ 0I1iuSenYQ9RNbfr1r1m4Na4BN3ugKE4FZBmgPlxkRrIM8SECgBuLo4wNbYw9lgfiN+WFvb6KvX O9wd2yunEYSf54CKtK7I9AtGoUAmcv5Q== X-Received: by 2002:a05:6102:6058:b0:7a1:f2b5:6469 with SMTP id ada2fe7eead31-7d05436380bmr1917064137.38.1793384837023; Fri, 30 Oct 2026 11:27:17 -0700 (PDT) X-Received: by 2002:a05:6102:6058:b0:7a1:f2b5:6469 with SMTP id ada2fe7eead31-7d05436380bmr1917061137.38.1793384836611; Fri, 30 Oct 2026 11:27:16 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 10/12] tests/tcg/mipsel: Test MIPS32R6 LSA Date: Fri, 30 Oct 2026 19:25:43 +0100 Message-ID: <20261030182546.2508-11-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=KsrYSmWN c=1 sm=1 tr=0 ts=6ae4e185 cx=c_pps a=5HAIKLe1ejAbszaTRHs9Ug==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=veIKPg1plPCbqLeGzsIA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=gYDTvv6II1OnSo0itH1n:22 X-Proofpoint-ORIG-GUID: w978UUZuV8QbsXzl2XA-8syMM0z57k9G X-Proofpoint-GUID: w978UUZuV8QbsXzl2XA-8syMM0z57k9G X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX9bEO3hka4F4T SKSI5p+KucSPZEi893cgvOxFV5KBS2HLpHec7FvN2eFfdMcqbL7egSEayzu6o7m4Zapoo9HzAbQ 3lbk3JGvlvkWPCk3nmSsJ4qY/Ajo8nd9sV2Ifa1sXpERCxW1hxnmEXiPBWKM4FeIhxGVIPOzVR6 bcnH7BGv5wkt1JfOZ70VG1L/D1Ib7NXv6QFoeZ9kb5OiIkArkDVkvJPjL9JKKL2BmCV6Xf+M1HY ky7Y759EFV3jatxjtMPQhU8mTNjGXsFsRm5Apz1nj6FPgG0x1aSSOqLaDfh6EaBcSNIUwUBOXi4 hyDq3mnUST7/F7lhQxwo4cpDX1pmRYmznkw9JqeWmL/UDs7JKVnTpev4/fpGy0swGjN2Td0P1Pe hck4UUhBat6wrfMXhKztEC1hk733g54e7Tzazw1wiYiR+Pt77xIeK5SjbhblMZfEscusSclgAKL lRa9LvbD4dbuYxrQt5w== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX1wO2J+q9/9dY HNHG51UE82hnOd06fgghu4Iku8aElTNEQ1q7WgfRG+8a2rx/EqHC7GiLbZMCBMGCQNDAlyhsDiz WU3r6zKmc+GbkY/kMNX4UdZwLeZjCAg= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384907641154100 Test LSA opcode. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mips/include/wrappers_mips32r6.h | 22 ++++++++++++++++++++++ tests/tcg/mipsel/test_mips32r6_shift.c | 10 ++++++++++ 2 files changed, 32 insertions(+) diff --git a/tests/tcg/mips/include/wrappers_mips32r6.h b/tests/tcg/mips/in= clude/wrappers_mips32r6.h index cbff8450b656..63b4496b3188 100644 --- a/tests/tcg/mips/include/wrappers_mips32r6.h +++ b/tests/tcg/mips/include/wrappers_mips32r6.h @@ -48,6 +48,28 @@ DO_MIPS32R6__RD__RS_RT(SLLV, sllv) DO_MIPS32R6__RD__RS_RT(SRLV, srlv) DO_MIPS32R6__RD__RS_RT(SRAV, srav) =20 +/* LSA rd, rs, rt, sa: rd =3D (rs << sa) + rt, with sa in 1..4. */ +#define DO_MIPS32R6__LSA(suffix, sa) \ +static inline void do_mips32r6_##suffix(const uint32_t *input1, \ + const uint32_t *input2, \ + uint32_t *output) \ +{ \ + __asm__ volatile ( \ + "lw $t1, 0(%0)\n\t" \ + "lw $t2, 0(%1)\n\t" \ + "lsa $t0, $t1, $t2, " #sa "\n\t" \ + "sw $t0, 0(%2)\n\t" \ + : \ + : "r" (input1), "r" (input2), "r" (output) \ + : "t0", "t1", "t2", "memory" \ + ); \ +} + +DO_MIPS32R6__LSA(LSA1, 1) +DO_MIPS32R6__LSA(LSA2, 2) +DO_MIPS32R6__LSA(LSA3, 3) +DO_MIPS32R6__LSA(LSA4, 4) + DO_MIPS32R6__RD__RS_RT(MUL, mul) DO_MIPS32R6__RD__RS_RT(MUH, muh) DO_MIPS32R6__RD__RS_RT(MULU, mulu) diff --git a/tests/tcg/mipsel/test_mips32r6_shift.c b/tests/tcg/mipsel/test= _mips32r6_shift.c index 6828e90dd8af..c2d0e61137d0 100644 --- a/tests/tcg/mipsel/test_mips32r6_shift.c +++ b/tests/tcg/mipsel/test_mips32r6_shift.c @@ -21,6 +21,12 @@ static uint32_t ref_srav(uint32_t a, uint32_t b) return (uint32_t)((int32_t)a >> (b & 31)); } =20 +/* LSA: shift rs left by 1..4, then add rt. */ +static uint32_t ref_lsa1(uint32_t a, uint32_t b) { return (a << 1) + b; } +static uint32_t ref_lsa2(uint32_t a, uint32_t b) { return (a << 2) + b; } +static uint32_t ref_lsa3(uint32_t a, uint32_t b) { return (a << 3) + b; } +static uint32_t ref_lsa4(uint32_t a, uint32_t b) { return (a << 4) + b; } + static int check_one(const char *name, binary_op_32 op, ref_op_32 ref, uint32_t a, uint32_t b) { @@ -66,6 +72,10 @@ int main(void) run("SLLV", do_mips32r6_SLLV, ref_sllv); run("SRLV", do_mips32r6_SRLV, ref_srlv); run("SRAV", do_mips32r6_SRAV, ref_srav); + run("LSA1", do_mips32r6_LSA1, ref_lsa1); + run("LSA2", do_mips32r6_LSA2, ref_lsa2); + run("LSA3", do_mips32r6_LSA3, ref_lsa3); + run("LSA4", do_mips32r6_LSA4, ref_lsa4); =20 return tap_done(); } --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384893; cv=none; d=zohomail.com; s=zohoarc; b=LLQBII6tb4FIbAYQFJasVPDf1DRCYcQwYkgie92oBD+7X2uYlOFKs9QA8yGcEog/isSy1eMF0JF/UTUPQZ/CUPlajml0+ix+4nloOePrVswiBUOUw1P1ht1PUWSnEZTsIFXlRS/WwhFyM/O5a0aHi+79wgOxZcBx7x/kPf0qIM0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384893; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3XRd9qQrKrqFBWzWiu2+f9niagjSSeh/wAU3QeXKSBI=; b=cVmsW0IceVeE880Wu/u7NNHiJNJHkfrhfA7nyN7Py3gAR/pp0tPctf7I65HFFvpKzcnf3yIFM2kglPnFAaWOctCTQoL5+J+njhWqopew6bpFTxe7JgL3aQr3iiLBblcegEIPGLigmVhX+aSOAQkCDsTx8qsX8TTBryUO/7iSyxs= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384893049653.629683875047; Fri, 30 Oct 2026 11:28:13 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrKO-0006mN-5L; Fri, 30 Oct 2026 14:27:48 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrKA-0006Yr-OS for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27: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 1xMrK7-0002R7-Hr for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:33 -0400 Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHu5Pr3430785 for ; Fri, 30 Oct 2026 18:27:29 GMT Received: from mail-ua1-f71.google.com (mail-ua1-f71.google.com [209.85.222.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmfq7-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:27:28 +0000 (GMT) Received: by mail-ua1-f71.google.com with SMTP id a1e0cc1a2514c-99076c676cbso244003241.3 for ; Fri, 30 Oct 2026 11:27:28 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48e71b9c4f4sm4543950f8f.48.2026.10.30.11.27.23 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:27:24 -0700 (PDT) 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= 3XRd9qQrKrqFBWzWiu2+f9niagjSSeh/wAU3QeXKSBI=; b=i31ka/FCa0oVsmrf INGWl2Tz4OuIGPAT28uhhJkckE1A39FkG/xio3uo09gFSA3ZgnE4fW3e8MnQBGMT Jtvtv7fxxb/fJCVKlXPr4t5w4/pi1Ikt3DTaV+lgjkHWu78BVcZQePSCTDxAl6X7 aB84+2ADxJoKgnL+m2BHEIEL/VAX8o0NFqI6d4kY704GZeJnOYD4qZz/XTNt28Se 1u94RYELllvCXUbAE6rRECkeiup3bXep6mn8pDj9dvXg9Pqd42NfoYz5+malBuQY uyau0Qy8w0K6RUAxbn0WH5kz+5r1p2+uTvs0AQeac9qnlA/9HGcn4d4iSFdq735a jtt47g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384848; x=1793989648; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=3XRd9qQrKrqFBWzWiu2+f9niagjSSeh/wAU3QeXKSBI=; b=JGlW3ufdS8W6NXsmZ9aSLAJiZ1G/fTFm5aLDxuisOesgh3uiGtcrGK1ADkA9FDRfd/ CQvK+UvK9X8h+FOk1/aKe/wnIChHe6a+cyKB0vwCTMP8XVo8evUkk5H+4jv24Mw97UMM PxUeCqO1tS5WSfmrqsy2Pf6/XcY1ZA/kN+zPdNxtXUFoQgFYNj3X/f+NinA2BxKkruQ5 /6NNWURS1Juv+x4ul1ecVi7tjptsoGu1UF20msTWJsm5lE8bARTfolp17ASRNRW0kbBi sD9H50IqFfa3g0jpH9Uib3/VbI/VW1rAt0X7yE55NOE8Zn3mgCyFlVHrbX5vrByZjnKT 9uYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384848; x=1793989648; h=content-transfer-encoding:content-type: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 :content-type; bh=3XRd9qQrKrqFBWzWiu2+f9niagjSSeh/wAU3QeXKSBI=; b=gEMg/hDGd9pU210M9iJgEKzu+9GNQR63sp9a71zCiDxq3n9i6+fS+BRmbsXY+AoZ74 1Xg3mDTq/H90qQq5vCjZL2rN1SQAOCPd9HcJfffUhK8mKRgsh5BKF+87SZGzlYmf5YBS vz0U8n73xrqSjIRRQ1o6OPYiUAEahNg1d8f1EPPFlsQrGa1BuNv3gyRP8bkOUaARZHXq T1YVj2xt0r0qYgWp48b2W6UvK9+c0z1UCuScpEl2aSaIhUs+W9KuGaF8zWdeJxP6imnN qV3ofRuY3NPl51tLUP5LpHWyF7vqkQPriQP4l6zs9RJqoa/NgqQmuZ0dUIkVYXGcEqyn diVQ== X-Gm-Message-State: AFq9FYLZLfTs6oKaB6TrLAP84+Up43uLQk47Mps4knrVn5cT/K+jc77A O9WViRop/YhP6imIAm26LeaUV71g8qi3AYCASCo0J0id/U6Sa1LqDKe3z5O6qAjeo2s+ZMTLgSE cOeduSu/DQ/TslMLezaF4+tM+mS6Fu4yYQPtLsSNVyoY4QuuEc6oSkM89Ibdla1Asr8DF X-Gm-Gg: AYBFou2+gRXH7Z3H3yQNGBvuLce+q8qFeA/Q9ypn+OvR8Q+cr1B1W46bBJeB0BOcw72 8U+jL9fNU1jjGBX0fsAauqt0KrVhoI35D/MrCdPp5gtwFYkxa4AaLUlWFod4DgqoKtX3Bt/ZuJx REp3SYlX97XKiMC8yXhCAgIMLCxPvUI9RfBVZe3VtJj1D9363Wo/YwRx5b1AeDb9nK4dMpx04/T PuiUOPcA1UaJh4x5qYjcZC8EX/9XTWyGJ2pQXl34PXTebJByKYey/SdM2mO4rr7Kq4y/9HYEB3G Mcg5GEncwSGWQAK3g5fzjUFxilUTyCt/EXfiefzeOlr+goYKex0u9wdK3LHAyXApQ2w9ZR/kjqz sTw+ntDVhRYeEn1G6mWanviGnutcH2OzRiEIKE0xr8WEqJkJS54pHFxhqFIlcnE9EDfcX8jdvjn nX3AG/JFdmAKkKM9ymAalVI+zaoxxHFg== X-Received: by 2002:a05:6102:50a5:b0:7c8:4efe:5243 with SMTP id ada2fe7eead31-7d072c0ccc7mr1621804137.14.1793384847787; Fri, 30 Oct 2026 11:27:27 -0700 (PDT) X-Received: by 2002:a05:6102:50a5:b0:7c8:4efe:5243 with SMTP id ada2fe7eead31-7d072c0ccc7mr1621785137.14.1793384847192; Fri, 30 Oct 2026 11:27:27 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 11/12] tests/tcg/mipsel: Test MIPS32R6 BALC Date: Fri, 30 Oct 2026 19:25:44 +0100 Message-ID: <20261030182546.2508-12-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfXyeMGD1mrFlKt R5aeux8jl0nxiJhkdOKysTv6SZg0V04g7sVWAS1G7UdhG7i3MsvDSlOFFDOVhI97ixrYYJAohwf yCeZQwdd+sLor3EXATocpkCQDNh0wiBEmsN2CfCHcI+/dxVczZb8KX0ABAriXGswjISzmCQdbu3 PL+aE4dA9B/kXF4HnJnWu8d0qIdL1vdx6kFT17kOHsBQlazK1hvMx/AsOX3jBoWC9We84ivqf1s S00SrxPfiulFiD3pbTxS455IBjJf4wTHZympGG5TxVbD9r5PjZirhDuDFy0Bx7dueGAUcAIKUKj PvMJhFkGJlaipXZ8LlXJTTCEyDnKFVx2g1QCP4WahNWAKNzB7jMjK0P47ljoW72o8gmwq6RfD09 1eIgqlwjQ+6kb6ME8MC5uRI/lPR8YF5e30oBUT2bmsMA83llJIe5exp2qtLaHJdPTidihVca3Ng kJmkADmfoconJVYK9EA== X-Proofpoint-GUID: T1HCvmmM0PRGvFUw5HHw_-Sz8GJZmnrO X-Proofpoint-ORIG-GUID: T1HCvmmM0PRGvFUw5HHw_-Sz8GJZmnrO X-Authority-Analysis: v=2.4 cv=IumL47/g c=1 sm=1 tr=0 ts=6ae4e190 cx=c_pps a=KB4UBwrhAZV1kjiGHFQexw==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=_K5XuSEh1TEqbUxoQ0s3:22 a=EUspDBNiAAAA:8 a=hTR_K8myB3fJVw4RT74A:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=o1xkdb1NAhiiM49bd1HK:22 X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX7YbypNJ6T0bu F3g280f2IGVvo9+c2xK2sRsvbBERMDPysUM5u2sBH8w6Zfct4ynOkr2T3blTyeGOcJcRPR/ogeI oxcs8qBYP8DJ9kSAqf3TDU41FCdatYo= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 adultscore=0 clxscore=1015 spamscore=0 bulkscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 impostorscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.168.131; envelope-from=philmd@oss.qualcomm.com; helo=mx0a-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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384894736158500 Add a branch group, starting with BALC. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mipsel/test_mips32r6_branch.c | 53 +++++++++++++++++++++++++ tests/tcg/mipsel/meson.build | 1 + 2 files changed, 54 insertions(+) create mode 100644 tests/tcg/mipsel/test_mips32r6_branch.c diff --git a/tests/tcg/mipsel/test_mips32r6_branch.c b/tests/tcg/mipsel/tes= t_mips32r6_branch.c new file mode 100644 index 000000000000..83580fcbedac --- /dev/null +++ b/tests/tcg/mipsel/test_mips32r6_branch.c @@ -0,0 +1,53 @@ +/* + * MIPS32R6 tests: compact branches and jumps instructions + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include + +#include "../include/tap.h" + +/* + * BALC: branch and link, no delay slot. The callee records $ra and return= s; + * $ra must be the address of the instruction following BALC (label 2). + */ +static int test_balc(void) +{ + uint32_t seen, expected; + + __asm__ volatile ( + ".set push\n\t" + ".set noreorder\n\t" + "move %0, $zero\n\t" + "balc 1f\n\t" + "2: bc 3f\n\t" + "1: move %0, $ra\n\t" + "jrc $ra\n\t" + "3: lapc %1, 2b\n\t" + ".set pop\n\t" + : "=3D&r" (seen), "=3D&r" (expected) + : + : "ra"); + + if (seen !=3D expected) { + TAP_INFO("BALC: ra 0x%08x expected 0x%08x", seen, expected); + } + return seen !=3D expected; +} + +static int run(const char *name, int (*test)(void)) +{ + int ret =3D test(); + + tap_report(!ret, "MIPS32R6 branch %s", name); + return ret; +} + +int main(void) +{ + TAP_START(); + run("BALC", test_balc); + + return tap_done(); +} diff --git a/tests/tcg/mipsel/meson.build b/tests/tcg/mipsel/meson.build index a7af2f16192f..fc27a4f6eb96 100644 --- a/tests/tcg/mipsel/meson.build +++ b/tests/tcg/mipsel/meson.build @@ -68,6 +68,7 @@ tests =3D [] =20 tests_mips32r6 =3D [ 'test_mips32r6_bitops.c', + 'test_mips32r6_branch.c', 'test_mips32r6_logic.c', 'test_mips32r6_multiply.c', 'test_mips32r6_pcrel.c', --=20 2.55.0 From nobody Mon Nov 23 04:26:26 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=oss.qualcomm.com ARC-Seal: i=1; a=rsa-sha256; t=1793384898; cv=none; d=zohomail.com; s=zohoarc; b=kjko/16lLdvQdmF2MdpLSUtWDVDptFy9VI5g3vZdnjWppWMmGShArM+w9uJ5b9IJKcIJCQ8Kkr6YJkYjoyv09Vn3CLABoLVTCG+XbKzr0IeX/ZpL4d4q9J8pMZhXCRcWWjGxkllW6LhEp+4AKW0W5nAsrCccs1Pi0XGHx6qgH2Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1793384898; 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:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=zMHEOtcFQ6bEV7OyRoEDkdIX7g1cFYMoUEq8agwhB74=; b=j+tnA9jtsot8iRyeA0r4ZCU1vuznuLvElu4PgtzvFF9wbjyveX6BPFrKEhfXUwX3Do2au2rOzXrvCG96VoUS1gpokv212NHVH5ijrCPv1CH8Vz0VOY1hkNKA37/Yrk462taBxB/ZEYgsY1MMY0o1Hg262wXjEnA1xdK8iVZNIEY= 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 lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1793384898582401.92452012128433; Fri, 30 Oct 2026 11:28:18 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1xMrKi-0006uE-QQ; Fri, 30 Oct 2026 14:28:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1xMrKF-0006ej-TI for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:42 -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 1xMrKE-0002Rn-AK for qemu-devel@nongnu.org; Fri, 30 Oct 2026 14:27:39 -0400 Received: from pps.filterd (m0279868.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 69UHuLsA3669811 for ; Fri, 30 Oct 2026 18:27:36 GMT Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4hme6qmemq-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Fri, 30 Oct 2026 18:27:35 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-9441113670dso227393485a.0 for ; Fri, 30 Oct 2026 11:27:35 -0700 (PDT) Received: from localhost.localdomain (82-67-153-177.subs.proxad.net. [82.67.153.177]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4abf6e63e0esm101312725e9.12.2026.10.30.11.27.33 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Fri, 30 Oct 2026 11:27:33 -0700 (PDT) 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= zMHEOtcFQ6bEV7OyRoEDkdIX7g1cFYMoUEq8agwhB74=; b=URvE7r/G8iLKTGZY b0UP3HLuDiTS9KK0blLwOFkSFzuz5Afcl2f35CQHcQdjMyXLrE3qxQGZ4Aw6cAtb 4x2DK4l9be0LYWpICj4MYAeHsUo/rZeRjGGBQX9VkvXPFpzb8d8df1PPblHVuUpB op7zgXqtxvaiU3OPAWRhQP9tCoZf+TqVmJSm21SczA9n3SJXOQPHRvjliPMcBAzz FJExkXjcWRY9ddPNWEOnVVYtNmdszJlQjlkaBLKhIEFV8lCgCRscp3iNI6jt7e49 t+XvDjz1Xjr0CIvwz4BNz8hYCIcC9gcw7HhEL3m0kxX3CmxOv7tKjKFb71C1IK2t R5bmxw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1793384855; x=1793989655; darn=nongnu.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=zMHEOtcFQ6bEV7OyRoEDkdIX7g1cFYMoUEq8agwhB74=; b=JJrfojnArZ7o9+4ltIXC71UXBXhFNEWDdanl90CQ7rybZGtVwuiDOEJpYoX1rJFYw6 rQha5pZ3E0QX+zLWOmmkSxhIUHBJmHHH7wvDdIP6GACzdYU0mwWOeHxURd3qOW/J8aLO 3PkNYNvI03yVyz09lZQjgHhebsGqdQYMOK5uFXAJ778GzNK1YEPupeCz7DX9q6KyfTSc AiXko7BeVP4dNM5Q4ssESGXkjjqj44UpC+2O7xx6iWAzZdgpoCC6Z3/lu1X+0N9VaBWL CkMT/vUr+KhSXPaI4ADLtSeL2E4CuAfH5R7vyVvgHnf/IoXruJZIm4O/XVnWJQfqsrmc 6I8w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1793384855; x=1793989655; h=content-transfer-encoding:content-type: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 :content-type; bh=zMHEOtcFQ6bEV7OyRoEDkdIX7g1cFYMoUEq8agwhB74=; b=QjRRc69hDbQAZcQbgU/MgOz3DSJZML36FtD1X1cfitUQNJ3+lQ/unbeOYZh3Ds7Z+P ZMrmKUgHCkhBPEdSKSAaz17tzKEaC+nvJCngG4LBB81XHTp0to5NG0O6z6lpx2/Ge5/Q E2rGSdOFp28G0c47g9nob/l5MVe2cjH5Rh3KKvQa0C9h00RvuVchHGtaS8fad4pZHypt kU0iFbDcw45BFu6xfYA7Wdpgfdsp0KPdvrq1AwHzZNsiBNqOKNor1GiC5u4LaCEwnw8T 13e3q+3HPHHknp9T06b0jEnsWZB81CQ2sovOZZxHDEAQGDIz2zyx8ERYD4Ldm3lTIO1p pG+g== X-Gm-Message-State: AFq9FYIfpDduqNVqWN7XOu5eu3RqjAGpMuwdBD1y9ZAw2t0KTlwMn53F daakA0PL47owv6a1Vfhy3b5WZxPVzVwJCc23xFA9mfhsHVj27y9ULisRkLAkhq+5vlCm/s0bAu9 ZmLWjA9AuFBxVNqo1iO6MVzEgpddnYwmdmvBNCQMYGhq/sJR0Y6G+yRm1DH994YmCfLTv X-Gm-Gg: AYBFou0TYI6SSpx9232OVm6g2SPfzwG+MLmj198IHYHvTeDdEBhSpLGn85Q2QkTCTqD 1ymnHNgsKveiRY8OYk1vccrlAIQLRtweMm50mRBV6pVxQqnM9axmOEjhCpW24mlDnwFslQV8YeZ yqAn7/wTA7esrcZ6m4o5M3tQ6Ekz/nzqU7/fTgB9zjLCnh3yj1Aceo4eKnRIpPLGmWaq9mKczSZ zODAY40pywPBn+eX8wlBKgDytIJ41ccWDTS26kjjXK+EBd/u1EBA4mG2wJ3kHyKeLlMLMHJVAYE Dx6CLOEZgH8KHBkf9I7qTnHtbIO748dnGCvwxJTrn3ZwVeyVqP5i0RMdli91E02ubLAg/UEI1tb 3MIgTuEzsIPTsYXv3tk/ZEwBUFEkwXpwkcCC8lNVkGDWTIx3bQ/PQ8Qp0DVa28Qsu8g7j/pcpOx gTTXV1mkW1+tmzWJSi7DYvcnfeFXejEw== X-Received: by 2002:a05:620a:2a06:b0:940:f2d9:5f43 with SMTP id af79cd13be357-94421588068mr545347385a.6.1793384854920; Fri, 30 Oct 2026 11:27:34 -0700 (PDT) X-Received: by 2002:a05:620a:2a06:b0:940:f2d9:5f43 with SMTP id af79cd13be357-94421588068mr545344185a.6.1793384854515; Fri, 30 Oct 2026 11:27:34 -0700 (PDT) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Jiaxun Yang , =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , Aleksandar Rikalo , Aurelien Jarno Subject: [PATCH v2 12/12] tests/tcg/mipsel: Test MIPS32R6 JIALC and JIC Date: Fri, 30 Oct 2026 19:25:45 +0100 Message-ID: <20261030182546.2508-13-philmd@oss.qualcomm.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20261030182546.2508-1-philmd@oss.qualcomm.com> References: <20261030182546.2508-1-philmd@oss.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Authority-Analysis: v=2.4 cv=KsrYSmWN c=1 sm=1 tr=0 ts=6ae4e197 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=nz36NW0qrpeEijYxj/H2Ew==:17 a=IkcTkHD0fZMA:10 a=660iZSQnnn4A:10 a=M51BFTxLslgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=ZpdpYltYx_vBUK5n70dp:22 a=EUspDBNiAAAA:8 a=eBbVtaSGukq6HTEcENYA:9 a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-ORIG-GUID: Rwt7IrQvwiYBQ1n02e6wRGiOhWsP9v2p X-Proofpoint-GUID: Rwt7IrQvwiYBQ1n02e6wRGiOhWsP9v2p X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX6WZWJQfgA2iF Prg18IJ/Zr3uBDzctHRtnS0M3+g0uLo8E6yFOaEWUeIbgLPSM5eNPibYzKo6xNLjdoQ9LzmI13L BC9L45J1tMlU3RPraYLlipUMHQLNqrLE1vGP7/GpNWBLQoCPtbId8N7lPo1Pp+X3LtJ1D1msWNp nYMyiMwmfcwynTrYq/NY2t090f8Z+WMgrSgnKs3Dy/XfmU3F/zC2zxwsHcOcvDDs7ox6VfLZ5m4 AtUHL6Q4wQfwGgiaGvlRFnbuG5bs+LD6BC2HwKanudxBa+OYBAhornrcyT4MDmPtl94yWL2mNVx oZNLzPTx8K3DGXLp0iBAB4ET2ndgJxx4F0q6W6ZI0Hrkv/btuVVO1k83nOeaf0DgS/ApFq4gJMO Jm8W9eP7a4N6uUAA2dZb9me3x0f1vgqgPcbx4kyr+BdUWs8HMdCv/dFlKk1wjiZCJpMeFL8aq2n g3+71sQEcmsvmINobrA== X-Proofpoint-Spam-Info: AW1haW4tMjYxMDMwMDA3MyBTYWx0ZWRfX9aO+bOWOkUNB VbNDPt/CVVxFEJfWeFZzYGsAaia0tHeCy5F/H/5ks5z6j3UskP9rdbeCYS1vYu52rFmg3fslhW6 czJSGS5SU5ElZaCEeX8ajzYWXf52TL0= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-10-30_06,2026-10-21_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 phishscore=0 priorityscore=1501 malwarescore=0 suspectscore=0 lowpriorityscore=0 impostorscore=0 bulkscore=0 clxscore=1015 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2610190000 definitions=main-2610300073 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=lists1p.gnu.org; Received-SPF: pass client-ip=205.220.180.131; envelope-from=philmd@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, 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 @qualcomm.com) X-ZM-MESSAGEID: 1793384898843158500 Now test JI[AL]C. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Pierrick Bouvier --- tests/tcg/mipsel/test_mips32r6_branch.c | 71 +++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/tests/tcg/mipsel/test_mips32r6_branch.c b/tests/tcg/mipsel/tes= t_mips32r6_branch.c index 83580fcbedac..3c0746c0e028 100644 --- a/tests/tcg/mipsel/test_mips32r6_branch.c +++ b/tests/tcg/mipsel/test_mips32r6_branch.c @@ -36,6 +36,75 @@ static int test_balc(void) return seen !=3D expected; } =20 +/* JIALC rt, offset: call to GPR[rt] + offset, link in $ra. */ +#define JIALC(bias, off, seen, expected, tmp) \ + __asm__ volatile ( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "move %0, $zero\n\t" \ + "lapc %2, 1f\n\t" \ + "addiu %2, %2, " #bias "\n\t" \ + "jialc %2, " #off "\n\t" \ + "2: bc 3f\n\t" \ + "1: move %0, $ra\n\t" \ + "jrc $ra\n\t" \ + "3: lapc %1, 2b\n\t" \ + ".set pop\n\t" \ + : "=3D&r" (seen), "=3D&r" (expected), "=3D&r" (tmp) = \ + : \ + : "ra") + +static int test_jialc(void) +{ + uint32_t seen, expected, tmp; + int ret =3D 0; + + JIALC(0, 0, seen, expected, tmp); + ret |=3D seen !=3D expected; + JIALC(-8, 8, seen, expected, tmp); + ret |=3D seen !=3D expected; + JIALC(8, -8, seen, expected, tmp); + ret |=3D seen !=3D expected; + if (ret) { + TAP_INFO("JIALC: last ra 0x%08x expected 0x%08x", seen, expected); + } + return ret; +} + +/* JIC rt, offset: jump to GPR[rt] + offset, no link ($ra unchanged). */ +#define JIC(bias, off, res, ra_before, ra_after, tmp) \ + __asm__ volatile ( \ + ".set push\n\t" \ + ".set noreorder\n\t" \ + "move %0, $zero\n\t" \ + "move %1, $ra\n\t" \ + "lapc %3, 1f\n\t" \ + "addiu %3, %3, " #bias "\n\t" \ + "jic %3, " #off "\n\t" \ + "addiu %0, %0, 2\n\t" \ + "1: addiu %0, %0, 1\n\t" \ + "move %2, $ra\n\t" \ + ".set pop\n\t" \ + : "=3D&r" (res), "=3D&r" (ra_before), "=3D&r" (ra_after), "=3D&r" = (tmp)) + +static int test_jic(void) +{ + uint32_t res, ra_before, ra_after, tmp; + int ret =3D 0; + + JIC(0, 0, res, ra_before, ra_after, tmp); + ret |=3D res !=3D 1 || ra_before !=3D ra_after; + JIC(-4, 4, res, ra_before, ra_after, tmp); + ret |=3D res !=3D 1 || ra_before !=3D ra_after; + JIC(4, -4, res, ra_before, ra_after, tmp); + ret |=3D res !=3D 1 || ra_before !=3D ra_after; + if (ret) { + TAP_INFO("JIC: last res %u (expected 1) ra 0x%08x -> 0x%08x", + res, ra_before, ra_after); + } + return ret; +} + static int run(const char *name, int (*test)(void)) { int ret =3D test(); @@ -48,6 +117,8 @@ int main(void) { TAP_START(); run("BALC", test_balc); + run("JIALC", test_jialc); + run("JIC", test_jic); =20 return tap_done(); } --=20 2.55.0