This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Re: [PATCH] [powerpc] get_rounding_mode: utilize faster method to get rounding mode



On 6/5/19 5:42 PM, Tulio Magno Quites Machado Filho wrote:
> "Paul A. Clarke" <pc@us.ibm.com> writes:
> 
>> diff --git a/sysdeps/powerpc/fpu/fenv_libc.h b/sysdeps/powerpc/fpu/fenv_libc.h
>> index 8a0bace..621e57f 100644
>> --- a/sysdeps/powerpc/fpu/fenv_libc.h
>> +++ b/sysdeps/powerpc/fpu/fenv_libc.h
>> @@ -34,6 +34,21 @@ extern const fenv_t *__fe_mask_env (void) attribute_hidden;
>>     pointer.  */
>>  #define fegetenv_register() __builtin_mffs()
>>  
>> +/* Equivalent to fegetenv_register, but only returns bits for
>> +   status, exception enables, and mode.  */
>> +#ifdef _ARCH_PWR9
>> +#define fegetenv_status() \
>> +  ({union { double __d; unsigned long long __ll; } __u;	\
>> +    register double __fr;				\
>> +    __asm__ ("mffsl %0" : "=f" (__fr));			\
>> +    __u.__d = __fr;					\
>> +    __u.__ll;						\
>> +  })
>> +#else
>> +#define fegetenv_status() __builtin_mffs()
>> +#error "power8"
>> +#endif
> 
> Is this macro used in fegetexcept.c?
> Is the error intentional?

This hunk should not be in this patch submission.  I shall remove it.

Sorry I missed this comment before.

PC


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