This is the mail archive of the gcc-patches@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: [patch] use __builtin_ctzl in ggc-page


On Tue, Jan 18, 2005 at 11:43:12PM +0100, Steven Bosscher wrote:
> It should be possible to produce a similar code sequence in RTL from
> builtins.c, right?  I don't know how I'd have to do that, probably
> something with optabs, but I don't know if it is possible somehow to
> have an optab that generatez inline RTL for a builtin.  Hints would
> be appreciated ;-)

There's examples for double-word shifts, for instance.  This would
simply be a fallback if the optabs icode was not present.  You'd
also want to be careful to use the libcall for -Os.

> Is there some way to detect if the host needs a libcall for a builtin?

Not without trying it.  Alpha, for instance, currently only enables
the pattern for TARGET_CIX.  Although we have nice efficient code
sequences in longlong.h that would be better than you'd be able to
do generically in optabs.c.


r~


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