[SDL] Re: SDL_mixer lib questions

Pierre Phaneuf pphaneuf at sx.nec.com
Fri Apr 7 10:42:18 PDT 2000


Martin Donlon wrote:

> > Particularly if you use some easy assembler, like add with carry, then
> > check the carry instead of a C language "if" to do the clipping. MMX can
> > be helpful also, but the add with carry thing works everywhere and is a
> > BIG step from C-only implementation.
> >
> > The C-only implementation is already nice on only slightly powerful
> > machines, mind you, but I have this 486 at home... :-)
> 
> I don't think there is such a thing as "easy" assemlber in a
> cross-platform api.

Huh? glibc uses assembler routines and is cross-platform. The only thing
is that a C implementation should be "fast enough". If there is an
assembler implementation that works on the platform you are compiling
on, it should be used instead (look at memcpy for example).

As long as the assembler loop is hidden from the application using it,
it's okay.

Asking the application programmer to do some assembler is a whole other
thing! This wouldn't be acceptable.

-- 
Pierre Phaneuf
Systems Exorcist



More information about the SDL mailing list