This is the mail archive of the
mailing list for the GCC project.
Re: implement __builtin_copysign
- From: Roger Sayle <roger at eyesopen dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Fri, 28 Jan 2005 19:03:45 -0700 (MST)
- Subject: Re: implement __builtin_copysign
On Fri, 28 Jan 2005, Richard Henderson wrote:
> On Thu, Jan 27, 2005 at 11:00:40PM -0500, Kaveh R. Ghazi wrote:
> > Thoughts on doing this at the tree level like my signbit patch?
> > (Queued for 4.1)
> > http://gcc.gnu.org/ml/gcc-patches/2004-09/msg02499.html
> Unsure. I'm not 100% convinced that your signbit patch is the
> right way to go either. I'm not convinced that exposing this at
> the tree level -- at least the way we currently do it, is at all
> I can definitely see reusing some of the tree expanders to do
> this (e.g. extract_bit_field) instead of playing with subregs
There's already an expand_builtin_signbit that uses extract_bit_field
that does exactly this. Unfortunately, convincing the RTL expanders
to manipulate the signbit of floating point types wider than the
widest integer mode proved too tricky.
Certainly for copysign and similar functions, its preferable to
expand builtins whilst lowering to RTL to take advantage of hardware
optab support where available.