This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [v3] Print ints directly to streambuf
- From: Jerry Quinn <jlquinn at optonline dot net>
- To: Benjamin Kosnik <bkoz at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Fri, 07 Mar 2003 22:31:21 -0500
- Subject: Re: [v3] Print ints directly to streambuf
- References: <E18mSJY-00059v-00@tiamat> <20030307194330.220c16b0.bkoz@redhat.com>
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