[PATCH 3/5] math: New generic fma implementation
Adhemerval Zanella Netto
adhemerval.zanella@linaro.org
Tue Nov 25 15:49:43 GMT 2025
On 25/11/25 12:42, Andreas Schwab wrote:
> On Nov 13 2025, Adhemerval Zanella wrote:
>
>> diff --git a/sysdeps/ieee754/dbl-64/math_config.h b/sysdeps/ieee754/dbl-64/math_config.h
>> index 36a47ae7dbb..b6b5da60545 100644
>> --- a/sysdeps/ieee754/dbl-64/math_config.h
>> +++ b/sysdeps/ieee754/dbl-64/math_config.h
>> @@ -85,6 +85,24 @@ static inline int32_t
>> converttoint (double x);
>> #endif
>>
>> +#ifndef TOINT64_INTRINSICS
>> +# define TOINT64_INTRINSICS 1
>> +#endif
>> +
>> +static inline double converttoint64 (int64_t a)
>> +{
>> +#if !TOINT64_INTRINSICS
>> + union { int64_t x; double d; } low = {.d = 0x1.0p52};
>> +
>> + double high = (int32_t)(a >> 32) * 0x1.0p32;
>> + low.x |= a & INT64_C(0x00000000ffffffff);
>> +
>> + return (high - 0x1.0p52) + low.d;
>
> That's rather convertfromint64.
>
Ack, I will change it.
More information about the Libc-alpha
mailing list