get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 2216422,
    "url": "http://patchwork.ozlabs.org/api/patches/2216422/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/opensbi/patch/20260326115517.2156-3-dave.patel@riscstar.com/",
    "project": {
        "id": 67,
        "url": "http://patchwork.ozlabs.org/api/projects/67/?format=api",
        "name": "OpenSBI development",
        "link_name": "opensbi",
        "list_id": "opensbi.lists.infradead.org",
        "list_email": "opensbi@lists.infradead.org",
        "web_url": "https://github.com/riscv/opensbi",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": "https://github.com/riscv/opensbi/commit/{}"
    },
    "msgid": "<20260326115517.2156-3-dave.patel@riscstar.com>",
    "list_archive_url": null,
    "date": "2026-03-26T11:55:16",
    "name": "[v2,2/3] lib: sbi: Add floating-point context save/restore support.",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "0166eddbf3e79c5a0ff373396782a1aa5eebd8d4",
    "submitter": {
        "id": 92617,
        "url": "http://patchwork.ozlabs.org/api/people/92617/?format=api",
        "name": "Dave Patel",
        "email": "dave.patel@riscstar.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/opensbi/patch/20260326115517.2156-3-dave.patel@riscstar.com/mbox/",
    "series": [
        {
            "id": 497579,
            "url": "http://patchwork.ozlabs.org/api/series/497579/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/opensbi/list/?series=497579",
            "date": "2026-03-26T11:55:16",
            "name": "[v2,1/3] lib: sbi: Add RISC-V vector context save/restore support (eager switching)",
            "version": 2,
            "mbox": "http://patchwork.ozlabs.org/series/497579/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/2216422/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/2216422/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "\n <opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.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 secure) header.d=lists.infradead.org header.i=@lists.infradead.org\n header.a=rsa-sha256 header.s=bombadil.20210309 header.b=rPr0h2Xd;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=riscstar-com.20230601.gappssmtp.com\n header.i=@riscstar-com.20230601.gappssmtp.com header.a=rsa-sha256\n header.s=20230601 header.b=OX1YL6WR;\n\tdkim-atps=neutral",
            "legolas.ozlabs.org;\n spf=none (no SPF record) smtp.mailfrom=lists.infradead.org\n (client-ip=2607:7c80:54:3::133; helo=bombadil.infradead.org;\n envelope-from=opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org;\n receiver=patchwork.ozlabs.org)"
        ],
        "Received": [
            "from bombadil.infradead.org (bombadil.infradead.org\n [IPv6:2607:7c80:54:3::133])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fhMgd1Vn4z1y1G\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 26 Mar 2026 22:56:26 +1100 (AEDT)",
            "from localhost ([::1] helo=bombadil.infradead.org)\n\tby bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w5jJx-00000005O2Q-3v67;\n\tThu, 26 Mar 2026 11:56:17 +0000",
            "from mail-wr1-x435.google.com ([2a00:1450:4864:20::435])\n\tby bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux))\n\tid 1w5jJs-00000005Nzp-0NKp\n\tfor opensbi@lists.infradead.org;\n\tThu, 26 Mar 2026 11:56:15 +0000",
            "by mail-wr1-x435.google.com with SMTP id\n ffacd0b85a97d-43b3d9d0695so602010f8f.0\n        for <opensbi@lists.infradead.org>;\n Thu, 26 Mar 2026 04:56:11 -0700 (PDT)",
            "from localhost.localdomain ([78.41.211.48])\n        by smtp.gmail.com with ESMTPSA id\n ffacd0b85a97d-43b9194311asm8932438f8f.10.2026.03.26.04.56.08\n        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n        Thu, 26 Mar 2026 04:56:09 -0700 (PDT)"
        ],
        "DKIM-Signature": [
            "v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed;\n\td=lists.infradead.org; s=bombadil.20210309; h=Sender:\n\tContent-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post:\n\tList-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:\n\tMessage-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:\n\tResent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:\n\tList-Owner; bh=umlFLxSI8uQ6P0Gln1tAsSNtAlLyq4FxCEswGCDOsak=; b=rPr0h2XdDY6TTq\n\t4wa7uZ9EUKoxrjjqUMs1Fn9wep2poxPIVw4oB+7R+W5NcTceb+m4DvuYu+PkhllKIaw1yvRuVhE70\n\tL3Dc43QQLgZYwynaD5cEjlCT7liMbedmAV3IdD0OGvCKYk2L//+cY/X6dre7pwn9jox2OEdc5dj+s\n\teGi3dW8FO5fbwRhMzmTEyug64Lq2D7ftexNwBip7K5MRygP23Lav+ie2asPhGMKfPe4sbAukoyVyd\n\twU7ZWVth7WV2dmYnnuIjalHKMOPH4/4jns+0L9g7+UBzWhZ7DhomwLaygtzuq03A3ipgkyt3L7ku0\n\tsDHJFtT5a3mmWIrrIODg==;",
            "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=riscstar-com.20230601.gappssmtp.com; s=20230601; t=1774526170;\n x=1775130970; darn=lists.infradead.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=LPdWWqNUxBg207CyV1APpUQauAH14Yjs1rBXm8CCL40=;\n        b=OX1YL6WRlMlfHOIdCjlzAPpVp1YLGq0CGa1HrMUi/jLEivO3kLiWsItI8Cm4OTMBEB\n         iKGH+GyDWN0q2AkcMnrX3QUfMY4OuIXvnNyzHTtVwKAZD5XiG5+lhq8/b1soa+eHvOJH\n         S2LUDioL/im7UmQIxcISkp11xDawKfghf+vWYqgdGh1XVloOhgbUY6U0zifDNjU9RBTn\n         qklHLZdus24SGG3QwV740pnyauU93Tq4nb2U05RcSL4DJKAtnM8+be5LDVe33vNWQc05\n         fBpKIClbddcMRLhIbQPTy12Kz5pKCvGm+Nf2B+2D0Vkyx0o8F55Dbhm6qI0BJGhIIqPc\n         2lZw=="
        ],
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n        d=1e100.net; s=20251104; t=1774526170; x=1775130970;\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=LPdWWqNUxBg207CyV1APpUQauAH14Yjs1rBXm8CCL40=;\n        b=oZ2wJtnRTtABv8cjTmbPf/d2f6L8HGHebk68da5UHh8OaWARCvXH7bAK5du4HRwsJM\n         XKqd5pwNKUdbfkxQkmg3dGXI0gXOP/2TFCUlI90lC0mOigJuGdXhUzx4WdGqZYSCVbpM\n         YCIeINQOGuU3arsEDlkzm4gGs9UBW0XlJ4TkG97EPnUxkne+ZzBK0Aj3inaj6iJIhed5\n         feFg8BQDapV1G2aP4S8laAsNDbEjsCQUXkfaaJTNYUax571BaXy8FajxoDvdqhETBVHn\n         zvJu7reBY7zMI7eu6TQmPbXFKIxGcu5WhiYEwFq6VqBcyEROlJbSvHoKcohwhKMWayev\n         MxYg==",
        "X-Forwarded-Encrypted": "i=1;\n AJvYcCVPWl1Ij15w4d3Xqjcm2un6LUPJBthHJsVEUn2S/BlktIKmCsYkBuoLKUGZE4VXmVi9WOfxtLR4@lists.infradead.org",
        "X-Gm-Message-State": "AOJu0YxolMFA/wS+IVoDGxBjr1fmLeCKE6EoYfgSDfOsl+JD7O6s6gCl\n\trpn3Fl5zoVlNQDFLWvaBlf3yIQu9pYiX+cFKpzO42JyWGxb1b/qiWuesT7688rQmv+Y=",
        "X-Gm-Gg": "ATEYQzzKRB7e0j6zTU217ubNJ8B+68sTJwcGQrrylD4J09NAZHYh4UsRHmixiNhWCuH\n\t6ucuAdr3JTaRqSF2EV+NwIt3mefRl/RQIYcE0O2VONZWMApwUGE6qJ8iS6PaDHcM128tZ1uHtSG\n\t0m+BZQZsaW5oRoqonTZOf63bijmkEH+3oHH+w9chaTmzYmqM60di21C/uOuY3W5Dc/LbRQESfUA\n\tgHFrbezru3519yMRWRinpvVHB8UWgQg3p/d1DBrNEHy8Tn8jF4zHhA+50VfkwbjBvfsjTkWDJxO\n\tcl4Pyg54XOMk/ifo26nYGAWsPMyEYrWzYTIF5MFsVaTnUae8n5l4z6m7b4ITzw/QAETmOjqnGle\n\t4lN+eOLylN08PXB/D+dMvcvh7SZ3f3ucd1cfkq5lnDv7Et/+YO1wCB99gRYl2y3xPGEkTnV+VHo\n\tE0uVjhJczzZLnAsUUGjEPYLTmyPYp3U8ILNeA7Cg==",
        "X-Received": "by 2002:a05:6000:1786:b0:43b:8c38:af5 with SMTP id\n ffacd0b85a97d-43b97a141camr2537548f8f.7.1774526170056;\n        Thu, 26 Mar 2026 04:56:10 -0700 (PDT)",
        "From": "dave.patel@riscstar.com",
        "To": "Samuel Holland <samuel.holland@sifive.com>",
        "Cc": "Scott Bambrough <scott@riscstar.com>,\n\tRobin Randhawa <robin.randhawa@sifive.com>,\n\tAnup Patel <anup.patel@qti.qualcomm.com>,\n\tDave Patel <dave.patel@riscstar.com>,\n\tRay Mao <raymond.mao@riscstar.com>,\n\tAnup Patel <anuppate@qti.qualcomm.com>,\n\tDhaval <dhaval@rivosinc.com>,\n\tPeter Lin <peter.lin@sifive.com>,\n\topensbi@lists.infradead.org",
        "Subject": "[PATCH v2 2/3] lib: sbi: Add floating-point context save/restore\n support.",
        "Date": "Thu, 26 Mar 2026 11:55:16 +0000",
        "Message-ID": "<20260326115517.2156-3-dave.patel@riscstar.com>",
        "X-Mailer": "git-send-email 2.43.0",
        "In-Reply-To": "<20260326115517.2156-1-dave.patel@riscstar.com>",
        "References": "<20260326115517.2156-1-dave.patel@riscstar.com>",
        "MIME-Version": "1.0",
        "X-CRM114-Version": "20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 ",
        "X-CRM114-CacheID": "sfid-20260326_045613_938051_24DF4F08 ",
        "X-CRM114-Status": "GOOD (  15.46  )",
        "X-Spam-Score": "-1.9 (-)",
        "X-Spam-Report": "Spam detection software,\n running on the system \"bombadil.infradead.org\",\n has NOT identified this incoming email as spam.  The original\n message has been attached to this so you can view it or label\n similar future email.  If you have any questions, see\n the administrator of that system for details.\n Content preview:  From: Dave Patel <dave.patel@riscstar.com> Add support for\n    saving and restoring RISC-V floating-point (F/D) extension state in\n OpenSBI.\n    This introduces a floating-point context structure and helper routines to\n    perform full context save and res [...]\n Content analysis details:   (-1.9 points, 5.0 required)\n  pts rule name              description\n ---- ----------------------\n --------------------------------------------------\n -0.0 RCVD_IN_DNSWL_NONE     RBL: Sender listed at https://www.dnswl.org/, no\n                             trust\n                             [2a00:1450:4864:20:0:0:0:435 listed in]\n                             [list.dnswl.org]\n  0.0 SPF_HELO_NONE          SPF: HELO does not publish an SPF Record\n -0.0 SPF_PASS               SPF: sender matches SPF record\n -0.1 DKIM_VALID             Message has at least one valid DKIM or DK\n signature\n  0.1 DKIM_SIGNED            Message has a DKIM or DK signature,\n not necessarily valid\n -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%\n                             [score: 0.0000]",
        "X-BeenThere": "opensbi@lists.infradead.org",
        "X-Mailman-Version": "2.1.34",
        "Precedence": "list",
        "List-Id": "<opensbi.lists.infradead.org>",
        "List-Unsubscribe": "<http://lists.infradead.org/mailman/options/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.infradead.org/pipermail/opensbi/>",
        "List-Post": "<mailto:opensbi@lists.infradead.org>",
        "List-Help": "<mailto:opensbi-request@lists.infradead.org?subject=help>",
        "List-Subscribe": "<http://lists.infradead.org/mailman/listinfo/opensbi>,\n <mailto:opensbi-request@lists.infradead.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"utf-8\"",
        "Content-Transfer-Encoding": "base64",
        "Sender": "\"opensbi\" <opensbi-bounces@lists.infradead.org>",
        "Errors-To": "opensbi-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org"
    },
    "content": "From: Dave Patel <dave.patel@riscstar.com>\n\nAdd support for saving and restoring RISC-V floating-point (F/D) extension\nstate in OpenSBI. This introduces a floating-point context structure and\nhelper routines to perform full context save and restore.\n\nThe floating-point context includes storage for all 32 FPi registers (f0–f31)\nalong with the fcsr control and status register. The register state is saved\nand restored using double-precision load/store instructions (fsd/fld), and\nsingle-precision load/store instructions (fsw/flw) on an RV64 system with\nF and D-extension support.\n\nThe implementation follows an eager context switching model where the entire\nFP state is saved and restored on every context switch. This avoids the need\nfor trap-based lazy management and keeps the design simple and deterministic.\n\nSigned-off-by: Dave Patel <dave.patel@riscstar.com>\"\nSigned-off-by: Dave Patel <dave.patel@riscstar.com>\n---\n include/sbi/sbi_fp.h |  37 +++++++++\n lib/sbi/objects.mk   |   3 +\n lib/sbi/sbi_fp.c     | 188 +++++++++++++++++++++++++++++++++++++++++++\n 3 files changed, 228 insertions(+)\n create mode 100644 include/sbi/sbi_fp.h\n create mode 100644 lib/sbi/sbi_fp.c\n\n--\n2.43.0",
    "diff": "diff --git a/include/sbi/sbi_fp.h b/include/sbi/sbi_fp.h\nnew file mode 100644\nindex 00000000..5794b66f\n--- /dev/null\n+++ b/include/sbi/sbi_fp.h\n@@ -0,0 +1,37 @@\n+/* SPDX-License-Identifier: GPL-2.0\n+ *\n+ * Copyright (c) 2026 RISCstar Solutions.\n+ *\n+ * Authors:\n+ *     Dave Patel <dave.patel@riscstar.com>\n+ */\n+#ifndef __SBI_FP_H__\n+#define __SBI_FP_H__\n+\n+#include <sbi/riscv_encoding.h>\n+\n+#if defined(__riscv_f) || defined(__riscv_d)\n+\n+#include <stdint.h>\n+\n+struct sbi_fp_context {\n+#if __riscv_xlen == 64 && defined(__riscv_d)\n+    uint64_t f[32];\n+#else\n+    uint32_t f[32];\n+#endif\n+    uint32_t fcsr;\n+} __attribute__((aligned(16)));\n+\n+void sbi_fp_save(struct sbi_fp_context *dst);\n+void sbi_fp_restore(const struct sbi_fp_context *src);\n+\n+#else /* No FP (e.g., Zve32x) */\n+\n+struct sbi_fp_context { };\n+\n+static inline void sbi_fp_save(struct sbi_fp_context *dst) { }\n+static inline void sbi_fp_restore(const struct sbi_fp_context *src) { }\n+\n+#endif //defined(__riscv_f) || defined(__riscv_d)\n+#endif //__SBI_VECTOR_H__\ndiff --git a/lib/sbi/objects.mk b/lib/sbi/objects.mk\nindex 9fd378d0..b99712d3 100644\n--- a/lib/sbi/objects.mk\n+++ b/lib/sbi/objects.mk\n@@ -113,3 +113,6 @@ $(info RESULT = $(findstring v,$(RISCV_EXTS)))\n ifneq ($(findstring v,$(RISCV_EXTS)),)\n libsbi-objs-y += sbi_vector.o\n endif\n+ifneq ($(findstring f,$(RISCV_EXTS))$(findstring d,$(RISCV_EXTS))$(findstring g,$(RISCV_EXTS)),)\n+libsbi-objs-y += sbi_fp.o\n+endif\ndiff --git a/lib/sbi/sbi_fp.c b/lib/sbi/sbi_fp.c\nnew file mode 100644\nindex 00000000..b6651577\n--- /dev/null\n+++ b/lib/sbi/sbi_fp.c\n@@ -0,0 +1,188 @@\n+/* SPDX-License-Identifier: GPL-2.0\n+ *\n+ * Copyright (c) 2026 RISCstar Solutions.\n+ *\n+ * Authors:\n+ *     Dave Patel <dave.patel@riscstar.com>\n+ */\n+\n+#include <sbi/riscv_asm.h>\n+#include <sbi/riscv_encoding.h>\n+#include <sbi/sbi_fp.h>\n+\n+#if defined(__riscv_f) || defined(__riscv_d)\n+\n+void sbi_fp_save(struct sbi_fp_context *dst)\n+{\n+\tif (!dst)\n+\t\treturn;\n+\n+#if __riscv_xlen == 64 && defined(__riscv_d)\n+\tasm volatile(\n+\t\t\"fsd f0,  0(%0)\\n\"\n+\t\t\"fsd f1,  8(%0)\\n\"\n+\t\t\"fsd f2,  16(%0)\\n\"\n+\t\t\"fsd f3,  24(%0)\\n\"\n+\t\t\"fsd f4,  32(%0)\\n\"\n+\t\t\"fsd f5,  40(%0)\\n\"\n+\t\t\"fsd f6,  48(%0)\\n\"\n+\t\t\"fsd f7,  56(%0)\\n\"\n+\t\t\"fsd f8,  64(%0)\\n\"\n+\t\t\"fsd f9,  72(%0)\\n\"\n+\t\t\"fsd f10, 80(%0)\\n\"\n+\t\t\"fsd f11, 88(%0)\\n\"\n+\t\t\"fsd f12, 96(%0)\\n\"\n+\t\t\"fsd f13, 104(%0)\\n\"\n+\t\t\"fsd f14, 112(%0)\\n\"\n+\t\t\"fsd f15, 120(%0)\\n\"\n+\t\t\"fsd f16, 128(%0)\\n\"\n+\t\t\"fsd f17, 136(%0)\\n\"\n+\t\t\"fsd f18, 144(%0)\\n\"\n+\t\t\"fsd f19, 152(%0)\\n\"\n+\t\t\"fsd f20, 160(%0)\\n\"\n+\t\t\"fsd f21, 168(%0)\\n\"\n+\t\t\"fsd f22, 176(%0)\\n\"\n+\t\t\"fsd f23, 184(%0)\\n\"\n+\t\t\"fsd f24, 192(%0)\\n\"\n+\t\t\"fsd f25, 200(%0)\\n\"\n+\t\t\"fsd f26, 208(%0)\\n\"\n+\t\t\"fsd f27, 216(%0)\\n\"\n+\t\t\"fsd f28, 224(%0)\\n\"\n+\t\t\"fsd f29, 232(%0)\\n\"\n+\t\t\"fsd f30, 240(%0)\\n\"\n+\t\t\"fsd f31, 248(%0)\\n\"\n+\t\t:\n+\t\t: \"r\"(dst->f)\n+\t\t: \"memory\"\n+\t);\n+#else /* RV32 or F-only */\n+    asm volatile(\n+        \"fsw f0,  0(%0)\\n\"\n+        \"fsw f1,  4(%0)\\n\"\n+        \"fsw f2,  8(%0)\\n\"\n+        \"fsw f3,  12(%0)\\n\"\n+        \"fsw f4,  16(%0)\\n\"\n+        \"fsw f5,  20(%0)\\n\"\n+        \"fsw f6,  24(%0)\\n\"\n+        \"fsw f7,  28(%0)\\n\"\n+        \"fsw f8,  32(%0)\\n\"\n+        \"fsw f9,  36(%0)\\n\"\n+        \"fsw f10, 40(%0)\\n\"\n+        \"fsw f11, 44(%0)\\n\"\n+        \"fsw f12, 48(%0)\\n\"\n+        \"fsw f13, 52(%0)\\n\"\n+        \"fsw f14, 56(%0)\\n\"\n+        \"fsw f15, 60(%0)\\n\"\n+        \"fsw f16, 64(%0)\\n\"\n+        \"fsw f17, 68(%0)\\n\"\n+        \"fsw f18, 72(%0)\\n\"\n+        \"fsw f19, 76(%0)\\n\"\n+        \"fsw f20, 80(%0)\\n\"\n+        \"fsw f21, 84(%0)\\n\"\n+        \"fsw f22, 88(%0)\\n\"\n+        \"fsw f23, 92(%0)\\n\"\n+        \"fsw f24, 96(%0)\\n\"\n+        \"fsw f25, 100(%0)\\n\"\n+        \"fsw f26, 104(%0)\\n\"\n+        \"fsw f27, 108(%0)\\n\"\n+        \"fsw f28, 112(%0)\\n\"\n+        \"fsw f29, 116(%0)\\n\"\n+        \"fsw f30, 120(%0)\\n\"\n+        \"fsw f31, 124(%0)\\n\"\n+        :\n+        : \"r\"(dst->f)\n+        : \"memory\"\n+    );\n+#endif //__riscv_d\n+\n+\tdst->fcsr = csr_read(CSR_FCSR);\n+}\n+\n+void sbi_fp_restore(const struct sbi_fp_context *src)\n+{\n+\tif (!src)\n+        return;\n+\n+#if __riscv_xlen == 64 && defined(__riscv_d)\n+\tasm volatile(\n+\t\t\"fld f0,  0(%0)\\n\"\n+\t\t\"fld f1,  8(%0)\\n\"\n+\t\t\"fld f2,  16(%0)\\n\"\n+\t\t\"fld f3,  24(%0)\\n\"\n+\t\t\"fld f4,  32(%0)\\n\"\n+\t\t\"fld f5,  40(%0)\\n\"\n+\t\t\"fld f6,  48(%0)\\n\"\n+\t\t\"fld f7,  56(%0)\\n\"\n+\t\t\"fld f8,  64(%0)\\n\"\n+\t\t\"fld f9,  72(%0)\\n\"\n+\t\t\"fld f10, 80(%0)\\n\"\n+        \"fld f11, 88(%0)\\n\"\n+\t\t\"fld f12, 96(%0)\\n\"\n+\t\t\"fld f13, 104(%0)\\n\"\n+\t\t\"fld f14, 112(%0)\\n\"\n+\t\t\"fld f15, 120(%0)\\n\"\n+\t\t\"fld f16, 128(%0)\\n\"\n+\t\t\"fld f17, 136(%0)\\n\"\n+\t\t\"fld f18, 144(%0)\\n\"\n+\t\t\"fld f19, 152(%0)\\n\"\n+\t\t\"fld f20, 160(%0)\\n\"\n+\t\t\"fld f21, 168(%0)\\n\"\n+\t\t\"fld f22, 176(%0)\\n\"\n+\t\t\"fld f23, 184(%0)\\n\"\n+\t\t\"fld f24, 192(%0)\\n\"\n+\t\t\"fld f25, 200(%0)\\n\"\n+\t\t\"fld f26, 208(%0)\\n\"\n+\t\t\"fld f27, 216(%0)\\n\"\n+\t\t\"fld f28, 224(%0)\\n\"\n+\t\t\"fld f29, 232(%0)\\n\"\n+\t\t\"fld f30, 240(%0)\\n\"\n+\t\t\"fld f31, 248(%0)\\n\"\n+\t\t:\n+\t\t: \"r\"(src->f)\n+\t\t: \"memory\"\n+\t);\n+#else /* RV32 or F-only */\n+\n+    asm volatile(\n+        \"flw f0,   0(%0)\\n\"\n+        \"flw f1,   4(%0)\\n\"\n+        \"flw f2,   8(%0)\\n\"\n+        \"flw f3,  12(%0)\\n\"\n+        \"flw f4,  16(%0)\\n\"\n+        \"flw f5,  20(%0)\\n\"\n+        \"flw f6,  24(%0)\\n\"\n+        \"flw f7,  28(%0)\\n\"\n+        \"flw f8,  32(%0)\\n\"\n+        \"flw f9,  36(%0)\\n\"\n+        \"flw f10, 40(%0)\\n\"\n+        \"flw f11, 44(%0)\\n\"\n+        \"flw f12, 48(%0)\\n\"\n+        \"flw f13, 52(%0)\\n\"\n+        \"flw f14, 56(%0)\\n\"\n+        \"flw f15, 60(%0)\\n\"\n+        \"flw f16, 64(%0)\\n\"\n+        \"flw f17, 68(%0)\\n\"\n+        \"flw f18, 72(%0)\\n\"\n+        \"flw f19, 76(%0)\\n\"\n+        \"flw f20, 80(%0)\\n\"\n+        \"flw f21, 84(%0)\\n\"\n+        \"flw f22, 88(%0)\\n\"\n+        \"flw f23, 92(%0)\\n\"\n+        \"flw f24, 96(%0)\\n\"\n+        \"flw f25, 100(%0)\\n\"\n+        \"flw f26, 104(%0)\\n\"\n+        \"flw f27, 108(%0)\\n\"\n+        \"flw f28, 112(%0)\\n\"\n+        \"flw f29, 116(%0)\\n\"\n+        \"flw f30, 120(%0)\\n\"\n+        \"flw f31, 124(%0)\\n\"\n+        :\n+        : \"r\"(src->f)\n+        : \"memory\"\n+    );\n+\n+#endif\n+\n+\tcsr_write(CSR_FCSR, src->fcsr);\n+}\n+#endif // FP present\n",
    "prefixes": [
        "v2",
        "2/3"
    ]
}