Re: [PATCH] [2.4] [2.5] [i386] Add support for GCC 3.1 -march=pentium{-mmx,3,4}

Pavel Machek
2002-05-29T19:57:27Z

Hi!

> > > I would be (pleasantly) surprised to see gcc turn a C memcpy into faster
> > > assembly than our current implementation. And I'll bet
> >
> > gcc has hand-coded assembly inside itself, if gcc compiled memcpy is slower
> > than hand-optimized one, you found a compiler bug.
>
> Not at all. gcc compiled memcpy just has no knowledge of things like
> non-temporal stores, and using mmx/sse to move 64 bits at a time

non-temporal stores are bypassing cache? Is it always good idea?

> instead
> of 32 bit registers. (It's only recently it got prefetch abilities
> too).

gcc knows about mmx/sse, and could decide to use it.
Pavel
--
Casualities in World Trade Center: ~3k dead inside the building,
cryptography in U.S.A. and free speech in Czech Republic.