{"id":807185,"url":"http://patchwork.ozlabs.org/api/1.2/patches/807185/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/patch/CAFULd4YyFbjxqu-y2Ok5_LtaW=LKUK7cW0nZwRC0v-fL8E05xQ@mail.gmail.com/","project":{"id":17,"url":"http://patchwork.ozlabs.org/api/1.2/projects/17/?format=json","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":"<CAFULd4YyFbjxqu-y2Ok5_LtaW=LKUK7cW0nZwRC0v-fL8E05xQ@mail.gmail.com>","list_archive_url":null,"date":"2017-08-29T17:03:29","name":"[i386] : Simplify setting of opts->x_flag_entry.","commit_ref":null,"pull_url":null,"state":"new","archived":false,"hash":"853eae0f1eca7ea6fd236fab65fcf4f2c1951284","submitter":{"id":808,"url":"http://patchwork.ozlabs.org/api/1.2/people/808/?format=json","name":"Uros Bizjak","email":"ubizjak@gmail.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/gcc/patch/CAFULd4YyFbjxqu-y2Ok5_LtaW=LKUK7cW0nZwRC0v-fL8E05xQ@mail.gmail.com/mbox/","series":[{"id":416,"url":"http://patchwork.ozlabs.org/api/1.2/series/416/?format=json","web_url":"http://patchwork.ozlabs.org/project/gcc/list/?series=416","date":"2017-08-29T17:03:29","name":"[i386] : Simplify setting of opts->x_flag_entry.","version":1,"mbox":"http://patchwork.ozlabs.org/series/416/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/807185/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807185/checks/","tags":{},"related":[],"headers":{"Return-Path":"<gcc-patches-return-461102-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-461102-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=\"WNiaDq20\"; 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 3xhZjN29vlz9t3F\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 03:03:51 +1000 (AEST)","(qmail 41243 invoked by alias); 29 Aug 2017 17:03:43 -0000","(qmail 41192 invoked by uid 89); 29 Aug 2017 17:03:43 -0000","from mail-vk0-f53.google.com (HELO mail-vk0-f53.google.com)\n\t(209.85.213.53) by sourceware.org\n\t(qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP;\n\tTue, 29 Aug 2017 17:03:32 +0000","by mail-vk0-f53.google.com with SMTP id s199so11262172vke.1 for\n\t<gcc-patches@gcc.gnu.org>; Tue, 29 Aug 2017 10:03:32 -0700 (PDT)","by 10.103.55.28 with HTTP; Tue, 29 Aug 2017 10:03:29 -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\n\t:mime-version:from:date:message-id:subject:to:content-type; q=\n\tdns; s=default; b=lzzm1lfOIV4wR2wQYkfE2TngprudmjHShtvS3uqJe6ZYBp\n\tCRh2AeNBgciZisBWUqZb6A1w69SrA1E6jHGXKwntGMkLTEQOCbk/db1TAg6OsLQJ\n\tGfmeiCfrAqq6KAvjIpt/h7SkDcFsKkOyrY2F9Gb9iqv7Wjo73wnycHRyoAglQ=","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\n\t:mime-version:from:date:message-id:subject:to:content-type; s=\n\tdefault; bh=AkVPpkBuwf9MlU3nJiV8Eit/RsQ=; b=WNiaDq20yPAEVbJDFZ+N\n\tajbhAeHT3Pm1FiFchLJN5q97UxZRyAQ9iyGX0WF3xStLXSCD/8pfKyukypBYNojA\n\tMJO/3rBa6S/QEA5krwKi6K/WPaWgO6CCrZqg/EgC1BMdegYawlk97N1Rs01AQ0K8\n\tG5uTLl7kHgmZcEE0hBxpVa4=","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=-24.6 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,\n\tSPF_PASS autolearn=ham version=3.3.2 spammy=","X-HELO":"mail-vk0-f53.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:mime-version:from:date:message-id:subject:to;\n\tbh=r2PeLMvT3V4k9W+oQSJZ+xojZZOqGHD3R3TcCDbUxzc=;\n\tb=XpwjEK2U1N4yhJzj8+B6+NijS5mAh8h/ZA7tTjNh0kvCOVzdIvXP4uhdjQMyK1rm3w\n\tQPl6l9oB0uHxA3dg/eWLgqwnG3QXllT1sFzu9B7V5Hbi9FTQiRK/NBVo82bSyIIT3k0n\n\tHSTjsihXT6lAlwHznm2RUN5Oe/rohqnw8SZ0JC0L+qwDnhpzTgiFtjaT2k7QlI12ImSK\n\tNhZcyoPOu2P42oizF97XeKxJF7qyJS/T+5R0cyjrQWSn6x9ginKWf4ixPpqIGlqeXGry\n\t3IIhmenI1iYZdA9Lexp18NEdpBQ3kZE0wL8iewjbcc9iK3yBeEN6em51jq+Lf/VfHrmR\n\t9bEQ==","X-Gm-Message-State":"AHYfb5i7xx7BRseQKPypDx7mnpQ9ynHIZFBKlgECpPf+M0/aZS/epHrD\tsZsIw4guMjnvAv2CoEMkS5etQ9Ypic3Y","X-Received":"by 10.31.86.197 with SMTP id k188mr667943vkb.196.1504026210105;\n\tTue, 29 Aug 2017 10:03:30 -0700 (PDT)","MIME-Version":"1.0","From":"Uros Bizjak <ubizjak@gmail.com>","Date":"Tue, 29 Aug 2017 19:03:29 +0200","Message-ID":"<CAFULd4YyFbjxqu-y2Ok5_LtaW=LKUK7cW0nZwRC0v-fL8E05xQ@mail.gmail.com>","Subject":"[PATCH, i386]: Simplify setting of opts->x_flag_entry.","To":"\"gcc-patches@gcc.gnu.org\" <gcc-patches@gcc.gnu.org>","Content-Type":"multipart/mixed; boundary=\"001a114e61eefcdd8a0557e76345\""},"content":"Check opts_set->x_flag_fentry and remove check for non-existing\nPROFILE_BEFORE_PROLOGUE definition.\n\n2017-08-29  Uros Bizjak  <ubizjak@gmail.com>\n\n    * config/i386/i386.opt (flag_fentry): Do not init to -1.\n    * config/i386/i386.c (ix86_option_override_internal): Simplify\n    setting of opts->x_flag_entry.\n\nBootstrapped and regression tested on x86_64-linux-gnu {,-m32}.\n\nCommitted to mainline SVN.\n\nUros.","diff":"diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c\nindex b5c113d95aad..509fd3a26d5b 100644\n--- a/gcc/config/i386/i386.c\n+++ b/gcc/config/i386/i386.c\n@@ -6545,27 +6545,18 @@ ix86_option_override_internal (bool main_args_p,\n     opts->x_target_flags |= MASK_CLD & ~opts_set->x_target_flags;\n #endif\n \n-  if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && opts->x_flag_pic)\n+  /* Set the default value for -mfentry.  */\n+  if (!opts_set->x_flag_fentry)\n+    opts->x_flag_fentry = TARGET_SEH;\n+  else\n     {\n-      if (opts->x_flag_fentry > 0)\n-        sorry (\"-mfentry isn%'t supported for 32-bit in combination \"\n+      if (!TARGET_64BIT_P (opts->x_ix86_isa_flags) && opts->x_flag_pic\n+\t  && opts->x_flag_fentry)\n+\tsorry (\"-mfentry isn%'t supported for 32-bit in combination \"\n \t       \"with -fpic\");\n-      opts->x_flag_fentry = 0;\n-    }\n-  else if (TARGET_SEH)\n-    {\n-      if (opts->x_flag_fentry == 0)\n+      else if (TARGET_SEH && !opts->x_flag_fentry)\n \tsorry (\"-mno-fentry isn%'t compatible with SEH\");\n-      opts->x_flag_fentry = 1;\n     }\n-  else if (opts->x_flag_fentry < 0)\n-   {\n-#if defined(PROFILE_BEFORE_PROLOGUE)\n-     opts->x_flag_fentry = 1;\n-#else\n-     opts->x_flag_fentry = 0;\n-#endif\n-   }\n \n   if (TARGET_SEH && TARGET_CALL_MS2SYSV_XLOGUES)\n     sorry (\"-mcall-ms2sysv-xlogues isn%'t currently supported with SEH\");\ndiff --git a/gcc/config/i386/i386.opt b/gcc/config/i386/i386.opt\nindex 8bf6af21fd18..81bbc1e2170a 100644\n--- a/gcc/config/i386/i386.opt\n+++ b/gcc/config/i386/i386.opt\n@@ -862,7 +862,7 @@ Target Report Mask(ISA_PREFETCHWT1) Var(ix86_isa_flags) Save\n Support PREFETCHWT1 built-in functions and code generation.\n \n mfentry\n-Target Report Var(flag_fentry) Init(-1)\n+Target Report Var(flag_fentry)\n Emit profiling counter call at function entry before prologue.\n \n mrecord-mcount\n","prefixes":["i386"]}