From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/7354 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] MIPS big endian and *stat syscalls return value Date: Tue, 7 Apr 2015 14:24:22 -0400 Message-ID: <20150407182422.GJ6817@brightrain.aerifal.cx> References: <5523A299.5050209@ndmsystems.com> <20150407115821.GA31681@port70.net> <20150407143415.GI6817@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1428431077 24045 80.91.229.3 (7 Apr 2015 18:24:37 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 7 Apr 2015 18:24:37 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-7367-gllmg-musl=m.gmane.org@lists.openwall.com Tue Apr 07 20:24:37 2015 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1YfYAu-0005S7-NH for gllmg-musl@m.gmane.org; Tue, 07 Apr 2015 20:24:36 +0200 Original-Received: (qmail 19698 invoked by uid 550); 7 Apr 2015 18:24:35 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 19676 invoked from network); 7 Apr 2015 18:24:34 -0000 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:7354 Archived-At: On Tue, Apr 07, 2015 at 09:18:33PM +0300, Eugene Yudin wrote: > Thanks for a quick response! > > On Tue, Apr 7, 2015 at 5:34 PM, Rich Felker wrote: > > > I'm > > guessing you need -O0 to trigger it, no? > > > I'm experience problem with optimization for size (-Os). > It's look like behaviour was changed in later GCC (at least from 4.8.3). > I will test another optimization levels. OK. In any case I committed the fix. Thanks for catching this! > > > i wonder if __stat_fix could be inlined in a way that the > > > compiler knows it shouldnt clobber r2. > > > > In practice it always is, at least for me. But relying on that for > > semantic purposes is not valid. > > I read that in linux kernel are used attribute "always_inline" for critical > parts. Yes, and that's an ugly/broken hack. If the code is semantically wrong (i.e. if the old code doesn't formally preclude clobbering) then it needs to be fixed, not painted over with forced inlining. Rich