get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/1.2/patches/2234708/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 2234708,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/2234708/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260507234413.643512-38-richard.henderson@linaro.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/14/?format=api",
        "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": "<20260507234413.643512-38-richard.henderson@linaro.org>",
    "list_archive_url": null,
    "date": "2026-05-07T23:43:50",
    "name": "[v4,37/60] target/arm: Implement LUTI2, LUTI4 for SVE",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "66b7f279720e6e6915fb4003720dd4fb2d413a8d",
    "submitter": {
        "id": 72104,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/72104/?format=api",
        "name": "Richard Henderson",
        "email": "richard.henderson@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260507234413.643512-38-richard.henderson@linaro.org/mbox/",
    "series": [
        {
            "id": 503296,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/503296/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=503296",
            "date": "2026-05-07T23:43:14",
            "name": "target/arm: Implement FEAT_FP8",
            "version": 4,
            "mbox": "http://patchwork.ozlabs.org/series/503296/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2234708/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2234708/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=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=dkq+ASBh;\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 4gBTZD1k8Kz1yK7\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 08 May 2026 09:52:20 +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 1wL8Oq-0000pF-8R; Thu, 07 May 2026 19:45:00 -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 <richard.henderson@linaro.org>)\n id 1wL8Ol-0000kB-TU\n for qemu-devel@nongnu.org; Thu, 07 May 2026 19:44:55 -0400",
            "from mail-ot1-x336.google.com ([2607:f8b0:4864:20::336])\n by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)\n (Exim 4.90_1) (envelope-from <richard.henderson@linaro.org>)\n id 1wL8Oj-0001E2-FF\n for qemu-devel@nongnu.org; Thu, 07 May 2026 19:44:55 -0400",
            "by mail-ot1-x336.google.com with SMTP id\n 46e09a7af769-7d1872504cbso1372445a34.0\n for <qemu-devel@nongnu.org>; Thu, 07 May 2026 16:44:52 -0700 (PDT)",
            "from stoup.attlocal.net ([2600:381:c938:6375:9641:bbb2:a93a:bb4c])\n by smtp.gmail.com with ESMTPSA id\n 46e09a7af769-7e367d8feb1sm84320a34.23.2026.05.07.16.44.50\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Thu, 07 May 2026 16:44:50 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1778197491; x=1778802291; 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=3p/DaDsT5qO4qa1cg1PpZf28HBMBwainklY1VNYDgm0=;\n b=dkq+ASBhBBn9kJdhE9Fzuo8nClIUDSvasJ/2W77ea9S0p01jV+/JUlRMEopI+q/iHb\n vxo121DPwfrYx+0EZQ6pBL75XsGWVpGbRDNQHPJNQVa+w6+3r7xmAfriTticT67WHXI8\n kimlWKn7vqETWNNy5mQKlNPTg+8cpKBwEerIRr3Ld41lyrtaIt2jC23u+TfuU3bTONkF\n nZOFfxbo5oridH9+QPb1oFhVzuUB6Yq4uJHFO7+uju4vM6LzZUQ4ZCdZbg+CMdz3Cuxt\n EJKZskMXdY1oiXi7a6Y1Kq8Hl0TdbaRPyOXTyo1M1URqtAw7C6YDx9fbzQn2EzT8xoZ6\n +9nQ==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1778197491; x=1778802291;\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=3p/DaDsT5qO4qa1cg1PpZf28HBMBwainklY1VNYDgm0=;\n b=nY0Pfr9+dX2d5vgiWDyYMy8Xx446kGZDPS/BvcfEt0al3khXdXIVW/MaOL7toucWuN\n RlxcIdHZVGnhVXZu9d8dBTcO2PaZvTfcT3PJETKdIo++sSJT00fUHmtCPiNMJYNEvPDU\n A2+kzYbrUO8zJHfgpCXteDVH+DjFWw2uMTiHjMYAix/nhk1e0syOrFNMURLxZZRDtU8L\n 3h45hyLka19zsct808SifYt/YQ5FIyTI7ejaEOwcppidg/nyIugypH1MfRrWjzPV/zef\n pj659Kq9yZmHnh3fAX/NL1iLeuR4kX8p56tgerygL62TeAx4HyK93uS0xfU06cQCmGxA\n GcVw==",
        "X-Gm-Message-State": "AOJu0YwVVYigcpQBa/VKO3ffayfmofn42z4FBcJu5nC5ggQy6kMztJPK\n qqbv6XTEpZMjl+vKkffjXop+RhPvF0mQ1geALNfGZ40EG8hmiD3bCi7QvMhxPl8A+Gw5zz2ME1V\n e9d5Y",
        "X-Gm-Gg": "AeBDietVc9VSYAe/M02TuOzAJNQZpwhmxPD/Y8qM6Zx5fZeYiD9pNUxeKLMiuBCr9L1\n zI74Az6qGcHvEQ2a6jH97bOiF4W2cM6zjmf9Q1rMfTTLdBDPH8it8NKxyZFAs8JhWVR1UX8BDpF\n dtzxtdNJz0AzqVEybd1cHcO7yADKmXmEAfqwYb/kyU/uUk0da0LTCKVblamM+cVc1prmuCzVDhN\n hO5wdIqZa0l6tQEDF4sOpcvJYo+afCITccVhQBhh+zKdbhr3Is43Hn+2abocXx8/mdX9Pn2Vk42\n n2krTb+4fV3HAR5sP4/3iodKM1CPzL69xLg18IpN9fa3xBjVFfTEUIQWT8RLhGDFZlHAV8h1fLx\n S2KISOG81bK7P9KxfS5OlQCKAzYLKAoNoILOvnMBditdD8lR2bycdfy37j/msryH2oWI2BdHRPE\n i35xQF1GXA4pHNfAtkUlq8gKpVj47GmNHYLTp7ZFcofb8N0cSX4XCN5LHCYUb63uBCn6w=",
        "X-Received": "by 2002:a05:6830:6004:b0:7dc:e43f:4b31 with SMTP id\n 46e09a7af769-7e1fd21b0cbmr3120787a34.12.1778197490606;\n Thu, 07 May 2026 16:44:50 -0700 (PDT)",
        "From": "Richard Henderson <richard.henderson@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "qemu-arm@nongnu.org",
        "Subject": "[PATCH v4 37/60] target/arm: Implement LUTI2, LUTI4 for SVE",
        "Date": "Thu,  7 May 2026 18:43:50 -0500",
        "Message-ID": "<20260507234413.643512-38-richard.henderson@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260507234413.643512-1-richard.henderson@linaro.org>",
        "References": "<20260507234413.643512-1-richard.henderson@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::336;\n envelope-from=richard.henderson@linaro.org; helo=mail-ot1-x336.google.com",
        "X-Spam_score_int": "-20",
        "X-Spam_score": "-2.1",
        "X-Spam_bar": "--",
        "X-Spam_report": "(-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,\n DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,\n RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001,\n SPF_PASS=-0.001 autolearn=unavailable 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": "Signed-off-by: Richard Henderson <richard.henderson@linaro.org>\n---\n target/arm/cpu-features.h      |  6 +++\n target/arm/tcg/translate.h     |  8 ++++\n target/arm/tcg/translate-a64.c |  1 +\n target/arm/tcg/translate-sve.c | 68 ++++++++++++++++++++++++++++++++++\n target/arm/tcg/sve.decode      | 11 +++++-\n 5 files changed, 93 insertions(+), 1 deletion(-)",
    "diff": "diff --git a/target/arm/cpu-features.h b/target/arm/cpu-features.h\nindex c1f092b690..47294eb807 100644\n--- a/target/arm/cpu-features.h\n+++ b/target/arm/cpu-features.h\n@@ -1643,6 +1643,12 @@ isar_feature_aa64_sme2_or_sve2_f8cvt(const ARMISARegisters *id)\n     return isar_feature_aa64_sme2_or_sve2(id) && isar_feature_aa64_f8cvt(id);\n }\n \n+static inline bool\n+isar_feature_aa64_sme2_or_sve2_lut(const ARMISARegisters *id)\n+{\n+    return isar_feature_aa64_sme2_or_sve2(id) && isar_feature_aa64_lut(id);\n+}\n+\n /*\n  * Feature tests for \"does this exist in either 32-bit or 64-bit?\"\n  */\ndiff --git a/target/arm/tcg/translate.h b/target/arm/tcg/translate.h\nindex 1648c2c96f..b703e75b70 100644\n--- a/target/arm/tcg/translate.h\n+++ b/target/arm/tcg/translate.h\n@@ -90,6 +90,7 @@ typedef struct DisasContext {\n     int vl;          /* current vector length in bytes */\n     int svl;         /* current streaming vector length in bytes */\n     int max_svl;     /* maximum implemented streaming vector length */\n+    int max_any_vl;  /* maximum implemented vector length */\n     bool vfp_enabled; /* FP enabled via FPSCR.EN */\n     int vec_len;\n     int vec_stride;\n@@ -874,4 +875,11 @@ static inline void gen_restore_rmode(TCGv_i32 old, TCGv_ptr fpst)\n         return dc_isar_feature(FEAT, s) && FUNC(s, __VA_ARGS__);  \\\n     }\n \n+#define TRANS_FEAT_SME1_NONSTREAMING(NAME, FEAT, FUNC, ...)       \\\n+    static bool trans_##NAME(DisasContext *s, arg_##NAME *a)      \\\n+    {                                                             \\\n+        s->is_nonstreaming = !dc_isar_feature(aa64_sme2, s);      \\\n+        return dc_isar_feature(FEAT, s) && FUNC(s, __VA_ARGS__);  \\\n+    }\n+\n #endif /* TARGET_ARM_TRANSLATE_H */\ndiff --git a/target/arm/tcg/translate-a64.c b/target/arm/tcg/translate-a64.c\nindex 508d8e377b..ee71c63116 100644\n--- a/target/arm/tcg/translate-a64.c\n+++ b/target/arm/tcg/translate-a64.c\n@@ -10820,6 +10820,7 @@ static void aarch64_tr_init_disas_context(DisasContextBase *dcbase,\n     dc->vl = (EX_TBFLAG_A64(tb_flags, VL) + 1) * 16;\n     dc->svl = (EX_TBFLAG_A64(tb_flags, SVL) + 1) * 16;\n     dc->max_svl = arm_cpu->sme_max_vq * 16;\n+    dc->max_any_vl = MAX(dc->max_svl, arm_cpu->sve_max_vq * 16);\n     dc->pauth_active = EX_TBFLAG_A64(tb_flags, PAUTH_ACTIVE);\n     dc->bt = EX_TBFLAG_A64(tb_flags, BT);\n     dc->btype = EX_TBFLAG_A64(tb_flags, BTYPE);\ndiff --git a/target/arm/tcg/translate-sve.c b/target/arm/tcg/translate-sve.c\nindex 13f7ab01af..ea0d66178e 100644\n--- a/target/arm/tcg/translate-sve.c\n+++ b/target/arm/tcg/translate-sve.c\n@@ -8268,3 +8268,71 @@ TRANS_FEAT(LD1_zcrr_stride, aa64_sme2, gen_ldst_zcrr_c, a, false, true)\n TRANS_FEAT(LD1_zcri_stride, aa64_sme2, gen_ldst_zcri_c, a, false, true)\n TRANS_FEAT(ST1_zcrr_stride, aa64_sme2, gen_ldst_zcrr_c, a, true, true)\n TRANS_FEAT(ST1_zcri_stride, aa64_sme2, gen_ldst_zcri_c, a, true, true)\n+\n+TRANS_FEAT_SME1_NONSTREAMING(LUTI2_1b, aa64_sme2_or_sve2_lut,\n+                             gen_gvec_ool_zzz, gen_helper_gvec_luti2_b,\n+                             a->rd, a->rn, a->rm, a->index)\n+TRANS_FEAT_SME1_NONSTREAMING(LUTI2_1h, aa64_sme2_or_sve2_lut,\n+                             gen_gvec_ool_zzz, gen_helper_gvec_luti2_h,\n+                             a->rd, a->rn, a->rm, a->index)\n+TRANS_FEAT_SME1_NONSTREAMING(LUTI4_1b, aa64_sme2_or_sve2_lut,\n+                             gen_gvec_ool_zzz, gen_helper_gvec_luti4_b,\n+                             a->rd, a->rn, a->rm, a->index)\n+\n+static bool trans_LUTI4_1h(DisasContext *s, arg_LUTI4_1h *a)\n+{\n+    if (!dc_isar_feature(aa64_sme2_or_sve2_lut, s)) {\n+        return false;\n+    }\n+    s->is_nonstreaming = !dc_isar_feature(aa64_sme2, s);\n+\n+    /*\n+     * The MaxImplementedAnyVL check happens in the decode pseudocode,\n+     * before the Check*SVEEnabled check in the operation pseudocode.\n+     */\n+    if (s->max_any_vl < 32) {\n+        unallocated_encoding(s);\n+    } else if (sve_access_check(s)) {\n+        unsigned vsz = vec_full_reg_size(s);\n+\n+        /* Then there's a second check against CurrentVL. */\n+        if (vsz < 32) {\n+            unallocated_encoding(s);\n+        } else {\n+            tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd),\n+                               vec_full_reg_offset(s, a->rn),\n+                               vec_full_reg_offset(s, a->rm),\n+                               vsz, vsz, a->index,\n+                               gen_helper_gvec_luti4_h);\n+        }\n+    }\n+    return true;\n+}\n+\n+static bool trans_LUTI4_2h(DisasContext *s, arg_LUTI4_2h *a)\n+{\n+    if (!dc_isar_feature(aa64_sme2_or_sve2_lut, s)) {\n+        return false;\n+    }\n+    s->is_nonstreaming = !dc_isar_feature(aa64_sme2, s);\n+\n+    if (sve_access_check(s)) {\n+        unsigned vsz = vec_full_reg_size(s);\n+        /*\n+         * (Ab)use preg_tmp to merge two disjoint 128-bit quantities\n+         * into a sequential 256-bit table.\n+         */\n+        QEMU_BUILD_BUG_ON(sizeof_field(CPUARMState, vfp.preg_tmp) < 32);\n+        unsigned tmp_ofs = offsetof(CPUARMState, vfp.preg_tmp);\n+        unsigned rn0_ofs = vec_full_reg_offset(s, a->rn);\n+        unsigned rn1_ofs = vec_full_reg_offset(s, (a->rn + 1) % 32);\n+\n+        tcg_gen_gvec_mov(MO_64, tmp_ofs, rn0_ofs, 16, 16);\n+        tcg_gen_gvec_mov(MO_64, tmp_ofs + 16, rn1_ofs, 16, 16);\n+\n+        tcg_gen_gvec_3_ool(vec_full_reg_offset(s, a->rd), tmp_ofs,\n+                           vec_full_reg_offset(s, a->rm),\n+                           vsz, vsz, a->index, gen_helper_gvec_luti4_h);\n+    }\n+    return true;\n+}\ndiff --git a/target/arm/tcg/sve.decode b/target/arm/tcg/sve.decode\nindex 72755b27af..e2106fc7f5 100644\n--- a/target/arm/tcg/sve.decode\n+++ b/target/arm/tcg/sve.decode\n@@ -31,6 +31,7 @@\n %dtype_23_13    23:2 13:2\n %index3_22_19   22:1 19:2\n %index3_22_17   22:1 17:2\n+%index3_22_12   22:2 12:1\n %index3_19_11   19:2 11:1\n %index2_20_11   20:1 11:1\n \n@@ -1737,11 +1738,19 @@ RSUBHNT         01000101 .. 1 ..... 011 111 ..... .....  @rd_rn_rm\n MATCH           01000101 .. 1 ..... 100 ... ..... 0 .... @pd_pg_rn_rm\n NMATCH          01000101 .. 1 ..... 100 ... ..... 1 .... @pd_pg_rn_rm\n \n-### SVE2 Histogram Computation\n+### SVE2 Histogram Computation and Lookup Table\n \n HISTCNT         01000101 .. 1 ..... 110 ... ..... .....  @rd_pg_rn_rm\n HISTSEG         01000101 .. 1 ..... 101 000 ..... .....  @rd_rn_rm\n \n+LUTI2_1b        01000101 index:2  1 rm:5 101100 rn:5 rd:5 &rrx_esz esz=0\n+LUTI2_1h        01000101 ..       1 rm:5 101.10 rn:5 rd:5 \\\n+                &rrx_esz esz=1 index=%index3_22_12\n+\n+LUTI4_1b        01000101 index:1 11 rm:5 101001 rn:5 rd:5 &rrx_esz esz=0\n+LUTI4_1h        01000101 index:2  1 rm:5 101111 rn:5 rd:5 &rrx_esz esz=1\n+LUTI4_2h        01000101 index:2  1 rm:5 101101 rn:5 rd:5 &rrx_esz esz=1\n+\n ## SVE2 floating-point pairwise operations\n \n FADDP           01100100 .. 010 00 0 100 ... ..... ..... @rdn_pg_rm\n",
    "prefixes": [
        "v4",
        "37/60"
    ]
}