This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ 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: Call for compiler help/advice: atomic builtins for v3


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
mark@codesourcery.com
(916) 791-8304


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