On Fri, 10 Jun 2016, Uros Bizjak wrote:

> Hello!
> 
> Attached patch implements __builtin_nanq and __builtin_nansq
> __float128 functions.
> 
> 2016-06-10  Uros Bizjak  <ubiz...@gmail.com>
> 
>     PR target/71241
>     * config/i386/i386.i386-builtin-types.def (CONST_STRING):
>     New primitive type.
>     (FLOAT128_FTYPE_CONST_STRING): New function type.
>     * config/i386/i386.c (enum ix86_builtins) [IX86_BUILTIN_NANQ]: New.
>     [IX86_BUILTIN_NANSQ]: Ditto.
>     (ix86_fold_builtin): Handle IX86_BUILTIN_NANQ and IX86_BUILTIN_NANSQ.
>     (ix86_init_builtin_types) Declare const_string_type_node.
>     Add __builtin_nanq and __builtin_nansq builtin functions.
>     (ix86_expand_builtin): Handle IX86_BUILTIN_NANQ and IX86_BUILTIN_NANSQ.
>     * doc/extend.texi (x86 Built-in Functions): Document
>     __builtin_nanq and __builtin_nansq.
> 
> Patch was bootstrapped and regression tested on x86_64-linux-gnu {,-m32}.
> 
> Joseph, does it look OK to you? Richi, I hope I got tree stuff
> implemented correctly.

Hmm, as we already have BUILT_IN_NAN[S] why not add NAN128 and NANS128
variants in the middle-end as we already have NAND128 (for decimal float 
128)?

I don't see why we need target specific builtins for this given you 
simply use middle-end functionality to construct the result.

Richard.

Reply via email to