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: [v3] Print ints directly to streambuf


Benjamin Kosnik writes:
 > 
 > Can you update this to use __builtin_clz as suggested by Richard? 

Sure.  From the discussion, it sounds like it's worth having this
ifdef'd by the platforms on which it's a win.  Richard listed x86,
ppc, alphaev67, arm, and ia64.

Can I do something like

#ifdef __i386__ || __powerpc__ || __alphaev67__ || __arm__ || __ia64__
  __builtin_clz
#else
  regular code
#endif

so other targets still get a reasonable inline implementation?
Mainly, I'm not sure what macros I can count on.

Jerry


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