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, i386]: Implement ldexp{,f,l} functions as built-in x87 intrinsics


On Fri, Feb 11, 2005 at 04:57:23PM +0100, Uros Bizjak wrote:
> BTW: It looks that scalbn{,f,l} functions are the same as ldexp{,f,l}.  
> Could these builtins be implemented with the same patterns as 
> corresponding ldexp{,f,l} patterns?

For -ffast-math, yes.

> BTW2: I think that the only remaining builtins missing from mathinline.h 
> are now fma() and hypot(). In follow-up patch, I plan to implement 
> these, and after that, gcc could define __NO_MATH_INLINES without any 
> problems.

We're not going to do that.

>    * optabs.h (enum optab_index): Add new OTI_ldexp.
>    (ldexp_optab): Define corresponding macro.
>    * optabs.c (init_optabs): Initialize ldexp_optab.
>    * genopinit.c (optabs): Implement ldexp_optab using ldexp?f3
>    patterns.
>    * builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_LDEXP{,F,L}
>    using ldexp_optab.
>    (expand_builtin): Expand BUILT_IN_LDEXP{,F,L} using
>    expand_builtin_mathfn_2 if flag_unsafe_math_optimizations is set.
> 
>    * config/i386/i386.md (ldexpsf3, ldexpdf3, ldexpxf3): New expanders
>    to implement ldexpf, ldexp and ldexpl built-ins as inline x87
>    intrinsics.

Ok.


r~


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