{"id":2227607,"url":"http://patchwork.ozlabs.org/api/patches/2227607/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424023606.2556830-8-brian.cain@oss.qualcomm.com/","project":{"id":14,"url":"http://patchwork.ozlabs.org/api/projects/14/?format=json","name":"QEMU Development","link_name":"qemu-devel","list_id":"qemu-devel.nongnu.org","list_email":"qemu-devel@nongnu.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260424023606.2556830-8-brian.cain@oss.qualcomm.com>","list_archive_url":null,"date":"2026-04-24T02:36:04","name":"[PULL,7/9] tests/tcg/hexagon: Add test for revision-gated instruction decoding","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"6380895b496640db1cc93eae8c5e57e4993bf345","submitter":{"id":89839,"url":"http://patchwork.ozlabs.org/api/people/89839/?format=json","name":"Brian Cain","email":"brian.cain@oss.qualcomm.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/qemu-devel/patch/20260424023606.2556830-8-brian.cain@oss.qualcomm.com/mbox/","series":[{"id":501280,"url":"http://patchwork.ozlabs.org/api/series/501280/?format=json","web_url":"http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501280","date":"2026-04-24T02:36:05","name":"[PULL,1/9] Hexagon (target/hexagon) Properly handle Hexagon CPU version","version":1,"mbox":"http://patchwork.ozlabs.org/series/501280/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2227607/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2227607/checks/","tags":{},"related":[],"headers":{"Return-Path":"<qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256\n header.s=qcppdkim1 header.b=WF5DCmqZ;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com\n header.a=rsa-sha256 header.s=google header.b=jCG5Ljda;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists1p.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1xvv1G5Hz1yHv\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 24 Apr 2026 12:38:03 +1000 (AEST)","from localhost ([::1] helo=lists1p.gnu.org)\n\tby lists1p.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces@nongnu.org>)\n\tid 1wG6PD-0006ml-Fu; Thu, 23 Apr 2026 22:36:36 -0400","from eggs.gnu.org ([2001:470:142:3::10])\n by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <brian.cain@oss.qualcomm.com>)\n id 1wG6P5-0006l4-Mk\n for qemu-devel@nongnu.org; Thu, 23 Apr 2026 22:36:29 -0400","from mx0a-0031df01.pphosted.com ([205.220.168.131])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)\n (Exim 4.90_1) (envelope-from <brian.cain@oss.qualcomm.com>)\n id 1wG6P3-0008Kw-Gk\n for qemu-devel@nongnu.org; Thu, 23 Apr 2026 22:36:27 -0400","from pps.filterd (m0279864.ppops.net [127.0.0.1])\n by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id\n 63NMMkSl1823036\n for <qemu-devel@nongnu.org>; Fri, 24 Apr 2026 02:36:24 GMT","from mail-dy1-f199.google.com (mail-dy1-f199.google.com\n [74.125.82.199])\n by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4dqv5rrnas-1\n (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT)\n for <qemu-devel@nongnu.org>; Fri, 24 Apr 2026 02:36:23 +0000 (GMT)","by mail-dy1-f199.google.com with SMTP id\n 5a478bee46e88-2d9da2559aeso19300713eec.0\n for <qemu-devel@nongnu.org>; Thu, 23 Apr 2026 19:36:23 -0700 (PDT)","from hu-bcain-lv.qualcomm.com (Global_NAT1.qualcomm.com.\n [129.46.96.20]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2e539fa6134sm31240868eec.3.2026.04.23.19.36.21\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 23 Apr 2026 19:36:21 -0700 (PDT)"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h=\n cc:content-transfer-encoding:content-type:date:from:in-reply-to\n :message-id:mime-version:references:subject:to; s=qcppdkim1; bh=\n UNaH9nR1gU/V4s0TIc1B0wDDMy/pwvQ55kuRFU1wK/4=; b=WF5DCmqZu83xQyJG\n xBuAvgnWn0M0ZprbAOyuHRcp9/f0panKxOUn8B/G/CWyh6I8b3/hU3+dNifDS7Gp\n X8KONw9eFDR50bOHSFZfVC3kAxuGObkPVl0uVzYU1KU29fvNEZe0Z5eQUDQ6bzaN\n rIp3mk9tbA20wI8LbiP5deMGrsuyyNmyWzg84DueckLzXRwr8mMDfxU9KBmzF6/X\n JJ9UplyTfvGKYB5fclsdOGIhC5Wh0O0VtO5lMfi43acH3lwAgX93SIGQkGXMFV9E\n 8WMeL/x8z9f2fcB4E6wS4VSVM9G0RcYE1Dr8a0oTMw9MV5iO6Jz9615EFpQZctMO\n M8LRXg==","v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=oss.qualcomm.com; s=google; t=1776998183; x=1777602983; darn=nongnu.org;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=UNaH9nR1gU/V4s0TIc1B0wDDMy/pwvQ55kuRFU1wK/4=;\n b=jCG5LjdasN3y0bW+U89jcwXIrui0cFDI/r5NrnTmgsQhE6JJ0hSRZqNPYBLcxPqLtn\n Naxkk3azn+EnVQrZ3vd7EraUxc3hD81/NQAGHMnH5dk1WanjEcnhK5qQerQKgQQ23Lf/\n VxZ7mEiycRxPgYasf0a7tTdeNWo7j4lssYpQH0s1vGjb4A1OAzLho6Jn0cPuH86xde3U\n FJ6muPKMb4TS9M5IBQu+OOydoph+taAYwwQb81HZnIedEWnuqsyM1Oh+bKznMpvu3txg\n PZXOEAGO9Glwz10FahoVtTAvqBNoCkKJVFixv3AW5xV9TmJywtFqfBfjBKVVBNRtJ55R\n o1IA=="],"X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776998183; x=1777602983;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\n bh=UNaH9nR1gU/V4s0TIc1B0wDDMy/pwvQ55kuRFU1wK/4=;\n b=ht+t+e30ajFvACKF6HP951pVjWE9D0tufiTJoDBYAHBZ0QXb+p4U9cl5RwYB1lp7FR\n B+GFyL0bKGhBS0/dnOhSIf58ki96xhIOqvxvZmckjPtEgVb+/NFeLQzxh+3uunz149iq\n YAETTzavx9Jie8byjIKKKelCf9Mybjdr6LePFCA2lg4VMnWjr3LTvZkKh59nt1nHymB9\n To2SyR0Ni1/QjZhPVVd61KPXj0HbxwD4Wvom79a3Jzd9gp3RUzC2BcVZNPcbr6Mgzgr8\n 2GLckso/xz99zoKv4rGOl8rUWwRoRYEaXM60Oii6RIkUxI2r2CW7ERkceT5Ztc36Ko1R\n HmAw==","X-Gm-Message-State":"AOJu0Yyo8I7thmOiF/TSXrMJYM+V0uW0L731LPqkRB3MwjS5NN2OzpXR\n sbnXe9eFWFTJXjR+3jyGTrug1g8bJMnj55fNAn+gmiopbxYjdiqZrDwGbJtOhZep0KIr4NK/8yn\n dE3S66s5qL/n6iNUXRNB60nszJxyLw7IXhCMwZJaH+8FuajdeKsZXus1EBLZuzbcgpQ==","X-Gm-Gg":"AeBDieuJQtxUJIvPoz8AW4t6H1yFMROCHC+n5T5UZ2q2f5S/TNtgw6lr0cmaTXMHuqu\n en0jNql7Pf9aFKf54Dky7B8OGFhKoRzrrdA5hdCEgQLkqf7XDWql1XiuS6C2RCCAHQUiMBP4Gw6\n 5AhaQ7oS62xo4qr/DAGzh5IDDQXp3StI6zUYHAC2eqByLB0euCNsAnt5/OqqFoVW524gL4+frXz\n ZdmFpyOa2teS7RfDLeoHTrwaV2uTNHh6Ag5A+x+FYwqEZ67/hSWY04ci8pXHNaq9d7IN1zTaK9x\n dOavx3gzTOL+l7bIng9rwqKq7gkPEXjgPaqWApUz1HoqnFehyW2nZXlBa6fe1/TaRuJ5kPir9gI\n JtaY4yQO6ikcFJoDxGO3DpEeJOCY8pkJAnchFw/zwVi82H7mgRVsEjWiBqAQyuZ04knaJBVsLsl\n S3fURj","X-Received":["by 2002:a05:693c:60d0:b0:2e7:120:137b with SMTP id\n 5a478bee46e88-2e701202231mr10980110eec.0.1776998182836;\n Thu, 23 Apr 2026 19:36:22 -0700 (PDT)","by 2002:a05:693c:60d0:b0:2e7:120:137b with SMTP id\n 5a478bee46e88-2e701202231mr10980105eec.0.1776998182231;\n Thu, 23 Apr 2026 19:36:22 -0700 (PDT)"],"From":"Brian Cain <brian.cain@oss.qualcomm.com>","To":"qemu-devel@nongnu.org, stefanha@redhat.com","Cc":"brian.cain@oss.qualcomm.com, Taylor Simpson <ltaylorsimpson@gmail.com>,\n Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>,\n Marco Liebel <marco.liebel@oss.qualcomm.com>,\n Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>","Subject":"[PULL 7/9] tests/tcg/hexagon: Add test for revision-gated instruction\n decoding","Date":"Thu, 23 Apr 2026 19:36:04 -0700","Message-Id":"<20260424023606.2556830-8-brian.cain@oss.qualcomm.com>","X-Mailer":"git-send-email 2.34.1","In-Reply-To":"<20260424023606.2556830-1-brian.cain@oss.qualcomm.com>","References":"<20260424023606.2556830-1-brian.cain@oss.qualcomm.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","X-Authority-Analysis":"v=2.4 cv=LqiiDHdc c=1 sm=1 tr=0 ts=69ead728 cx=c_pps\n a=cFYjgdjTJScbgFmBucgdfQ==:117 a=ouPCqIW2jiPt+lZRy3xVPw==:17\n a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10\n a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22\n a=pGLkceISAAAA:8 a=EUspDBNiAAAA:8 a=Q1r81TyBglNDNhbJMaAA:9 a=QEXdDO2ut3YA:10\n a=scEy_gLbYbu1JhEsrz4S:22","X-Proofpoint-ORIG-GUID":"FSeJSN5Q6ulLpZSlI1Ly8Le7XRGgpEDd","X-Proofpoint-GUID":"FSeJSN5Q6ulLpZSlI1Ly8Le7XRGgpEDd","X-Proofpoint-Spam-Details-Enc":"AW1haW4tMjYwNDI0MDAyMCBTYWx0ZWRfX7t3vsd+i0nLs\n 909WNLdMK8zZUgY6rTdo/Vfi8uLTZZpVA4Wu8OwnooQqtVX3GwpIKbULJsDS4l6efy5qsTur2el\n CJuqWgjIbhRJHSFTRdS+L7941aUUf4ivybF1dypfy7asqFLg1BuQZUraJz74lD/oVHw8pN3gt7E\n 6W2SKoBcZXg9gsOfqH7KoK/X8gzwRAk+dTDLy/KdML64m/X9Lb/CtV90y7E/roWHDdNMnzJxHw/\n ignLgxYWncCgDcw5M4+NNTDjTt73/bGLBIAkR8vLY+LJU+mTAAz6s+scUq/ec/suCv/0Dpzj9+E\n oeFDSgnICeARqc+nVA2GROIdiEx6ar7r1Dg3aG1OgewJ6jj0mcqXraw69cZEREf0flHid1amiwC\n MPG+YZYrbo1OIgbErY9Yri3ijWlmDfYG79pEi8p+9ip4oryXbWztqO/FBbbJruC3N1lzh4itVe9\n rNrPViTloiNGTewdPqw==","X-Proofpoint-Virus-Version":"vendor=baseguard\n engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49\n definitions=2026-04-23_03,2026-04-21_02,2025-10-01_01","X-Proofpoint-Spam-Details":"rule=outbound_notspam policy=outbound score=0\n spamscore=0 bulkscore=0 clxscore=1015 impostorscore=0 lowpriorityscore=0\n malwarescore=0 suspectscore=0 adultscore=0 phishscore=0 priorityscore=1501\n classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0\n reason=mlx scancount=1 engine=8.22.0-2604200000 definitions=main-2604240020","Received-SPF":"pass client-ip=205.220.168.131;\n envelope-from=brian.cain@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,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001,\n 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 <qemu-devel.nongnu.org>","List-Unsubscribe":"<https://lists.nongnu.org/mailman/options/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe>","List-Archive":"<https://lists.nongnu.org/archive/html/qemu-devel>","List-Post":"<mailto:qemu-devel@nongnu.org>","List-Help":"<mailto:qemu-devel-request@nongnu.org?subject=help>","List-Subscribe":"<https://lists.nongnu.org/mailman/listinfo/qemu-devel>,\n <mailto:qemu-devel-request@nongnu.org?subject=subscribe>","Errors-To":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org","Sender":"qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org"},"content":"Add check_rev_gating, a linux-user test that verifies the decoder\nrejects instructions from a newer CPU revision than the one selected\nby the ELF binary's e_flags.\n\nCo-authored-by: Taylor Simpson <ltaylorsimpson@gmail.com>\nCo-authored-by: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>\nReviewed-by: Marco Liebel <marco.liebel@oss.qualcomm.com>\nSigned-off-by: Brian Cain <brian.cain@oss.qualcomm.com>\n---\n tests/tcg/hexagon/check_rev_gating.c | 141 +++++++++++++++++++++++++++\n tests/tcg/hexagon/Makefile.target    |   6 ++\n 2 files changed, 147 insertions(+)\n create mode 100644 tests/tcg/hexagon/check_rev_gating.c","diff":"diff --git a/tests/tcg/hexagon/check_rev_gating.c b/tests/tcg/hexagon/check_rev_gating.c\nnew file mode 100644\nindex 00000000000..26b66f54552\n--- /dev/null\n+++ b/tests/tcg/hexagon/check_rev_gating.c\n@@ -0,0 +1,141 @@\n+/*\n+ * Test that instructions from a newer revision than the running CPU\n+ * are rejected with SIGILL.\n+ *\n+ * Compiled with -mv66 so that e_flags selects CPU v66. The test embeds\n+ * a v68 instruction (L2_loadw_aq: \"r0 = memw_aq(r0)\") via .word\n+ * encoding. The revision-gated decoder must reject it, and linux-user\n+ * must deliver SIGILL.\n+ *\n+ * Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.\n+ * SPDX-License-Identifier: GPL-2.0-or-later\n+ */\n+\n+#include <assert.h>\n+#include <signal.h>\n+#include <stdio.h>\n+#include <stdlib.h>\n+#include <string.h>\n+#include <unistd.h>\n+\n+static void *resume_pc;\n+static int signals_handled;\n+static int expected_signals;\n+\n+static void handle_sigill(int sig, siginfo_t *info, void *puc)\n+{\n+    ucontext_t *uc = (ucontext_t *)puc;\n+\n+    if (sig != SIGILL) {\n+        _exit(EXIT_FAILURE);\n+    }\n+\n+    uc->uc_mcontext.r0 = SIGILL;\n+    uc->uc_mcontext.pc = (unsigned long)resume_pc;\n+    signals_handled++;\n+}\n+\n+/*\n+ * Try to execute an instruction introduced after v66\n+ * On a v66 CPU this must raise SIGILL.\n+ *\n+ * Since we are building for v66, the assembler will reject\n+ * the instructions, so introduce them with .word.\n+ */\n+#define TRY_FUNC(NAME, WORD) \\\n+static int try_##NAME(void) \\\n+{ \\\n+    int sig; \\\n+    expected_signals++; \\\n+    asm volatile( \\\n+        \"r0 = #0\\n\" \\\n+        \"r1 = ##1f\\n\" \\\n+        \"memw(%1) = r1\\n\" \\\n+        WORD \\\n+        \"1:\\n\" \\\n+        \"%0 = r0\\n\" \\\n+        : \"=r\"(sig) \\\n+        : \"r\"(&resume_pc) \\\n+        : \"r0\", \"r1\", \"memory\"); \\\n+    return sig; \\\n+}\n+\n+TRY_FUNC(v68_loadw_aq,\n+         \".word 0x9200c800    /* { r0 = memw_aq(r0) } */\\n\")\n+TRY_FUNC(v68_loadd_aq,\n+         \".word 0x9201d800    /* r1:0 = memd_aq(r1) */\\n\")\n+TRY_FUNC(v68_release_at,\n+         \".word 0xa0e0c00c    /* release(r0):at */\\n\")\n+TRY_FUNC(v68_release_st,\n+         \".word 0xa0e0c02c    /* release(r0):st */\\n\")\n+TRY_FUNC(v68_storew_rl_at,\n+         \".word 0xa0a0c108    /* memw_rl(r0):at = r1 */\\n\")\n+TRY_FUNC(v68_stored_rl_at,\n+         \".word 0xa0e2c008    /* memd_rl(r2):at = r1:0 */\\n\")\n+TRY_FUNC(v68_storew_rl_st,\n+         \".word 0xa0a0c128    /* memw_rl(r0):st = r1 */\\n\")\n+TRY_FUNC(v68_stored_rl_st,\n+         \".word 0xa0e2c028    /* memd_rl(r2):st = r1:0 */\\n\")\n+\n+TRY_FUNC(v68hvx_v6mpy,\n+         \".word 0x1f42e424    /* v5:4.w = v6mpy(v5:4.ub, v3:2.b, #1):v */\\n\")\n+\n+TRY_FUNC(v69hvx_vasrvuhubrndsat,\n+         \".word 0x1d06c465    /* v5.ub = vasr(v5:4.uh, v6.ub):rnd:sat */\\n\")\n+TRY_FUNC(v69hvx_vasrvuhubsat,\n+         \".word 0x1d06c445    /* v5.ub = vasr(v5:4.uh, v6.ub):sat */\\n\")\n+TRY_FUNC(v69hvx_vasrvwuhrndsat,\n+         \".word 0x1d06c425    /* v5.uh = vasr(v5:4.w, v6.uh):rnd:sat */\\n\")\n+TRY_FUNC(v69hvx_vasrvwuhsat,\n+         \".word 0x1d06c405    /* v5.uh = vasr(v5:4.w, v6.uh):sat */\\n\")\n+TRY_FUNC(v69hvx_vassign_tmp,\n+         \".word 0x1e014dcc    /* { v12.tmp = v13 */\\n\"\n+         \".word 0x1c43cc04    /*    v4.w = vadd(v12.w, v3.w) } */\\n\")\n+TRY_FUNC(v69hvx_vcombine_tmp,\n+         \".word 0x1eae4fec    /* { v13:12.tmp = vcombine(v15, v14) */\\n\"\n+         \".word 0x1c434c04    /*   v4.w = vadd(v12.w, v3.w) */\\n\"\n+         \".word 0x1e03edf0    /*   v16 = v13 } */\\n\")\n+TRY_FUNC(v69hvx_vmpyuhvs,\n+         \".word 0x1fc5e4e4    /* v4.uh = vmpy(V4.uh, v5.uh):>>16 */\\n\")\n+\n+TRY_FUNC(v73_callrh,\n+         \".word 0x50c5c000    /* callrh r5 */\\n\")\n+TRY_FUNC(v73_jumprh,\n+         \".word 0x52c0c000    /* jumprh r0 */\\n\")\n+\n+int main(void)\n+{\n+    struct sigaction act;\n+\n+    memset(&act, 0, sizeof(act));\n+    act.sa_sigaction = handle_sigill;\n+    act.sa_flags = SA_SIGINFO;\n+    assert(sigaction(SIGILL, &act, NULL) == 0);\n+\n+    assert(try_v68_loadw_aq() == SIGILL);\n+    assert(try_v68_loadd_aq() == SIGILL);\n+    assert(try_v68_release_at() == SIGILL);\n+    assert(try_v68_release_st() == SIGILL);\n+    assert(try_v68_storew_rl_at() == SIGILL);\n+    assert(try_v68_stored_rl_at() == SIGILL);\n+    assert(try_v68_storew_rl_st() == SIGILL);\n+    assert(try_v68_stored_rl_st() == SIGILL);\n+\n+    assert(try_v68hvx_v6mpy() == SIGILL);\n+\n+    assert(try_v69hvx_vasrvuhubrndsat() == SIGILL);\n+    assert(try_v69hvx_vasrvuhubsat() == SIGILL);\n+    assert(try_v69hvx_vasrvwuhrndsat() == SIGILL);\n+    assert(try_v69hvx_vasrvwuhsat() == SIGILL);\n+    assert(try_v69hvx_vassign_tmp() == SIGILL);\n+    assert(try_v69hvx_vcombine_tmp() == SIGILL);\n+    assert(try_v69hvx_vmpyuhvs() == SIGILL);\n+\n+    assert(try_v73_callrh() == SIGILL);\n+    assert(try_v73_jumprh() == SIGILL);\n+\n+    assert(signals_handled == expected_signals);\n+\n+    puts(\"PASS\");\n+    return EXIT_SUCCESS;\n+}\ndiff --git a/tests/tcg/hexagon/Makefile.target b/tests/tcg/hexagon/Makefile.target\nindex 549c95082f6..09f0502abc5 100644\n--- a/tests/tcg/hexagon/Makefile.target\n+++ b/tests/tcg/hexagon/Makefile.target\n@@ -81,6 +81,7 @@ HEX_TESTS += test_vminh\n HEX_TESTS += test_vpmpyh\n HEX_TESTS += test_vspliceb\n \n+HEX_TESTS += check_rev_gating\n HEX_TESTS += test_pnew_jump_loads\n \n HEX_TESTS += v68_scalar\n@@ -109,6 +110,11 @@ reg_mut: reg_mut.c hex_test.h\n test_pnew_jump_loads: test_pnew_jump_loads.c hex_test.h\n unaligned_pc: unaligned_pc.c\n \n+# Compile for v66 so that the ELF selects a v66 CPU; the test then\n+# exercises revision gating by executing a v68 .word instruction.\n+check_rev_gating: check_rev_gating.c\n+\t$(CC) $(CFLAGS) -mv66 -O2 $< -o $@ $(LDFLAGS)\n+\n # This test has to be compiled for the -mv67t target\n usr: usr.c hex_test.h\n \t$(CC) $(CFLAGS) -mv67t -O2 -Wno-inline-asm -Wno-expansion-to-defined $< -o $@ $(LDFLAGS)\n","prefixes":["PULL","7/9"]}