get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2230679,
    "url": "http://patchwork.ozlabs.org/api/patches/2230679/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430000524.56046-35-richard.henderson@linaro.org/",
    "project": {
        "id": 14,
        "url": "http://patchwork.ozlabs.org/api/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": "<20260430000524.56046-35-richard.henderson@linaro.org>",
    "list_archive_url": null,
    "date": "2026-04-30T00:05:17",
    "name": "[v2,34/40] target/arm: Use FloatParts64 in bfdotadd_ebf",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "97c0916cb49fbe369da50745c1c6cf240b4cb276",
    "submitter": {
        "id": 72104,
        "url": "http://patchwork.ozlabs.org/api/people/72104/?format=api",
        "name": "Richard Henderson",
        "email": "richard.henderson@linaro.org"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260430000524.56046-35-richard.henderson@linaro.org/mbox/",
    "series": [
        {
            "id": 502170,
            "url": "http://patchwork.ozlabs.org/api/series/502170/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=502170",
            "date": "2026-04-30T00:04:48",
            "name": "fpu: Export some internals for targets",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/502170/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2230679/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2230679/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=b3GRJzBL;\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 4g5ZHk6zgzz1yHZ\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 30 Apr 2026 10:07:46 +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 1wIEwO-0001pX-H8; Wed, 29 Apr 2026 20:07:40 -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 1wIEvc-0008Eg-4O\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 20:06:57 -0400",
            "from mail-pf1-x432.google.com ([2607:f8b0:4864:20::432])\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 1wIEvZ-0001xV-4A\n for qemu-devel@nongnu.org; Wed, 29 Apr 2026 20:06:50 -0400",
            "by mail-pf1-x432.google.com with SMTP id\n d2e1a72fcca58-82f6b592fc7so143258b3a.3\n for <qemu-devel@nongnu.org>; Wed, 29 Apr 2026 17:06:47 -0700 (PDT)",
            "from stoup.. ([180.233.125.15]) by smtp.gmail.com with ESMTPSA id\n d2e1a72fcca58-834ed7ef7a8sm2928667b3a.47.2026.04.29.17.06.44\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 29 Apr 2026 17:06:45 -0700 (PDT)"
        ],
        "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777507606; x=1778112406; 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=Pu3TZxm2iTRUBoR9MHlryIG9+4ZyXp6ZsL5bLZgQwto=;\n b=b3GRJzBLv7zF9txX1X8KGbjNffeFCwZeOzEm6oRSCSHq1vYoPg2uFtSpybUmFveEzn\n qBAfrTV8pNJ14kiaunKcA22zA080i7Pwg35DHoPpb/dNbPAjLaCWy16wQYsXy4asUoqG\n Uc3pmYN81UH0aeSt3TZBcKkkmhKK3EoMne7JSiemiHd+Bv2T5ypRqBmW3OdsZsIaXKqr\n o5y6YSsDAGYFdOYYFj9w3djrdnHqyp41W4k6eNLd0iOIr6j6UiYrlGPqzjL2Zuo875bi\n 6Ha3Vnb55wsXMzRZEQBbiNcnlMfD3N3i7VTii+XrtX/JXR7k5gXHHBU9kkolKjPaUAq2\n mG7A==",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777507606; x=1778112406;\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=Pu3TZxm2iTRUBoR9MHlryIG9+4ZyXp6ZsL5bLZgQwto=;\n b=fmpNiPWh5wi7l4exw5tVkrjqA8m53Df1MXDMoPpx7xYh3hPBUe0cAz/G36OfNXR1ov\n 9ZcmxRtFs6iqUBEHuKdyzFxODTWVF5ONAgEBYDQQsXreH2C79gxEhCoJdsfwvuFLkYuA\n OqGgcFdeUp7RjCUN5SLFjbtAQRAzYXnzxFudfOFKlwvPqtSQVrorXib8LoTNetueME6n\n 4CZgr+cQBKAYiE4Bn8iXO/BdnKvUqHdJ12//Mm8/+XYmRpmFe975hXbi3nFebcGEOBCT\n /9rujDMV2def1bmGPkBoVvc2SN4S5Jm6mBx2hs2vCC4uDskelRwDGXV+FlXPBHoOad8l\n gH1Q==",
        "X-Gm-Message-State": "AOJu0YwJUgsOXd0gZbLrZn+VxAGNIMaQ+G80l3/91AMI+pzRhO7nOkkv\n 0H1kpMExPbnBSWc4hG1au1VwZ/JTKkpRX7iVRoffcsYIasmWKOlxwMKM/pCz9qSkp7SX/9tm1Xo\n 8f8p8sgs=",
        "X-Gm-Gg": "AeBDietxxObbLlKEkjDXgImuPq65IGRBH7gT30fSGxRRlKkYbgkhXBq27F4E8kmTrH/\n UpFA8o4vV0S7AhkibCZ+l/xPh7ovupOO8n4kcsmmdgOScVIbUgzw6H2tcVG3g7v7ajLw4X/Nxj4\n 1H/kW6g88cwA2ipejXYVeBAlHfSKdsccUL3N/v3o/SIdsRi0E4pP8IJkseYHrPAVaYZ8OQag4WF\n QPpSah3ZcUGavRVJ4DerZ0j48vJkSgT36jo4a4g4b/cq1p1HR4stFbyfD9Cofffm6Uq6Xg4L0n2\n gGwG2yOa4ah1iYjCcgwYqH5MlCrQMRlqabYIOvtsaox+V6Lk9H017lKup7SRvWyM4O25OOot4JG\n ddCd/k8Njim5RRl9GwaudmI62pUPdR9snAjuoCT0M280LciK82XYWopD42/wXk1DaOpshRj7CZ8\n Lh8i0zv2B/MiS4Vjbm0d2sRKLrMNMDcoFDhR4rrJXZ",
        "X-Received": "by 2002:a05:6a00:228e:b0:834:df57:9d67 with SMTP id\n d2e1a72fcca58-834fdc16541mr779425b3a.32.1777507605997;\n Wed, 29 Apr 2026 17:06:45 -0700 (PDT)",
        "From": "Richard Henderson <richard.henderson@linaro.org>",
        "To": "qemu-devel@nongnu.org",
        "Cc": "philmd@linaro.org",
        "Subject": "[PATCH v2 34/40] target/arm: Use FloatParts64 in bfdotadd_ebf",
        "Date": "Thu, 30 Apr 2026 10:05:17 +1000",
        "Message-ID": "<20260430000524.56046-35-richard.henderson@linaro.org>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260430000524.56046-1-richard.henderson@linaro.org>",
        "References": "<20260430000524.56046-1-richard.henderson@linaro.org>",
        "MIME-Version": "1.0",
        "Content-Transfer-Encoding": "8bit",
        "Received-SPF": "pass client-ip=2607:f8b0:4864:20::432;\n envelope-from=richard.henderson@linaro.org; helo=mail-pf1-x432.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=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": "Use softfloat-parts.h so that we can more naturally\nperform the required operations witha single rounding step.\nThis happens to also simplify the NaN detection step.\n\nSigned-off-by: Richard Henderson <richard.henderson@linaro.org>\n---\n target/arm/tcg/vec_helper.c | 77 +++++++++++++++++++------------------\n 1 file changed, 40 insertions(+), 37 deletions(-)",
    "diff": "diff --git a/target/arm/tcg/vec_helper.c b/target/arm/tcg/vec_helper.c\nindex 91e98d28ae..85bcaac3d1 100644\n--- a/target/arm/tcg/vec_helper.c\n+++ b/target/arm/tcg/vec_helper.c\n@@ -22,6 +22,7 @@\n #include \"helper.h\"\n #include \"tcg/tcg-gvec-desc.h\"\n #include \"fpu/softfloat.h\"\n+#include \"fpu/softfloat-parts.h\"\n #include \"qemu/int128.h\"\n #include \"crypto/clmul.h\"\n #include \"vec_internal.h\"\n@@ -2895,61 +2896,63 @@ float32 bfdotadd(float32 sum, uint32_t e1, uint32_t e2, float_status *fpst)\n float32 bfdotadd_ebf(float32 sum, uint32_t e1, uint32_t e2,\n                      float_status *fpst, float_status *fpst_odd)\n {\n+    /* Unpack two BFloat16 into two Float32, trivially. */\n     float32 s1r = e1 << 16;\n     float32 s1c = e1 & 0xffff0000u;\n     float32 s2r = e2 << 16;\n     float32 s2c = e2 & 0xffff0000u;\n     float32 t32;\n \n+    /*\n+     * Compare f16_dotadd() in sme_helper.c, but here we have\n+     * bfloat16 inputs. In particular that means that we do not\n+     * want the FPCR.FZ16 flush semantics, so we use the normal\n+     * float_status for the input handling here.\n+     */\n+    FloatParts64 p1r = float32_unpack_canonical(s1r, fpst);\n+    FloatParts64 p1c = float32_unpack_canonical(s1c, fpst);\n+    FloatParts64 p2r = float32_unpack_canonical(s2r, fpst);\n+    FloatParts64 p2c = float32_unpack_canonical(s2c, fpst);\n+\n+    int all_mask = (float_cmask(p1r.cls) | float_cmask(p1c.cls) |\n+                    float_cmask(p1r.cls) | float_cmask(p1c.cls));\n+\n     /* C.f. FPProcessNaNs4 */\n-    if (float32_is_any_nan(s1r) || float32_is_any_nan(s1c) ||\n-        float32_is_any_nan(s2r) || float32_is_any_nan(s2c)) {\n-        if (float32_is_signaling_nan(s1r, fpst)) {\n-            t32 = s1r;\n-        } else if (float32_is_signaling_nan(s1c, fpst)) {\n-            t32 = s1c;\n-        } else if (float32_is_signaling_nan(s2r, fpst)) {\n-            t32 = s2r;\n-        } else if (float32_is_signaling_nan(s2c, fpst)) {\n-            t32 = s2c;\n-        } else if (float32_is_any_nan(s1r)) {\n-            t32 = s1r;\n-        } else if (float32_is_any_nan(s1c)) {\n-            t32 = s1c;\n-        } else if (float32_is_any_nan(s2r)) {\n-            t32 = s2r;\n+    if (unlikely(all_mask & float_cmask_anynan)) {\n+        if (unlikely(all_mask & float_cmask_snan)) {\n+            if (p1r.cls == float_class_snan) {\n+                t32 = s1r;\n+            } else if (p1c.cls == float_class_snan) {\n+                t32 = s1c;\n+            } else if (p2r.cls == float_class_snan) {\n+                t32 = s2r;\n+            } else {\n+                t32 = s2c;\n+            }\n         } else {\n-            t32 = s2c;\n+            if (p1r.cls == float_class_qnan) {\n+                t32 = s1r;\n+            } else if (p1c.cls == float_class_qnan) {\n+                t32 = s1c;\n+            } else if (p2r.cls == float_class_qnan) {\n+                t32 = s2r;\n+            } else {\n+                t32 = s2c;\n+            }\n         }\n         /*\n          * FPConvertNaN(FPProcessNaN(t32)) will be done as part\n          * of the final addition below.\n          */\n     } else {\n-        /*\n-         * Compare f16_dotadd() in sme_helper.c, but here we have\n-         * bfloat16 inputs. In particular that means that we do not\n-         * want the FPCR.FZ16 flush semantics, so we use the normal\n-         * float_status for the input handling here.\n-         */\n-        float64 e1r = float32_to_float64(s1r, fpst);\n-        float64 e1c = float32_to_float64(s1c, fpst);\n-        float64 e2r = float32_to_float64(s2r, fpst);\n-        float64 e2c = float32_to_float64(s2c, fpst);\n-        float64 t64;\n-\n         /*\n          * The ARM pseudocode function FPDot performs both multiplies\n-         * and the add with a single rounding operation.  Emulate this\n-         * by performing the first multiply in round-to-odd, then doing\n-         * the second multiply as fused multiply-add, and rounding to\n-         * float32 all in one step.\n+         * and the add with a single rounding operation.\n          */\n-        t64 = float64_mul(e1r, e2r, fpst_odd);\n-        t64 = float64r32_muladd(e1c, e2c, t64, 0, fpst);\n+        FloatParts64 tmp = parts64_mul(&p1r, &p2r, fpst);\n+        tmp = parts64_muladd(&p1c, &p2c, &tmp, 0, fpst);\n \n-        /* This conversion is exact, because we've already rounded. */\n-        t32 = float64_to_float32(t64, fpst);\n+        t32 = float32_round_pack_canonical(&tmp, fpst);\n     }\n \n     /* The final accumulation step is not fused. */\n",
    "prefixes": [
        "v2",
        "34/40"
    ]
}