This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Re: [PATCH] [powerpc] get_rounding_mode: utilize faster method to get rounding mode
- From: Paul Clarke <pc at us dot ibm dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at ascii dot art dot br>, libc-alpha at sourceware dot org
- Date: Wed, 5 Jun 2019 18:04:11 -0500
- Subject: Re: Re: [PATCH] [powerpc] get_rounding_mode: utilize faster method to get rounding mode
- References: <1559773022-26575-1-git-send-email-pc@us.ibm.com> <871s07k62j.fsf@linux.ibm.com>
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