get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 816371,
    "url": "http://patchwork.ozlabs.org/api/patches/816371/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/glibc/patch/alpine.DEB.2.20.1709201654230.18346@digraph.polyomino.org.uk/",
    "project": {
        "id": 41,
        "url": "http://patchwork.ozlabs.org/api/projects/41/?format=api",
        "name": "GNU C Library",
        "link_name": "glibc",
        "list_id": "libc-alpha.sourceware.org",
        "list_email": "libc-alpha@sourceware.org",
        "web_url": "",
        "scm_url": "",
        "webscm_url": "",
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<alpine.DEB.2.20.1709201654230.18346@digraph.polyomino.org.uk>",
    "list_archive_url": null,
    "date": "2017-09-20T16:54:43",
    "name": "Add SSE4.1 trunc, truncf (bug 20142) [committed]",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "585d86054c7490130dc2122825f64e1c8fabbdea",
    "submitter": {
        "id": 4349,
        "url": "http://patchwork.ozlabs.org/api/people/4349/?format=api",
        "name": "Joseph Myers",
        "email": "joseph@codesourcery.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/glibc/patch/alpine.DEB.2.20.1709201654230.18346@digraph.polyomino.org.uk/mbox/",
    "series": [
        {
            "id": 4179,
            "url": "http://patchwork.ozlabs.org/api/series/4179/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/glibc/list/?series=4179",
            "date": "2017-09-20T16:54:43",
            "name": "Add SSE4.1 trunc, truncf (bug 20142) [committed]",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/4179/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/816371/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/816371/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<libc-alpha-return-84792-incoming=patchwork.ozlabs.org@sourceware.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "mailing list libc-alpha@sourceware.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=sourceware.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=libc-alpha-return-84792-incoming=patchwork.ozlabs.org@sourceware.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tsecure) header.d=sourceware.org header.i=@sourceware.org\n\theader.b=\"F2uHA/RK\"; dkim-atps=neutral",
            "sourceware.org; auth=none"
        ],
        "Received": [
            "from sourceware.org (server1.sourceware.org [209.132.180.131])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xy5T313Pxz9sP1\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 21 Sep 2017 02:55:02 +1000 (AEST)",
            "(qmail 95334 invoked by alias); 20 Sep 2017 16:54:56 -0000",
            "(qmail 95295 invoked by uid 89); 20 Sep 2017 16:54:55 -0000"
        ],
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:subject:message-id:mime-version\n\t:content-type; q=dns; s=default; b=jWZoyjdMFynIw+sspwKjcXvPMGSGs\n\tl/wqmbBIkB7a1rP8qwNLhEoeWN9eyUQgq3WIRCL5LdtO5AQmMrLrfw4S9Ik8xV8e\n\tIJkCZ70fvOjSwgprA+3gfikaKEAjMn8zXe3w7slj730aKa6LTGRYMPUQ9n74D0W8\n\tR1guQShPLaR+6I=",
        "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id\n\t:list-unsubscribe:list-subscribe:list-archive:list-post\n\t:list-help:sender:date:from:to:subject:message-id:mime-version\n\t:content-type; s=default; bh=DDf6hZRAOdZPU+bWVDYenx4g/90=; b=F2u\n\tHA/RKkblugcBqV262zVkPn6hsofecArIIO9BngZ9hK1yBD/L7cWXWk8qzvnnpkt/\n\tv/S9fYTZv0d1f3fo55KzuuuTuNkXG1lRA3T6ZkVfIa+BR/wgT6T5HmdmH+fYNyvA\n\tQTd3dMohL9lIi4VJIx4cXdZAw9SYDiMfLdHI7ofU=",
        "Mailing-List": "contact libc-alpha-help@sourceware.org; run by ezmlm",
        "Precedence": "bulk",
        "List-Id": "<libc-alpha.sourceware.org>",
        "List-Unsubscribe": "<mailto:libc-alpha-unsubscribe-incoming=patchwork.ozlabs.org@sourceware.org>",
        "List-Subscribe": "<mailto:libc-alpha-subscribe@sourceware.org>",
        "List-Archive": "<http://sourceware.org/ml/libc-alpha/>",
        "List-Post": "<mailto:libc-alpha@sourceware.org>",
        "List-Help": "<mailto:libc-alpha-help@sourceware.org>,\n\t<http://sourceware.org/ml/#faqs>",
        "Sender": "libc-alpha-owner@sourceware.org",
        "X-Virus-Found": "No",
        "X-Spam-SWARE-Status": "No, score=-24.4 required=5.0 tests=AWL, BAYES_00,\n\tGIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3,\n\tKAM_STOCKGEN, RCVD_IN_DNSWL_NONE, SPF_PASS,\n\tURIBL_RED autolearn=ham version=3.3.2 spammy=",
        "X-HELO": "relay1.mentorg.com",
        "Date": "Wed, 20 Sep 2017 16:54:43 +0000",
        "From": "Joseph Myers <joseph@codesourcery.com>",
        "To": "<libc-alpha@sourceware.org>",
        "Subject": "Add SSE4.1 trunc, truncf (bug 20142) [committed]",
        "Message-ID": "<alpine.DEB.2.20.1709201654230.18346@digraph.polyomino.org.uk>",
        "User-Agent": "Alpine 2.20 (DEB 67 2015-01-07)",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=\"US-ASCII\"",
        "X-ClientProxiedBy": "svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To\n\tsvr-ies-mbx-01.mgc.mentorg.com (139.181.222.1)"
    },
    "content": "This patch adds SSE4.1 versions of trunc and truncf, using the roundsd\n/ roundss instructions, similar to the versions of ceil, floor, rint\nand nearbyint functions we already have.  In my testing with the glibc\nbenchtests these are about 30% faster than the C versions for double,\n20% faster for float.\n\nTested for x86_64.  Committed.\n\n2017-09-20  Joseph Myers  <joseph@codesourcery.com>\n\n\t[BZ #20142]\n\t* sysdeps/x86_64/fpu/multiarch/Makefile (libm-sysdep_routines):\n\tAdd s_trunc-c, s_truncf-c, s_trunc-sse4_1 and s_truncf-sse4_1.\n\t* sysdeps/x86_64/fpu/multiarch/s_trunc-c.c: New file.\n\t* sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S: Likewise.\n\t* sysdeps/x86_64/fpu/multiarch/s_trunc.c: Likewise.\n\t* sysdeps/x86_64/fpu/multiarch/s_truncf-c.c: Likewise.\n\t* sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S: Likewise.\n\t* sysdeps/x86_64/fpu/multiarch/s_truncf.c: Likewise.",
    "diff": "diff --git a/NEWS b/NEWS\nindex dd381f8..a3aa94c 100644\n--- a/NEWS\n+++ b/NEWS\n@@ -12,6 +12,8 @@ Major new features:\n * Optimized x86-64 asin, atan2, exp, expf, log, pow, atan, sin and tan\n   with FMA, contributed by Arjan van de Ven and H.J. Lu from Intel.\n \n+* Optimized x86-64 trunc and truncf for processors with SSE4.1.\n+\n * In order to support faster and safer process termination the malloc API\n   family of functions will no longer print a failure address and stack\n   backtrace after detecting heap corruption.  The goal is to minimize the\ndiff --git a/sysdeps/x86_64/fpu/multiarch/Makefile b/sysdeps/x86_64/fpu/multiarch/Makefile\nindex 1b61795..d660552 100644\n--- a/sysdeps/x86_64/fpu/multiarch/Makefile\n+++ b/sysdeps/x86_64/fpu/multiarch/Makefile\n@@ -1,10 +1,12 @@\n ifeq ($(subdir),math)\n libm-sysdep_routines += s_floor-c s_ceil-c s_floorf-c s_ceilf-c \\\n-\t\t\ts_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c\n+\t\t\ts_rint-c s_rintf-c s_nearbyint-c s_nearbyintf-c \\\n+\t\t\ts_trunc-c s_truncf-c\n \n libm-sysdep_routines += s_ceil-sse4_1 s_ceilf-sse4_1 s_floor-sse4_1 \\\n \t\t\ts_floorf-sse4_1 s_nearbyint-sse4_1 \\\n-\t\t\ts_nearbyintf-sse4_1 s_rint-sse4_1 s_rintf-sse4_1\n+\t\t\ts_nearbyintf-sse4_1 s_rint-sse4_1 s_rintf-sse4_1 \\\n+\t\t\ts_trunc-sse4_1 s_truncf-sse4_1\n \n libm-sysdep_routines += e_exp-fma e_log-fma e_pow-fma s_atan-fma \\\n \t\t\te_asin-fma e_atan2-fma s_sin-fma s_tan-fma \\\ndiff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c b/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c\nnew file mode 100644\nindex 0000000..6204ae3\n--- /dev/null\n+++ b/sysdeps/x86_64/fpu/multiarch/s_trunc-c.c\n@@ -0,0 +1,2 @@\n+#define __trunc __trunc_c\n+#include <sysdeps/ieee754/dbl-64/wordsize-64/s_trunc.c>\ndiff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S\nnew file mode 100644\nindex 0000000..ff3ed9c\n--- /dev/null\n+++ b/sysdeps/x86_64/fpu/multiarch/s_trunc-sse4_1.S\n@@ -0,0 +1,25 @@\n+/* trunc for SSE4.1.\n+   Copyright (C) 2017 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <http://www.gnu.org/licenses/>.  */\n+\n+#include <sysdep.h>\n+\n+\t.section .text.sse4.1,\"ax\",@progbits\n+ENTRY(__trunc_sse41)\n+\troundsd\t$11, %xmm0, %xmm0\n+\tret\n+END(__trunc_sse41)\ndiff --git a/sysdeps/x86_64/fpu/multiarch/s_trunc.c b/sysdeps/x86_64/fpu/multiarch/s_trunc.c\nnew file mode 100644\nindex 0000000..fb27fc3\n--- /dev/null\n+++ b/sysdeps/x86_64/fpu/multiarch/s_trunc.c\n@@ -0,0 +1,29 @@\n+/* Multiple versions of __trunc.\n+   Copyright (C) 2017 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <http://www.gnu.org/licenses/>.  */\n+\n+#define trunc __redirect_trunc\n+#define __trunc __redirect___trunc\n+#include <math.h>\n+#undef trunc\n+#undef __trunc\n+\n+#define SYMBOL_NAME trunc\n+#include \"ifunc-sse4_1.h\"\n+\n+libc_ifunc_redirected (__redirect_trunc, __trunc, IFUNC_SELECTOR ());\n+weak_alias (__trunc, trunc)\ndiff --git a/sysdeps/x86_64/fpu/multiarch/s_truncf-c.c b/sysdeps/x86_64/fpu/multiarch/s_truncf-c.c\nnew file mode 100644\nindex 0000000..7a5ac7d\n--- /dev/null\n+++ b/sysdeps/x86_64/fpu/multiarch/s_truncf-c.c\n@@ -0,0 +1,2 @@\n+#define __truncf __truncf_c\n+#include <sysdeps/ieee754/flt-32/s_truncf.c>\ndiff --git a/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S b/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S\nnew file mode 100644\nindex 0000000..ccfe0d7\n--- /dev/null\n+++ b/sysdeps/x86_64/fpu/multiarch/s_truncf-sse4_1.S\n@@ -0,0 +1,25 @@\n+/* truncf for SSE4.1.\n+   Copyright (C) 2017 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <http://www.gnu.org/licenses/>.  */\n+\n+#include <sysdep.h>\n+\n+\t.section .text.sse4.1,\"ax\",@progbits\n+ENTRY(__truncf_sse41)\n+\troundss\t$11, %xmm0, %xmm0\n+\tret\n+END(__truncf_sse41)\ndiff --git a/sysdeps/x86_64/fpu/multiarch/s_truncf.c b/sysdeps/x86_64/fpu/multiarch/s_truncf.c\nnew file mode 100644\nindex 0000000..6190c2e\n--- /dev/null\n+++ b/sysdeps/x86_64/fpu/multiarch/s_truncf.c\n@@ -0,0 +1,29 @@\n+/* Multiple versions of __truncf.\n+   Copyright (C) 2017 Free Software Foundation, Inc.\n+   This file is part of the GNU C Library.\n+\n+   The GNU C Library is free software; you can redistribute it and/or\n+   modify it under the terms of the GNU Lesser General Public\n+   License as published by the Free Software Foundation; either\n+   version 2.1 of the License, or (at your option) any later version.\n+\n+   The GNU C Library is distributed in the hope that it will be useful,\n+   but WITHOUT ANY WARRANTY; without even the implied warranty of\n+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\n+   Lesser General Public License for more details.\n+\n+   You should have received a copy of the GNU Lesser General Public\n+   License along with the GNU C Library; if not, see\n+   <http://www.gnu.org/licenses/>.  */\n+\n+#define truncf __redirect_truncf\n+#define __truncf __redirect___truncf\n+#include <math.h>\n+#undef truncf\n+#undef __truncf\n+\n+#define SYMBOL_NAME truncf\n+#include \"ifunc-sse4_1.h\"\n+\n+libc_ifunc_redirected (__redirect_truncf, __truncf, IFUNC_SELECTOR ());\n+weak_alias (__truncf, truncf)\n",
    "prefixes": []
}