Hi,

> > > Does anyone know, if gcc 3.x already supports MMX, MMX2, SSE and/or SSE2 ?
> > >
> > > If yes, then there's absolutely no need to fiddle with asm code around.
> > >
> > > One way is simply to use Intels C/C++ compiler to make use of these x86
> > > extensions, but it is not as widely used and available as gcc.
> 
> > icc isn't that cool one, hand optimized code is much better
> 
> Nowadays, c compiler optimizes the code that good, that you can't gain
> much with handoptimized asm code, except your code uses asm commands, the
> c compiler is not aware of.
In the most applications that's true, but for multimedia applications not.

> Further, asm code forces you to use and maintain lots of #ifdef...#endif
> blocks to be portable. And that makes the code look more ugly and harder
> to maintain. And I don't call that "hey cool!".
(see below)

> I'd prefer to let do this job do the c compiler, whereever possible.
but you couldn't force the users to use icc (i've never used that and i'm not wanting 
too)

> > > Thus, if gcc 3.x supports them, then people just need to upgrade...
> 
> > do not prefer gcc3.x over gcc2.95.4 especially by graphical libs/apps
> > gcc3 (and gcc 2.96.x) is a bit buggy yet with graphical codes.
> 
> In other words: gcc 3.x supports MMX, MMX2, SSE, etc. but this code is
> buggy. Is that right?
dunno

gcc 2.95.4 supports MMX/SSE too.. else you wouldn't able to compile the sources.
(here gcc means gnu compiler collection, so GAS supports the MMX/SSE opcodes)

The newer gcc versions (such as 3.x series) do support for example Altivec and MVI 
instructions
but older ones not.

> 
> > It makes more sense to include support for MMX/SSE optimized codes.
> 
> Yes, unless the c compiler generates code, that is as good as the hand
> optimized one. See above.
I don't believe that c compilers can do everything.

After our independent home measurances with gcc 2.95.x and 3.0.x/3.1.x it was clear:
gcc series-3 needs more time to compile the source (becouse of the optimization 
routines)
and makes a speedup about -4 to +4 % ;) Not that much i think.

Hmm, have a look at libmpeg2,liba52,ffmpeg/libavcodec or mplayer/postproc sources, 
they're heavily
optimized with runtime cpu detection. They've got the original C code in one file, and 
the optimized ones in others.

-- 
Alex Beregszaszi  <[EMAIL PROTECTED]>

Reply via email to