Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1475759/?format=api
{ "id": 1475759, "url": "http://patchwork.ozlabs.org/api/patches/1475759/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20210508014802.892561-66-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": "<20210508014802.892561-66-richard.henderson@linaro.org>", "list_archive_url": null, "date": "2021-05-08T01:47:55", "name": "[65/72] softfloat: Convert integer to floatx80 to FloatParts", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "a1f375eea1460a4d9b8b804370e7143447fbbab1", "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/20210508014802.892561-66-richard.henderson@linaro.org/mbox/", "series": [ { "id": 242770, "url": "http://patchwork.ozlabs.org/api/series/242770/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/list/?series=242770", "date": "2021-05-08T01:46:53", "name": "Convert floatx80 and float128 to FloatParts", "version": 1, "mbox": "http://patchwork.ozlabs.org/series/242770/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/1475759/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1475759/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@bilbo.ozlabs.org", "Authentication-Results": [ "ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org\n (client-ip=209.51.188.17; helo=lists.gnu.org;\n envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org;\n receiver=<UNKNOWN>)", "ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256\n header.s=google header.b=pYXZ4Idr;\n\tdkim-atps=neutral" ], "Received": [ "from lists.gnu.org (lists.gnu.org [209.51.188.17])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 4FcWYc1THgz9sTD\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 8 May 2021 12:32:20 +1000 (AEST)", "from localhost ([::1]:47994 helo=lists1p.gnu.org)\n\tby lists.gnu.org with esmtp (Exim 4.90_1)\n\t(envelope-from <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>)\n\tid 1lfClO-0007iv-4P\n\tfor incoming@patchwork.ozlabs.org; Fri, 07 May 2021 22:32:18 -0400", "from eggs.gnu.org ([2001:470:142:3::10]:41794)\n by lists.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 1lfC8I-0003VH-NV\n for qemu-devel@nongnu.org; Fri, 07 May 2021 21:51:55 -0400", "from mail-pj1-x1029.google.com ([2607:f8b0:4864:20::1029]:42837)\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 1lfC8B-0005Zl-Jy\n for qemu-devel@nongnu.org; Fri, 07 May 2021 21:51:53 -0400", "by mail-pj1-x1029.google.com with SMTP id\n j6-20020a17090adc86b02900cbfe6f2c96so6549244pjv.1\n for <qemu-devel@nongnu.org>; Fri, 07 May 2021 18:51:46 -0700 (PDT)", "from localhost.localdomain ([71.212.144.24])\n by smtp.gmail.com with ESMTPSA id 204sm5861396pfw.158.2021.05.07.18.51.45\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 07 May 2021 18:51:45 -0700 (PDT)" ], "DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google;\n h=from:to:cc:subject:date:message-id:in-reply-to:references\n :mime-version:content-transfer-encoding;\n bh=j0n+VHMEDjMKtgDcOQxDeJHVUUgoF67rvW1U9FdzS+U=;\n b=pYXZ4IdrMGqt3aSziGerRLzFWs/EfXAH5BATiLiNcsOB+JAdtmOZEbD585de7itdjf\n XdkxZM2Z2k4D+fkHrSNwva6D0N0N4ZbCDIUw/poCW3/9QET5ojznHR0VDrTbRDML1J32\n lQfDVSEnr/Ye6bGTXp2kr1ogf9RK5KljE1FlT6xeMRHBuwDRVCyyjJ6uY9mYiH6Ylzsb\n okO26VP/6dERdhH8i09PVf51dT1jZm7UujiJXxR+/6jESA7//U/XsjAJAJBZk7+GeRUW\n rHGzmEz5thb1pvYGSV3Zmm7KFO0747tE4UMwREDZdFeDZ1IlQqiabeJFpOTealWH2eFA\n RRhA==", "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20161025;\n h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to\n :references:mime-version:content-transfer-encoding;\n bh=j0n+VHMEDjMKtgDcOQxDeJHVUUgoF67rvW1U9FdzS+U=;\n b=fGZwim5aUac0MTIXPz96MLhgk1ibtxSBXexbPxnEXbbhrHs9u7SfZLpb+KXZWDGeAf\n Ryt3cpSdT3RX4TKIaFHoeXkwwyBndmKHDXAItZUMus3DnSSMaHRb1TzSzh6m8TxIDrkk\n GBtyY5VKTaXoiu0kgDQFAlEDPDWM8Pf4/TybxlZJnShl8gBfvAYyxVMr7VAbNYaETESB\n oj4X+rSfF48JFNtzvFxVFYDQ5W+paQKyw4EqmRdLF7tu75bRYqfNF69jiAbcldY7Egp8\n xUI7LvJvMA0SwptaD7WKChDa4T3wHRvvBLEDn8NKFiC0Y1OK+NNIlL1+vSiIR9GGkDnn\n 27rw==", "X-Gm-Message-State": "AOAM532YslYT8FtwyP+yGn3Wq0977s9AtaHWFLLvqx6SGWU2kQxgSKpW\n VkkEfIds/ZIl/+0FldfUBAoNypoZCW2olQ==", "X-Google-Smtp-Source": "\n ABdhPJx7FQyCmrNe1XaL7vIo1a88tzP66fj7Ae2drZoiMzmNs/gA6tPGYDfbzGWK30753RjvwpcsYg==", "X-Received": "by 2002:a17:90a:be10:: with SMTP id\n a16mr25054610pjs.112.1620438705955;\n Fri, 07 May 2021 18:51:45 -0700 (PDT)", "From": "Richard Henderson <richard.henderson@linaro.org>", "To": "qemu-devel@nongnu.org", "Subject": "[PATCH 65/72] softfloat: Convert integer to floatx80 to FloatParts", "Date": "Fri, 7 May 2021 18:47:55 -0700", "Message-Id": "<20210508014802.892561-66-richard.henderson@linaro.org>", "X-Mailer": "git-send-email 2.25.1", "In-Reply-To": "<20210508014802.892561-1-richard.henderson@linaro.org>", "References": "<20210508014802.892561-1-richard.henderson@linaro.org>", "MIME-Version": "1.0", "Content-Transfer-Encoding": "8bit", "Received-SPF": "pass client-ip=2607:f8b0:4864:20::1029;\n envelope-from=richard.henderson@linaro.org; helo=mail-pj1-x1029.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.23", "Precedence": "list", "List-Id": "<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>", "Cc": "alex.bennee@linaro.org, david@redhat.com", "Errors-To": "qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org", "Sender": "\"Qemu-devel\"\n <qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org>" }, "content": "Signed-off-by: Richard Henderson <richard.henderson@linaro.org>\n---\n fpu/softfloat.c | 58 +++++++++++--------------------------------------\n 1 file changed, 13 insertions(+), 45 deletions(-)", "diff": "diff --git a/fpu/softfloat.c b/fpu/softfloat.c\nindex 914cf2688c..82f71896ac 100644\n--- a/fpu/softfloat.c\n+++ b/fpu/softfloat.c\n@@ -3344,6 +3344,19 @@ float128 int32_to_float128(int32_t a, float_status *status)\n return int64_to_float128(a, status);\n }\n \n+floatx80 int64_to_floatx80(int64_t a, float_status *status)\n+{\n+ FloatParts128 p;\n+\n+ parts_sint_to_float(&p, a, 0, status);\n+ return floatx80_round_pack_canonical(&p, status);\n+}\n+\n+floatx80 int32_to_floatx80(int32_t a, float_status *status)\n+{\n+ return int64_to_floatx80(a, status);\n+}\n+\n /*\n * Unsigned Integer to floating-point conversions\n */\n@@ -5035,51 +5048,6 @@ static float128 normalizeRoundAndPackFloat128(bool zSign, int32_t zExp,\n \n }\n \n-\n-/*----------------------------------------------------------------------------\n-| Returns the result of converting the 32-bit two's complement integer `a'\n-| to the extended double-precision floating-point format. The conversion\n-| is performed according to the IEC/IEEE Standard for Binary Floating-Point\n-| Arithmetic.\n-*----------------------------------------------------------------------------*/\n-\n-floatx80 int32_to_floatx80(int32_t a, float_status *status)\n-{\n- bool zSign;\n- uint32_t absA;\n- int8_t shiftCount;\n- uint64_t zSig;\n-\n- if ( a == 0 ) return packFloatx80( 0, 0, 0 );\n- zSign = ( a < 0 );\n- absA = zSign ? - a : a;\n- shiftCount = clz32(absA) + 32;\n- zSig = absA;\n- return packFloatx80( zSign, 0x403E - shiftCount, zSig<<shiftCount );\n-\n-}\n-\n-/*----------------------------------------------------------------------------\n-| Returns the result of converting the 64-bit two's complement integer `a'\n-| to the extended double-precision floating-point format. The conversion\n-| is performed according to the IEC/IEEE Standard for Binary Floating-Point\n-| Arithmetic.\n-*----------------------------------------------------------------------------*/\n-\n-floatx80 int64_to_floatx80(int64_t a, float_status *status)\n-{\n- bool zSign;\n- uint64_t absA;\n- int8_t shiftCount;\n-\n- if ( a == 0 ) return packFloatx80( 0, 0, 0 );\n- zSign = ( a < 0 );\n- absA = zSign ? - a : a;\n- shiftCount = clz64(absA);\n- return packFloatx80( zSign, 0x403E - shiftCount, absA<<shiftCount );\n-\n-}\n-\n /*----------------------------------------------------------------------------\n | Returns the result of converting the single-precision floating-point value\n | `a' to the extended double-precision floating-point format. The conversion\n", "prefixes": [ "65/72" ] }