Ulrich Drepper wrote: > Mark Mitchell wrote: > >>Yes, GLIBC does that kind of thing, and we could do. In the simplest >>form, we could have startup code that checks the CPU, and sets up a >>table of function pointers that application code could use. > > > That's not what glibc does and it is a horrible idea. The indirect > jumps are costly, very much so. The longer the pipeline the worse.
I didn't mean to imply that GLIBC uses the simplistic solution I suggested, and, certainly, dynamic linking is going to be better on ssytems that support it. The simplistic solution was meant to be illustrative, and might be appropriate for use on systems without dynamic linking, like bare-metal embedded configurations, where, however, the exact CPU isn't know at link-time. -- Mark Mitchell CodeSourcery, LLC [EMAIL PROTECTED] (916) 791-8304