get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

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

{
    "id": 812210,
    "url": "http://patchwork.ozlabs.org/api/1.2/patches/812210/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/gcc/patch/20170911015726.GA24758@gmail.com/",
    "project": {
        "id": 17,
        "url": "http://patchwork.ozlabs.org/api/1.2/projects/17/?format=api",
        "name": "GNU Compiler Collection",
        "link_name": "gcc",
        "list_id": "gcc-patches.gcc.gnu.org",
        "list_email": "gcc-patches@gcc.gnu.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<20170911015726.GA24758@gmail.com>",
    "list_archive_url": null,
    "date": "2017-09-11T01:57:26",
    "name": "PR target/82166: Update preferred stack boundary for leaf functions",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "346fa9fffbad2f32a8bea6fb447a42d04fb53e35",
    "submitter": {
        "id": 4387,
        "url": "http://patchwork.ozlabs.org/api/1.2/people/4387/?format=api",
        "name": "H.J. Lu",
        "email": "hjl.tools@gmail.com"
    },
    "delegate": null,
    "mbox": "http://patchwork.ozlabs.org/project/gcc/patch/20170911015726.GA24758@gmail.com/mbox/",
    "series": [
        {
            "id": 2429,
            "url": "http://patchwork.ozlabs.org/api/1.2/series/2429/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/gcc/list/?series=2429",
            "date": "2017-09-11T01:57:26",
            "name": "PR target/82166: Update preferred stack boundary for leaf functions",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/2429/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/patches/812210/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/812210/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<gcc-patches-return-461791-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "X-Original-To": "incoming@patchwork.ozlabs.org",
        "Delivered-To": [
            "patchwork-incoming@bilbo.ozlabs.org",
            "mailing list gcc-patches@gcc.gnu.org"
        ],
        "Authentication-Results": [
            "ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org\n\t(client-ip=209.132.180.131; helo=sourceware.org;\n\tenvelope-from=gcc-patches-return-461791-incoming=patchwork.ozlabs.org@gcc.gnu.org;\n\treceiver=<UNKNOWN>)",
            "ozlabs.org; dkim=pass (1024-bit key;\n\tunprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org\n\theader.b=\"SgrNsJj7\"; 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 3xr9zr1NR3z9s82\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 11:57:41 +1000 (AEST)",
            "(qmail 100438 invoked by alias); 11 Sep 2017 01:57:32 -0000",
            "(qmail 100320 invoked by uid 89); 11 Sep 2017 01:57:31 -0000",
            "from mail-pg0-f68.google.com (HELO mail-pg0-f68.google.com)\n\t(74.125.83.68) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tMon, 11 Sep 2017 01:57:30 +0000",
            "by mail-pg0-f68.google.com with SMTP id j16so894783pga.2 for\n\t<gcc-patches@gcc.gnu.org>; Sun, 10 Sep 2017 18:57:30 -0700 (PDT)",
            "from gnu-tools-1.localdomain (c-73-93-86-59.hsd1.ca.comcast.net.\n\t[73.93.86.59]) by smtp.gmail.com with ESMTPSA id\n\ts81sm13720666pfg.162.2017.09.10.18.57.27 (version=TLS1_2\n\tcipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tSun, 10 Sep 2017 18:57:27 -0700 (PDT)",
            "by gnu-tools-1.localdomain (Postfix, from userid 1000)\tid\n\tA1F631C0BF1; Sun, 10 Sep 2017 18:57:26 -0700 (PDT)"
        ],
        "DomainKey-Signature": "a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:mime-version:content-type; q=dns;\n\ts=default; b=W7GHztIXX88F6n3XyJpRBQBr6XiWjyvuCfiQdxmm22/t0LsBeW\n\tg+YN8E+LtDKVng9pKx12ncBT63DB84kpicZEW540E/VxmvCYEoNnlTyRBeTqrXFm\n\t0wl+6qBsy+h+OnPP250DV1Q3jR/FA6vIw5kuWTHV64pU7b1Fk7KyKPq1M=",
        "DKIM-Signature": "v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id\n\t:list-unsubscribe:list-archive:list-post:list-help:sender:date\n\t:from:to:cc:subject:message-id:mime-version:content-type; s=\n\tdefault; bh=9oJ7qy/t30qao0Q0nClRyVHSJDc=; b=SgrNsJj7HRNsdB02dCo1\n\tWa7x6kkwlC1Go278d5UnhDCRG9ZJmPxCDtpk5njl8TJDyOxm6IvGNDH+0iUaqM6r\n\tgkAMpYiV7Yn86CyPJn0QV69UUx2uSwctaQzXlz4wh9Ea2hPp70asZ8dXxerhI772\n\tIlxaYmSw0b36xQ0IBwDe+eg=",
        "Mailing-List": "contact gcc-patches-help@gcc.gnu.org; run by ezmlm",
        "Precedence": "bulk",
        "List-Id": "<gcc-patches.gcc.gnu.org>",
        "List-Unsubscribe": "<mailto:gcc-patches-unsubscribe-incoming=patchwork.ozlabs.org@gcc.gnu.org>",
        "List-Archive": "<http://gcc.gnu.org/ml/gcc-patches/>",
        "List-Post": "<mailto:gcc-patches@gcc.gnu.org>",
        "List-Help": "<mailto:gcc-patches-help@gcc.gnu.org>",
        "Sender": "gcc-patches-owner@gcc.gnu.org",
        "X-Virus-Found": "No",
        "X-Spam-SWARE-Status": "No, score=-26.4 required=5.0 tests=AWL, BAYES_00,\n\tFREEMAIL_FROM, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2,\n\tGIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM,\n\tSPF_PASS autolearn=ham version=3.3.2\n\tspammy=Hx-spam-relays-external:74.125.83.68, H*RU:74.125.83.68",
        "X-HELO": "mail-pg0-f68.google.com",
        "X-Google-DKIM-Signature": "v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net;\n\ts=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version\n\t:content-disposition:user-agent;\n\tbh=VHZ2zuf9VsJl3PTOfjsb8Rb2ZuHvfUnjYKncuCbnVzA=;\n\tb=EKZQ2jT1UJ6+CpIP7+aYq15IHL4x3Wv+/wxSLGTmTWMvovBo2oJYwEQ8HSzUoU3OKa\n\txHiInE3U9U7qvL23fqSqpjIjo6yeCrfseyuVug5bAGsgSg2pMTZEcnj6G07TVl7wnkeP\n\tEGH8Fk4/lU3K/n9bkpHwOQT2NIp9+dSokAkZ7pv66c+PNxpwOTE3PiwoK0jrCSfzNDTY\n\tgwf687YHcgR2Oe+9RavryBHDEkouR/U+v3no73wH47fAxJVb0X+ILEjWwq3oUOybL3Fo\n\t2hUDTmUw1s7RcFii4ZElL6atBxNKF/ngaG0YpGspyFn3cpxyJsTRS2vb6VahgWgAslPf\n\t/0kA==",
        "X-Gm-Message-State": "AHPjjUgwz1J+FhpWX+FBys8qxXn0U0u+9VDXlifFvfatTzILN6AyjJDv\tGPfhciJQbluguvKg",
        "X-Google-Smtp-Source": "ADKCNb5DeksiYc+LNM5L/EYaRg+SXtb6egumTUrrOhoovktX9Y2YFP/S9n3BFOWGDZa5W+lNGioK5g==",
        "X-Received": "by 10.99.136.73 with SMTP id l70mr10360996pgd.185.1505095048151;\n\tSun, 10 Sep 2017 18:57:28 -0700 (PDT)",
        "Date": "Sun, 10 Sep 2017 18:57:26 -0700",
        "From": "\"H.J. Lu\" <hjl.tools@gmail.com>",
        "To": "gcc-patches@gcc.gnu.org",
        "Cc": "Uros Bizjak <ubizjak@gmail.com>",
        "Subject": "[PATCH] PR target/82166: Update preferred stack boundary for leaf\n\tfunctions",
        "Message-ID": "<20170911015726.GA24758@gmail.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=us-ascii",
        "Content-Disposition": "inline",
        "User-Agent": "Mutt/1.8.3 (2017-05-23)",
        "X-IsSubscribed": "yes"
    },
    "content": "preferred_stack_boundary may not be the minimum stack alignment.  For\nleaf functions without TLS access, max_used_stack_slot_alignment may be\nsmaller.  We should update preferred_stack_boundary for leaf functions.\n\nTested on i686 and x86-64.  OK for trunk?\n\nH.J.\n---\ngcc/\n\n\tPR target/82166\n\t* config/i386/i386.c (ix86_finalize_stack_frame_flags): Properly\n\tcompute the minimum stack alignment.  Also update preferred stack\n\tboundary when main () is a leaf function.\n\ngcc/testsuite/\n\n\tPR target/82166\n\t* gcc.target/i386/pr82166.c: New test.\n---\n gcc/config/i386/i386.c                  | 17 ++++++++++++-----\n gcc/testsuite/gcc.target/i386/pr82166.c | 14 ++++++++++++++\n 2 files changed, 26 insertions(+), 5 deletions(-)\n create mode 100644 gcc/testsuite/gcc.target/i386/pr82166.c",
    "diff": "diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c\nindex 4e93cc1043b..03338e422be 100644\n--- a/gcc/config/i386/i386.c\n+++ b/gcc/config/i386/i386.c\n@@ -14257,11 +14257,12 @@ ix86_finalize_stack_frame_flags (void)\n   unsigned int incoming_stack_boundary\n     = (crtl->parm_stack_boundary > ix86_incoming_stack_boundary\n        ? crtl->parm_stack_boundary : ix86_incoming_stack_boundary);\n+  unsigned int stack_alignment\n+    = (crtl->is_leaf && !ix86_current_function_calls_tls_descriptor\n+       ? crtl->max_used_stack_slot_alignment\n+       : crtl->stack_alignment_needed);\n   unsigned int stack_realign\n-    = (incoming_stack_boundary\n-       < (crtl->is_leaf && !ix86_current_function_calls_tls_descriptor\n-\t  ? crtl->max_used_stack_slot_alignment\n-\t  : crtl->stack_alignment_needed));\n+    = (incoming_stack_boundary < stack_alignment);\n   bool recompute_frame_layout_p = false;\n \n   if (crtl->stack_realign_finalized)\n@@ -14306,7 +14307,9 @@ ix86_finalize_stack_frame_flags (void)\n \t\t\t   HARD_FRAME_POINTER_REGNUM);\n \n       /* The preferred stack alignment is the minimum stack alignment.  */\n-      unsigned int stack_alignment = crtl->preferred_stack_boundary;\n+      if (stack_alignment > crtl->preferred_stack_boundary)\n+\tstack_alignment = crtl->preferred_stack_boundary;\n+\n       bool require_stack_frame = false;\n \n       FOR_EACH_BB_FN (bb, cfun)\n@@ -14349,6 +14352,10 @@ ix86_finalize_stack_frame_flags (void)\n \t\t= incoming_stack_boundary;\n \t      crtl->stack_alignment_needed\n \t\t= incoming_stack_boundary;\n+\t      /* Also update preferred_stack_boundary for leaf\n+\t         functions.  */\n+\t      crtl->preferred_stack_boundary\n+\t\t= incoming_stack_boundary;\n \t    }\n \t}\n       else\ndiff --git a/gcc/testsuite/gcc.target/i386/pr82166.c b/gcc/testsuite/gcc.target/i386/pr82166.c\nnew file mode 100644\nindex 00000000000..8bc63e15231\n--- /dev/null\n+++ b/gcc/testsuite/gcc.target/i386/pr82166.c\n@@ -0,0 +1,14 @@\n+/* { dg-do compile } */\n+/* { dg-options \"-Os\" } */\n+\n+void foo (void);\n+int a, b, c;\n+int\n+main (void)\n+{\n+  int j;\n+  for (; c;)\n+    a = b;\n+  for (; j;)\n+    foo ();\n+}\n",
    "prefixes": []
}