Re: [discuss] [PATCH] x86-64: memset optimization

2007-08-21 Thread Denys Vlasenko
On Monday 20 August 2007 19:56, Jan Hubicka wrote: > > > > The problem is with the optimization flags: passing -Os causes the > > > > compiler to be stupid and not inline any memset/memcpy functions. > > > > > > you get what you ask for.. if you don't want that then don't ask for > > > it ;) >

Re: [discuss] [PATCH] x86-64: memset optimization

2007-08-20 Thread Jan Hubicka
> > > The problem is with the optimization flags: passing -Os causes the > compiler > > > to be stupid and not inline any memset/memcpy functions. > > > > you get what you ask for.. if you don't want that then don't ask for > > it ;) > > Well, the compiler is really being dumb about -Os and

Re: [discuss] [PATCH] x86-64: memset optimization

2007-08-20 Thread Andi Kleen
> so the code gets bigger and worse in every way. I guess it would make sense to file this as a bug in the gcc bugzilla Another useful enhancement might be to have a -finline-string-functions or similar that could be set with -Os. In general I've been wondering for some time if the kernel really

Re: [discuss] [PATCH] x86-64: memset optimization

2007-08-20 Thread Roland Dreier
> > The problem is with the optimization flags: passing -Os causes the compiler > > to be stupid and not inline any memset/memcpy functions. > > you get what you ask for.. if you don't want that then don't ask for > it ;) Well, the compiler is really being dumb about -Os and in fact it's giv

Re: [discuss] [PATCH] x86-64: memset optimization

2007-08-20 Thread Arjan van de Ven
On Mon, 2007-08-20 at 08:52 -0700, Stephen Hemminger wrote: > The problem is with the optimization flags: passing -Os causes the compiler > to be stupid and not inline any memset/memcpy functions. you get what you ask for.. if you don't want that then don't ask for it ;) - To unsubscribe from

Re: [discuss] [PATCH] x86-64: memset optimization

2007-08-20 Thread Stephen Hemminger
On Sun, 19 Aug 2007 20:24:24 +0200 Andi Kleen <[EMAIL PROTECTED]> wrote: > > > I am looking at current source, built with current (non-experimental) GCC > > from Fedora Core 7. If I dissassemble ether_setup, which is > > > > void ether_setup(struct net_device *dev) > > { > > ... > > > > mem

Re: [discuss] [PATCH] x86-64: memset optimization

2007-08-19 Thread Andi Kleen
> I am looking at current source, built with current (non-experimental) GCC > from Fedora Core 7. If I dissassemble ether_setup, which is > > void ether_setup(struct net_device *dev) > { > ... > > memset(dev->broadcast, 0xFF, ETH_ALEN); > } > > I see a tail recursion (jmp) to memset which