public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Paul Clarke <pc@us.ibm.com>
To: Paul E Murphy <murphyp@linux.ibm.com>, libc-alpha@sourceware.org
Cc: tuliom@ascii.art.br
Subject: Re: [PATCH v2 6/6] [powerpc] Rename fegetenv_status to fegetenv_control
Date: Mon, 23 Sep 2019 17:48:00 -0000	[thread overview]
Message-ID: <7c42954d-6fd3-4401-3665-c98fd7583454@us.ibm.com> (raw)
In-Reply-To: <986b012c-90dc-3f17-6b12-c80174d32f9a@linux.ibm.com>

On 9/23/19 11:21 AM, Paul E Murphy wrote:
> On 9/19/19 1:46 PM, Paul A. Clarke wrote:
>> fegetenv_status is used variously to retrieve the FPSCR exception enable
>> bits, rounding mode bits, or both.  These are referred to as the control
>> bits in the POWER ISA.  FPSCR status bits are also returned by the
>> 'mffs' and 'mffsl' instructions, but they are uniformly ignored by all
>> uses of fegetenv_status.  Change the name to be reflective of its
>> current and expected use.
>>
>> 2019-09-19  Paul A. Clarke  <pc@us.ibm.com>
>>
>>     * sysdeps/powerpc/fpu/fenv_libc.h (fegetenv_status): Rename to
>>     fegetenv_control.
>>     * sysdeps/powerpc/fpu/fedisblxcpt.c (fedisableexcept): Accommodate
>>     rename of fegetenv_status to fegetenv_control.
>>     * sysdeps/powerpc/fpu/feenablxcpt.c (feenableexcept): Likewise.
>>     * sysdeps/powerpc/fpu/fegetexcept.c (__fegetexcept): Likewise.
>>     * sysdeps/powerpc/fpu/fegetmode.c (fegetmode): Likewise.
>>     * sysdeps/powerpc/fpu/fesetenv.c (__fesetenv): Likewise.
>>     * sysdeps/powerpc/fpu/fesetmode.c (fesetmode): Likewise.
>> ---
>> v2: This is a new patch in the series.
> 
> OK.

Thanks!

> Reviewed-By: Paul E Murphy <murphyp@linux.ibm.com>
> 
>> diff --git a/sysdeps/powerpc/fpu/fegetmode.c b/sysdeps/powerpc/fpu/fegetmode.c
>> index 0e0a01c..65c5ebe 100644
>> --- a/sysdeps/powerpc/fpu/fegetmode.c
>> +++ b/sysdeps/powerpc/fpu/fegetmode.c
>> @@ -21,6 +21,6 @@
>>   int
>>   fegetmode (femode_t *modep)
>>   {
>> -  *modep = fegetenv_status ();
>> +  *modep = fegetenv_control ();
>>     return 0;
>>   }
> 
> Slightly off-topic, is fegetmode documented?

Again, not an expert here, but "git blame math/fegetmode.c" shows this:
--
commit ec94343f592df68ba1ba49bb2c558f7d2629387c
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Sep 7 16:40:09 2016 +0000

    Add femode_t functions.
    
    TS 18661-1 defines a type femode_t to represent the set of dynamic
    floating-point control modes (such as the rounding mode and trap
    enablement modes), and functions fegetmode and fesetmode to manipulate
    those modes (without affecting other state such as the raised
    exception flags) and a corresponding macro FE_DFL_MODE.
[...]
--

PC

  reply	other threads:[~2019-09-23 17:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-19 18:46 [PATCH v2 0/6] Various FPSCR-related changes Paul A. Clarke
2019-09-19 18:46 ` [PATCH v2 1/6] [powerpc] fenv_private.h clean up Paul A. Clarke
2019-09-20 15:37   ` Paul E Murphy
2019-09-22  5:11     ` Paul Clarke
2019-09-23 14:58       ` Paul E Murphy
2019-09-19 18:47 ` [PATCH v2 3/6] [powerpc] libc_feupdateenv_test: optimize FPSCR access Paul A. Clarke
2019-09-23 15:39   ` Paul E Murphy
2019-09-19 18:47 ` [PATCH v2 4/6] [powerpc] libc_feholdsetround_noex_ppc_ctx: optimize FPSCR write Paul A. Clarke
2019-09-23 15:55   ` Paul E Murphy
2019-09-23 17:54     ` Paul Clarke
2019-09-27 14:27       ` Paul E Murphy
2019-09-19 18:47 ` [PATCH v2 5/6] [powerpc] __fesetround_inline optimizations Paul A. Clarke
2019-09-23 16:08   ` Paul E Murphy
2019-09-19 18:47 ` [PATCH v2 6/6] [powerpc] Rename fegetenv_status to fegetenv_control Paul A. Clarke
2019-09-23 16:21   ` Paul E Murphy
2019-09-23 17:48     ` Paul Clarke [this message]
2019-09-19 18:47 ` [PATCH v2 2/6] [powerpc] No need to enter "Ignore Exceptions Mode" Paul A. Clarke
2019-09-23 15:16   ` Paul E Murphy
2019-09-19 19:15 ` [PATCH v2 7/6] [powerpc] Rename fesetenv_mode to fesetenv_control Paul A. Clarke
2019-09-23 16:24   ` Paul E Murphy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7c42954d-6fd3-4401-3665-c98fd7583454@us.ibm.com \
    --to=pc@us.ibm.com \
    --cc=libc-alpha@sourceware.org \
    --cc=murphyp@linux.ibm.com \
    --cc=tuliom@ascii.art.br \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).