[PATCH 3/7] ldbl-128ibm-compat: Add tests for IBM long double functions

Paul E Murphy murphyp@linux.ibm.com
Fri Feb 14 18:22:00 GMT 2020



On 2/14/20 11:31 AM, Joseph Myers wrote:
> On Fri, 14 Feb 2020, Paul E. Murphy wrote:
> 
>> diff --git a/math/test-float128.h b/math/test-float128.h
>> index 8f9eec14aa..07945a090b 100644
>> --- a/math/test-float128.h
>> +++ b/math/test-float128.h
>> @@ -28,7 +28,7 @@
>>   #define CFLOAT __CFLOAT128
>>   #define BUILD_COMPLEX(real, imag) (CMPLXF128 ((real), (imag)))
>>   #define PREFIX FLT128
>> -#if FLT128_MANT_DIG == LDBL_MANT_DIG
>> +#if __LONG_DOUBLE_USES_FLOAT128 == 0 && FLT128_MANT_DIG == LDBL_MANT_DIG
>>   # define TYPE_STR "ldouble"
>>   # define ULP_IDX ULP_LDBL
>>   # define ULP_I_IDX ULP_I_LDBL
> 
> This condition doesn't make sense to me, but it may be because
> __LONG_DOUBLE_USES_FLOAT128 is a badly named macro.  Could you please post
> a patch that adds a comment to the top-level bits/long-double.h that
> documents the detailed semantics of the __LONG_DOUBLE_USES_FLOAT128, and
> then we can consider whether that macro needs to be given a better name?
> 
The macro might better read as something like 
__LDOUBLE_REDIRECTS_TO_FLOAT128_ABI.  Would such be a more fitting name?

Anyhow, toward this patch, I think it is using the wrong macro. 
__HAVE_DISTINCT_FLOAT128  == 0 seems to be the appropriate test.



More information about the Libc-alpha mailing list