[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Architecture Nomenclature



Le mardi 27 avril 2010 à 17:07 -0700, Kip Warner a écrit :
> You're right, that can indeed be done with a few lines of code. e.g.
> cpuid instruction. The problem is that you then have to perform a branch
> every time you could potentially use hardware acceleration: a condition
> for when, say, SSE2 is available, and another for a generic
> implementation.
> 
> It isn't ideal performance wise.

The simplest solution is to put the routines in a shared library and to
build two versions of the library. Put the i486 one in /usr/lib and the
SSE2 one in /usr/lib/i686/sse2.

-- 
 .''`.      Josselin Mouette
: :' :
`. `'   “A handshake with whitnesses is the same
  `-     as a signed contact.”  -- Jörg Schilling


Reply to: