From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com [68.232.129.153]) by sourceware.org (Postfix) with ESMTPS id A5B38385782F for ; Fri, 15 Jan 2021 22:08:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A5B38385782F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=Sandra_Loosemore@mentor.com IronPort-SDR: cG333byojQLrtQieKBpFSEZ3wgehXtozTznUOagmz6phMV5bYeA8Z3VXWoxt9gN4E3kARR/Dhq HB16mzrWLXtugp2HLKm4mMwVoij/S+C6pnXC1XnkuXerxXw/ANrizLjxSTr2sFix9boYm1w3MS /8MNOS0mj5j0hY8fiqbFkXRRZvoAfOhNx2CEvud/JcDtJh1R7M1EVBR+EmkkBO4LP6W4vapeGH 3fm9clEYn4yCibEZ9bmife5fyYUb4oeS0H1nVBbxVPNwcl1FS2nH5gJTRUZfw7iDTMtem7Ahb7 Bro= X-IronPort-AV: E=Sophos;i="5.79,350,1602576000"; d="scan'208";a="59413860" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 15 Jan 2021 14:08:57 -0800 IronPort-SDR: C4LWRDxGcVIXK74UvW4st4NuYKmacPnZxwFej2IFYPLFon2vGsz+izN4EKs0ud0R/CEnDsO9xK sxFqiIWCeFNUG0UiYKCG5AANHYbjbJkLL9KwnoFFeIVwmIybONeJPVJTaY+OMhL5SbF7Dx6zj4 aSkjhXLK3OReo4PSphhFpGIoVUNNYdi+U6R+P0kWldAhIQuk3eX9Fl6icDhsTZaD8dVAKjKfFh OjW+3dmNWZTKTSmE+b9Tb0x4ctC3pdOpMcGN01tr2yPyg0uQwMjyB4swEkO2qV4bJSbqBMpyMm Evs= Subject: Re: [PATCH 1/2] nios2: Add -mcustom-fpu-cfg=fph2 To: Sebastian Huber , References: <20210114191649.7589-1-sebastian.huber@embedded-brains.de> <50a972c4-97df-a0f4-ca9e-d6b21952bb9e@embedded-brains.de> From: Sandra Loosemore Message-ID: <10d89495-0039-44c5-d119-8d9d6bcff121@codesourcery.com> Date: Fri, 15 Jan 2021 15:08:51 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <50a972c4-97df-a0f4-ca9e-d6b21952bb9e@embedded-brains.de> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) To svr-orw-mbx-03.mgc.mentorg.com (147.34.90.203) X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00, BODY_8BITS, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, KAM_NUMSUBJECT, NICE_REPLY_A, SPF_HELO_PASS, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2021 22:09:00 -0000 On 1/15/21 2:27 PM, Sebastian Huber wrote: > Hello Sandra, > > On 15/01/2021 20:12, Sandra Loosemore wrote: >>> >>> The following instructions supported by this component are not enabled >>> by this option: >>> >>> * -mcustom-fmins >>> * -mcustom-fmaxs >>> * -mcustom-round >>> >>> The reason is that these instructions are only in effect in combination >>> with other options. If they are not set, then a build error occurs in >>> libatomic since -Werror is used for building this library: >>> >>> cc1: error: switch '-mcustom-fmins' has no effect unless >>> '-ffinite-math-only' is specified [-Werror] >>> cc1: error: switch '-mcustom-fmaxs' has no effect unless >>> '-ffinite-math-only' is specified [-Werror] >>> cc1: error: switch '-mcustom-round' has no effect unless >>> '-fno-math-errno' is specified [-Werror] >>> >> >> Seems like it would be better to have a separate switch to disable >> these warnings, or perhaps remove them entirely, as I'm sure there are >> other custom instructions that are not used unless -ffinite-math-only, >> -fno-math-errno, or -ffast-math are also specified (e.g., I see an >> issue in our internal tracker about fsqrts) and we don't consistently >> warn about those.  So I think the warnings are of dubious value. Maybe >> the existing -Wdisabled-optimization flag could be used here to >> control the warnings we're already checking for? > > thanks for having a look at it. It would be good to control the warning > via an option not enabled by -Wall or remove the warnings. The > -Wdisabled-optimization not used in gcc/config/*: > > grep -r 'warning (OPT_Wdisabled' gcc/ > gcc/tree-ssa-loop-prefetch.c:     warning (OPT_Wdisabled_optimization, > gcc/gcse.c:      warning (OPT_Wdisabled_optimization, > gcc/gcse.c:      warning (OPT_Wdisabled_optimization, > > The warning description doesn't really fit from my point of view. > > Maybe use -Wextra which is already used by avr (not really a prime target): > > grep -r 'warning (OPT_Wextra' gcc/config > gcc/config/avr/avr.c:          warning (OPT_Wextra, "rounding to %d bits > has no effect for " Hmmm, -Wextra seems too generic. At this point, I think the easiest thing would just be to remove the warnings. I'm pretty sure other backends don't warn if you specify some CPU variant that includes instructions that aren't used by GCC unless you also specify -ffast-math or whatever, and that's basically what's going on here. -Sandra