mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] MIPS big endian and *stat syscalls return value
Date: Tue, 7 Apr 2015 14:24:22 -0400	[thread overview]
Message-ID: <20150407182422.GJ6817@brightrain.aerifal.cx> (raw)
In-Reply-To: <CAPmKWpG8z3rzjtjb17cPQb8SrVp_Es4S2HD6o1-sBeOHmitQQg@mail.gmail.com>

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 <dalias@libc.org> 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


  reply	other threads:[~2015-04-07 18:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-07  9:25 Eugene
2015-04-07 11:58 ` Szabolcs Nagy
2015-04-07 14:34   ` Rich Felker
2015-04-07 18:18     ` Eugene Yudin
2015-04-07 18:24       ` Rich Felker [this message]
2015-04-08  7:37         ` Eugene

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150407182422.GJ6817@brightrain.aerifal.cx \
    --to=dalias@libc.org \
    --cc=musl@lists.openwall.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).