Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/1475700/?format=api
{ "id": 1475700, "url": "http://patchwork.ozlabs.org/api/patches/1475700/?format=api", "web_url": "http://patchwork.ozlabs.org/project/qemu-devel/patch/20210508014802.892561-2-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-2-richard.henderson@linaro.org>", "list_archive_url": null, "date": "2021-05-08T01:46:51", "name": "[01/72] qemu/host-utils: Use __builtin_bitreverseN", "commit_ref": null, "pull_url": null, "state": "new", "archived": false, "hash": "b034a814104e660c4e9414b5fdeb6571e2a4d3db", "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-2-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/1475700/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/1475700/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=rqZvmS7Y;\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 4FcVbv4QgNz9sX1\n\tfor <incoming@patchwork.ozlabs.org>; Sat, 8 May 2021 11:49:13 +1000 (AEST)", "from localhost ([::1]:43154 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 1lfC5d-0003vZ-WF\n\tfor incoming@patchwork.ozlabs.org; Fri, 07 May 2021 21:49:10 -0400", "from eggs.gnu.org ([2001:470:142:3::10]:40412)\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 1lfC4d-0003ux-R1\n for qemu-devel@nongnu.org; Fri, 07 May 2021 21:48:07 -0400", "from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:34419)\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 1lfC4c-0003Ud-6O\n for qemu-devel@nongnu.org; Fri, 07 May 2021 21:48:07 -0400", "by mail-pl1-x62b.google.com with SMTP id h7so6156348plt.1\n for <qemu-devel@nongnu.org>; Fri, 07 May 2021 18:48:05 -0700 (PDT)", "from localhost.localdomain ([71.212.144.24])\n by smtp.gmail.com with ESMTPSA id t4sm5819681pfq.165.2021.05.07.18.48.04\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Fri, 07 May 2021 18:48:04 -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=kll+dPeHhZ1ZNnNxSh3IWKjU47wCoWRq1+9XapRC/iw=;\n b=rqZvmS7YVE3xScwFbcjkv3pcDwAe2i+MSe3ozkVfLmG9xp81Oyg8zH4qDKqWF7E5SV\n FN0AEwSH6PgoYIk33tD4ukSZ06JUa+U1wwy+brWDSepKcOGPhsuBE5olrcyqWGv27puU\n LuM6re/SO7cA8p4ydAPayUbARSISXwlf4LE16EXPtkFSUh5ljKT913f9mChWjS1M+9rj\n PRyGbUPP7UO5Rl7rgnzfufoUvRn0waPwCaAUp7ykr+8zB+ofKpE9p61kJBgL5OoroLi4\n OyXrnCEqbXEZJ1kLm6OjEcrgiiuG9WZ+pMp39hKxSA1bZImEfCqkjcv5KgpXxjgbnmU1\n ijWA==", "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=kll+dPeHhZ1ZNnNxSh3IWKjU47wCoWRq1+9XapRC/iw=;\n b=FsalIuW6ZiaElYby/W2/vEqhNF+U1L5Pl3MZYm7LxoZ65J6vaGjnc01EXb9KzQqTlz\n T3QWF5ddHpzBoJL73CU9egw2O1Y05ryX4vdq5CknZ1IlrMcrGpNktVeGkcN4U8cVQmkg\n xHuUz3kCEZsy4nn1ABYujibT/ch3lUWFDuqq8X9wQnIWo1p9+kY6esSkdhEu+SxugKNF\n SC6vrhRweLhHfSkP+uXovINOBI4KKBT5mdOeOZNzV/0cnG+UIiIGtjOszYngj9ErRwcn\n Hwl4p/VN55pOFkkKkQ7j5whWN+7SwpV9JAe1WucoD6GovK2XLr7i1VW57JEaSRZmy4Ss\n Bk5g==", "X-Gm-Message-State": "AOAM531k+C8KHrRfXMGTXCaGtzjpl4z9rOQoC9sgERrmz1XCzShUHzvu\n yKnQuGtByv+WdmyMfhKWSXUZ1KDpqzLFaw==", "X-Google-Smtp-Source": "\n ABdhPJzKVGO9dMlYIHcsQ/B4RF4ocvYvZEbPXNv2KJYjrWG8Z68Vwhe2Uy04bchZ7JdDy520xxwxCA==", "X-Received": "by 2002:a17:90b:915:: with SMTP id\n bo21mr13130414pjb.27.1620438484793;\n Fri, 07 May 2021 18:48:04 -0700 (PDT)", "From": "Richard Henderson <richard.henderson@linaro.org>", "To": "qemu-devel@nongnu.org", "Subject": "[PATCH 01/72] qemu/host-utils: Use __builtin_bitreverseN", "Date": "Fri, 7 May 2021 18:46:51 -0700", "Message-Id": "<20210508014802.892561-2-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::62b;\n envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x62b.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": "Clang has added some builtins for these operations;\nuse them if available.\n\nSigned-off-by: Richard Henderson <richard.henderson@linaro.org>\n---\n include/qemu/host-utils.h | 16 ++++++++++++++++\n 1 file changed, 16 insertions(+)", "diff": "diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h\nindex cdca2991d8..f1e52851e0 100644\n--- a/include/qemu/host-utils.h\n+++ b/include/qemu/host-utils.h\n@@ -272,6 +272,9 @@ static inline int ctpop64(uint64_t val)\n */\n static inline uint8_t revbit8(uint8_t x)\n {\n+#if __has_builtin(__builtin_bitreverse8)\n+ return __builtin_bitreverse8(x);\n+#else\n /* Assign the correct nibble position. */\n x = ((x & 0xf0) >> 4)\n | ((x & 0x0f) << 4);\n@@ -281,6 +284,7 @@ static inline uint8_t revbit8(uint8_t x)\n | ((x & 0x22) << 1)\n | ((x & 0x11) << 3);\n return x;\n+#endif\n }\n \n /**\n@@ -289,6 +293,9 @@ static inline uint8_t revbit8(uint8_t x)\n */\n static inline uint16_t revbit16(uint16_t x)\n {\n+#if __has_builtin(__builtin_bitreverse16)\n+ return __builtin_bitreverse16(x);\n+#else\n /* Assign the correct byte position. */\n x = bswap16(x);\n /* Assign the correct nibble position. */\n@@ -300,6 +307,7 @@ static inline uint16_t revbit16(uint16_t x)\n | ((x & 0x2222) << 1)\n | ((x & 0x1111) << 3);\n return x;\n+#endif\n }\n \n /**\n@@ -308,6 +316,9 @@ static inline uint16_t revbit16(uint16_t x)\n */\n static inline uint32_t revbit32(uint32_t x)\n {\n+#if __has_builtin(__builtin_bitreverse32)\n+ return __builtin_bitreverse32(x);\n+#else\n /* Assign the correct byte position. */\n x = bswap32(x);\n /* Assign the correct nibble position. */\n@@ -319,6 +330,7 @@ static inline uint32_t revbit32(uint32_t x)\n | ((x & 0x22222222u) << 1)\n | ((x & 0x11111111u) << 3);\n return x;\n+#endif\n }\n \n /**\n@@ -327,6 +339,9 @@ static inline uint32_t revbit32(uint32_t x)\n */\n static inline uint64_t revbit64(uint64_t x)\n {\n+#if __has_builtin(__builtin_bitreverse64)\n+ return __builtin_bitreverse64(x);\n+#else\n /* Assign the correct byte position. */\n x = bswap64(x);\n /* Assign the correct nibble position. */\n@@ -338,6 +353,7 @@ static inline uint64_t revbit64(uint64_t x)\n | ((x & 0x2222222222222222ull) << 1)\n | ((x & 0x1111111111111111ull) << 3);\n return x;\n+#endif\n }\n \n /* Host type specific sizes of these routines. */\n", "prefixes": [ "01/72" ] }