Re: nasm over gas?
Date: Fri Sep 12 2003 - 10:29:53 EST
On Thursday 11 September 2003 14:07, Ricardo Bugalho wrote:
> On Wed, 10 Sep 2003 00:34:57 +0300, insecure wrote:
> > That instruction is in main() initialization sequence. I.e. it is
> > executed once per program invocation. Summary: we lost 8 bytes for no
> > gain. There's not even a speed gain - we lost 8 bytes of _icache_, that
> > will bite us somewhere else.
> You're quite right, but the I-Cache is a non issue: this code will be
Please disable icache on your CPU ;)
> evicted when there is need to put something else. And because its only run
> once at the beginning of the program, it won't cause anything important to
> be evicted.
How can you know that it won't evict useful code?
> You can complain about the time it gets to fetch the code from
> RAM though.
Thanks for the tip. I missed that!
> Quoting another post from you: "I do _not_ advocate using asm anywhere
> except speed critical code."
> This code is obviously not critical. So, it makes a bad choice for
It makes perfectly fine point that gcc code is not good.
It just wasted 8 bytes in a rather simple code sequence.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/