Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/1.1/patches/2228468/?format=api
{ "id": 2228468, "url": "http://patchwork.ozlabs.org/api/1.1/patches/2228468/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260426134002.865628-58-richard.henderson@linaro.org/", "project": { "id": 14, "url": "http://patchwork.ozlabs.org/api/1.1/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": "" }, "msgid": "<20260426134002.865628-58-richard.henderson@linaro.org>", "date": "2026-04-26T13:39:34", "name": "[57/84] fpu: Split FloatParts{64,128} to softfloat-parts.h", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "3f280368ce3a571b2c2c38ba7e259450207e1bc4", "submitter": { "id": 72104, "url": "http://patchwork.ozlabs.org/api/1.1/people/72104/?format=api", "name": "Richard Henderson", "email": "richard.henderson@linaro.org" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20260426134002.865628-58-richard.henderson@linaro.org/mbox/", "series": [ { "id": 501533, "url": "http://patchwork.ozlabs.org/api/1.1/series/501533/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=501533", "date": "2026-04-26T13:38:37", "name": "fpu: Export some internals for targets", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/501533/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/2228468/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/2228468/checks/", "tags": {}, "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=qTOazqVW;\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 4g3StV5q6Sz1xvV\n\tfor <incoming@patchwork.ozlabs.org>; Sun, 26 Apr 2026 23:57:05 +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 1wGzpW-0007r7-RQ; Sun, 26 Apr 2026 09:47:26 -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 1wGzo9-0005uY-Go\n for qemu-devel@nongnu.org; Sun, 26 Apr 2026 09:46:07 -0400", "from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d])\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 1wGznv-0001SB-F8\n for qemu-devel@nongnu.org; Sun, 26 Apr 2026 09:45:50 -0400", "by mail-pg1-x52d.google.com with SMTP id\n 41be03b00d2f7-c70f91776fcso3578808a12.0\n for <qemu-devel@nongnu.org>; Sun, 26 Apr 2026 06:45:46 -0700 (PDT)", "from stoup.. ([180.233.125.15]) by smtp.gmail.com with ESMTPSA id\n d9443c01a7336-2b5faa34ea7sm280544085ad.34.2026.04.26.06.45.43\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Sun, 26 Apr 2026 06:45:45 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=linaro.org; s=google; t=1777211146; x=1777815946; 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=FnOhdCDKdTLE0gzKOWv8m2ElmA3lCf51L6yu2wpzeJk=;\n b=qTOazqVWZ+ea7obniPuOA/1jYGkwM47Zn3Vhjexk1z1qbgQrdmHRcRgJWtq+RzlQzZ\n B2rxJYaB/VGCJ3sepiUEvuarEdpsxYi5xEIW2QwqgIaFVL2+tak9nydDsqGX1Hs0DY6l\n g0kFCLrDAQmnJ6MnlTOF9saSJsuBXO4GBpxslY1+r8Hxl/d4irvoLZTU3UycO5ztVioy\n KR6iEcl1Du54UDFm6JwB9pujLdW99GvxdqNba4pm9t5ElnT/jCW6gYSl78EFA4riUiyK\n VlVvwXPXRL9oM8oo7pwMWIHX0VzLhi0awujVbl1+VV1S8sgCrDYMZ3Jsjnq0wU2IwRpv\n H6Aw==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1777211146; x=1777815946;\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=FnOhdCDKdTLE0gzKOWv8m2ElmA3lCf51L6yu2wpzeJk=;\n b=avantu9Xwsw8yTIG7RO5N9KGFh2xfSOUnsrmr5Q5VKCrv788RShHGerUL8jAbrKxTa\n bPsaXQvf5wmDEkNLjC/0qCk7Ine/JkaRt7ZPe4UymtTTgJqfLMXDRz7bv3qfMq9SZBeL\n +Dx7b06WSi7gZeJZ7bOMgj2fnuzPevl4TlA2b6/iSkwKAHUlL1gPExfhVRsIOoKYSU6X\n niNorANsEPPzdO7IDt5x8+fZGP8+eWkEL17s3LG1pQEfaB3Dwff1PnAHApuvzcQ4Zlxy\n DqH9i4YbnIabOHR0BbdUXV0vfpVnrH6TkEeZxtIjaPUlInJQ7can8/ZRmIHzjMsiYT8v\n ZU7w==", "X-Gm-Message-State": "AOJu0YxqAqa6/TeGI+IBrIrf6Dw71d4DUzXtPWoqnWN111qivWfpdIIg\n 7p4sNvIj1J2IY4hEiOrND3h+MTR5fxIqLcMc/UJlXLBfXFfDoPGvotlIUHgC3gUhdR+APtkKczX\n oFRMubXA=", "X-Gm-Gg": "AeBDietZz9Dy8+/CsVlcbh4vlzc7pR11GlFNQR+DGPZkwOUyiwjEEhUNyyI5jQA69z2\n PW+GEjd9bCL+Gi42s5ZtjurXYHLUDpS0V3dhVLVDex1yY/L1W7ukY8ADTDpyWd3Bej172jktaqb\n Q+FXUa3OPpDtIGD072XygdA+GDesk+XMdnIC2pbb2Qfrd+OVx7jt3lisMq82CKbKdlSgyIvjKer\n 9VP2dqNt8VCc/mXgMoXHRl3jxqYeby/sqPN+5jFetV90RwBdEWh9buixv4VSDpdRQ4Lu9nvjm3/\n D2pznQT7e+09iqJD3hXsVav5+666xVZeluorJfFOJjFyBLg9etbh4Eoo3QGGS1I4DBjnhCJNG39\n jls4FydG9Zi1SdXp+n49U0r1siUJ5HWT0x01cE+pbxNAXKkNQ1iOp4marTlJ3Wmmt5XE/32StUE\n QK4PFwB9Y5TYQJSBM1y74EgZk90cRBfVM5lVpym4Co", "X-Received": "by 2002:a17:903:487:b0:2b2:49a7:a5bc with SMTP id\n d9443c01a7336-2b5f9f534e4mr297029925ad.39.1777211145647;\n Sun, 26 Apr 2026 06:45:45 -0700 (PDT)", "From": "Richard Henderson <richard.henderson@linaro.org>", "To": "qemu-devel@nongnu.org", "Cc": "qemu-arm@nongnu.org,\n\tqemu-s390x@nongnu.org", "Subject": "[PATCH 57/84] fpu: Split FloatParts{64,128} to softfloat-parts.h", "Date": "Sun, 26 Apr 2026 23:39:34 +1000", "Message-ID": "<20260426134002.865628-58-richard.henderson@linaro.org>", "X-Mailer": "git-send-email 2.43.0", "In-Reply-To": "<20260426134002.865628-1-richard.henderson@linaro.org>", "References": "<20260426134002.865628-1-richard.henderson@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2607:f8b0:4864:20::52d;\n envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x52d.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": "Begin exposing the intermediate representation of softfloat.\nStart with just the representation structures.\n\nSigned-off-by: Richard Henderson <richard.henderson@linaro.org>\n---\n include/fpu/softfloat-parts.h | 88 +++++++++++++++++++++++++++++++++++\n fpu/softfloat.c | 69 +--------------------------\n 2 files changed, 90 insertions(+), 67 deletions(-)\n create mode 100644 include/fpu/softfloat-parts.h", "diff": "diff --git a/include/fpu/softfloat-parts.h b/include/fpu/softfloat-parts.h\nnew file mode 100644\nindex 0000000000..13c1f3d2d6\n--- /dev/null\n+++ b/include/fpu/softfloat-parts.h\n@@ -0,0 +1,88 @@\n+/*\n+ * Floating point intermediate representation\n+ *\n+ * The code in this source file is derived from release 2a of the SoftFloat\n+ * IEC/IEEE Floating-point Arithmetic Package. Those parts of the code (and\n+ * some later contributions) are provided under that license, as detailed below.\n+ * It has subsequently been modified by contributors to the QEMU Project,\n+ * so some portions are provided under:\n+ * the SoftFloat-2a license\n+ * the BSD license\n+ * GPL-v2-or-later\n+ *\n+ * Any future contributions to this file after December 1st 2014 will be\n+ * taken to be licensed under the Softfloat-2a license unless specifically\n+ * indicated otherwise.\n+ */\n+\n+#ifndef SOFTFLOAT_PARTS_H\n+#define SOFTFLOAT_PARTS_H\n+\n+/*\n+ * Classify a floating point number. Everything above float_class_qnan\n+ * is a NaN so cls >= float_class_qnan is any NaN.\n+ *\n+ * Note that we canonicalize denormals, so most code should treat\n+ * class_normal and class_denormal identically.\n+ */\n+\n+typedef enum __attribute__ ((__packed__)) {\n+ float_class_unclassified,\n+ float_class_zero,\n+ float_class_normal,\n+ float_class_denormal, /* input was a non-squashed denormal */\n+ float_class_inf,\n+ float_class_qnan, /* all NaNs from here */\n+ float_class_snan,\n+} FloatClass;\n+\n+#define float_cmask(bit) (1u << (bit))\n+\n+enum {\n+ float_cmask_zero = float_cmask(float_class_zero),\n+ float_cmask_normal = float_cmask(float_class_normal),\n+ float_cmask_denormal = float_cmask(float_class_denormal),\n+ float_cmask_inf = float_cmask(float_class_inf),\n+ float_cmask_qnan = float_cmask(float_class_qnan),\n+ float_cmask_snan = float_cmask(float_class_snan),\n+\n+ float_cmask_infzero = float_cmask_zero | float_cmask_inf,\n+ float_cmask_anynan = float_cmask_qnan | float_cmask_snan,\n+ float_cmask_anynorm = float_cmask_normal | float_cmask_denormal,\n+};\n+\n+/*\n+ * Structure holding all of the decomposed parts of a float.\n+ * The exponent is unbiased and the fraction is normalized.\n+ *\n+ * The fraction words are stored in big-endian word ordering,\n+ * so that truncation from a larger format to a smaller format\n+ * can be done simply by ignoring subsequent elements.\n+ */\n+\n+typedef struct {\n+ FloatClass cls;\n+ bool sign;\n+ int32_t exp;\n+ union {\n+ /* Routines that know the structure may reference the singular name. */\n+ uint64_t frac;\n+ /*\n+ * Routines expanded with multiple structures reference \"hi\" and \"lo\"\n+ * depending on the operation. In FloatParts64, \"hi\" and \"lo\" are\n+ * both the same word and aliased here.\n+ */\n+ uint64_t frac_hi;\n+ uint64_t frac_lo;\n+ };\n+} FloatParts64;\n+\n+typedef struct {\n+ FloatClass cls;\n+ bool sign;\n+ int32_t exp;\n+ uint64_t frac_hi;\n+ uint64_t frac_lo;\n+} FloatParts128;\n+\n+#endif\ndiff --git a/fpu/softfloat.c b/fpu/softfloat.c\nindex 8c4263bfe6..cd75df3160 100644\n--- a/fpu/softfloat.c\n+++ b/fpu/softfloat.c\n@@ -83,6 +83,7 @@ this code that are retained.\n #include <math.h>\n #include \"qemu/bitops.h\"\n #include \"fpu/softfloat.h\"\n+#include \"fpu/softfloat-parts.h\"\n \n /* We only need stdlib for abort() */\n \n@@ -396,39 +397,6 @@ float64_gen2(float64 xa, float64 xb, float_status *s,\n return soft(ua.s, ub.s, s);\n }\n \n-/*\n- * Classify a floating point number. Everything above float_class_qnan\n- * is a NaN so cls >= float_class_qnan is any NaN.\n- *\n- * Note that we canonicalize denormals, so most code should treat\n- * class_normal and class_denormal identically.\n- */\n-\n-typedef enum __attribute__ ((__packed__)) {\n- float_class_unclassified,\n- float_class_zero,\n- float_class_normal,\n- float_class_denormal, /* input was a non-squashed denormal */\n- float_class_inf,\n- float_class_qnan, /* all NaNs from here */\n- float_class_snan,\n-} FloatClass;\n-\n-#define float_cmask(bit) (1u << (bit))\n-\n-enum {\n- float_cmask_zero = float_cmask(float_class_zero),\n- float_cmask_normal = float_cmask(float_class_normal),\n- float_cmask_denormal = float_cmask(float_class_denormal),\n- float_cmask_inf = float_cmask(float_class_inf),\n- float_cmask_qnan = float_cmask(float_class_qnan),\n- float_cmask_snan = float_cmask(float_class_snan),\n-\n- float_cmask_infzero = float_cmask_zero | float_cmask_inf,\n- float_cmask_anynan = float_cmask_qnan | float_cmask_snan,\n- float_cmask_anynorm = float_cmask_normal | float_cmask_denormal,\n-};\n-\n /* Flags for parts_minmax. */\n enum {\n /* Set for minimum; clear for maximum. */\n@@ -474,40 +442,7 @@ static inline bool is_anynorm(FloatClass c)\n return float_cmask(c) & float_cmask_anynorm;\n }\n \n-/*\n- * Structure holding all of the decomposed parts of a float.\n- * The exponent is unbiased and the fraction is normalized.\n- *\n- * The fraction words are stored in big-endian word ordering,\n- * so that truncation from a larger format to a smaller format\n- * can be done simply by ignoring subsequent elements.\n- */\n-\n-typedef struct {\n- FloatClass cls;\n- bool sign;\n- int32_t exp;\n- union {\n- /* Routines that know the structure may reference the singular name. */\n- uint64_t frac;\n- /*\n- * Routines expanded with multiple structures reference \"hi\" and \"lo\"\n- * depending on the operation. In FloatParts64, \"hi\" and \"lo\" are\n- * both the same word and aliased here.\n- */\n- uint64_t frac_hi;\n- uint64_t frac_lo;\n- };\n-} FloatParts64;\n-\n-typedef struct {\n- FloatClass cls;\n- bool sign;\n- int32_t exp;\n- uint64_t frac_hi;\n- uint64_t frac_lo;\n-} FloatParts128;\n-\n+/* FloatParts256 is entirely internal, for parts128_mul* */\n typedef struct {\n FloatClass cls;\n bool sign;\n", "prefixes": [ "57/84" ] }