This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Intrinsics with -march=pentium3


> Wouldn't you compile the SSE routine in one source file with the switch, and the non-SSE routine in a different source file (along with all the rest of the other source code) without the switch.

I guess I can always do that, but it's going to be messy trying to tell
autoconf "compile this file with a different switch and only if this
switch is enabled". Any idea how one would do that?

> Then algorithmically determine if the SSE support is available and programmatically set a function pointer to the correct routine, and utilize the SSE or non-SSE routine via that function pointer mechanism.

For simple functions, wouldn't that be slower than a plain "if" because
of the branch prediction?

	Jean-Marc

-- 
Jean-Marc Valin, M.Sc.A., ing. jr.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada

Attachment: signature.asc
Description: Ceci est une partie de message=?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e=2E?=


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]