on 2022/4/13 3:11 AM, Segher Boessenkool wrote:
> On Tue, Apr 12, 2022 at 10:02:06AM +0800, Kewen.Lin wrote:
>> on 2022/4/11 11:42 PM, Segher Boessenkool wrote:
>>> On Mon, Apr 11, 2022 at 04:29:40PM +0800, Kewen.Lin wrote:
>>>> Nice, I confirmed this makes ICE gone, I've filed one new PR
>>>> PR105213 for GCC13 further tracking by associating this patch there.
>>>
>>> Cool, I'll commit it later today then (after a final regstrap).  The
>>> _nodm pattern just missed the alternative for no FP regs (the _dm
>>> pattern has it, so just an oversight).
>>
>> Thanks!  So it can be counted as a regression fix instead of tiny
>> feature work?  Maybe we also need bif documentation change, and
>> gcc12 changes html update (as bif behavior changes), or it's
>> too small so no?
> 
> It is just a bugfix.  Everything in anything that is not a new feature
> is arguably a regression fix, so that classification isn't useful
> normally.  I'd rather fix more bugs than do more filing work ;-)
> 
> The documentation already has this under "The following built-in
> functions are also available on all PowerPC processors:", so no doc
> changes are needed either: this is a bugfix! :-)
> 
> 
Thanks for the explanation!!

As to the documentation, there seem some contradictions.

On page[1], we only have the description for {un,}pack_{ibm128}, that is:

"
The following built-in functions are also available on all PowerPC processors:

uint64_t __builtin_ppc_get_timebase ();
unsigned long __builtin_ppc_mftb ();
double __builtin_unpack_ibm128 (__ibm128, int);
__ibm128 __builtin_pack_ibm128 (double, double);
double __builtin_mffs (void);
void __builtin_mtfsf (const int, double);
void __builtin_mtfsb0 (const int);
void __builtin_mtfsb1 (const int);
void __builtin_set_fpscr_rn (int);
"

On page[2], we have the description for both {un,}pack_{ibm128} and 
{un,}pack_{longdouble}

"
**The following functions require -mhard-float and -mmultiple options.**

The __builtin_unpack_longdouble function takes a long double argument and a 
compile time constant of 0 or 1. If the constant is 0, the first double within 
the long double is returned, otherwise the second double is returned. The 
__builtin_unpack_longdouble function is only available if long double uses the 
IBM extended double representation.

The __builtin_pack_longdouble function takes two double arguments and returns a 
long double value that combines the two arguments. The 
__builtin_pack_longdouble function is only available if long double uses the 
IBM extended double representation.

The __builtin_unpack_ibm128 function takes a __ibm128 argument and a compile 
time constant of 0 or 1. If the constant is 0, the first double within the 
__ibm128 is returned, otherwise the second double is returned.

The __builtin_pack_ibm128 function takes two double arguments and returns a 
__ibm128 value that combines the two arguments.

Additional built-in functions are available for the 64-bit PowerPC family of 
processors, for efficient use of 128-bit floating point (__float128) values. 
"

By comparing the above, we seemed to place the documentation for 
{un,}pack_{ibm128} in the former wrongly.
And need to update page[2] according to the recent change?

[1] 
https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html#Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations
[2] 
https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-ISA-2_002e05.html#Basic-PowerPC-Built-in-Functions-Available-on-ISA-2_002e05

BR,
Kewen

Reply via email to