public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Carlos O'Donell" <carlos@redhat.com>
To: Steve Ellcey <sellcey@mips.com>
Cc: "Joseph S. Myers" <joseph@codesourcery.com>, libc-ports@sourceware.org
Subject: Re: [PATCH] Speed up libm on MIPS
Date: Fri, 20 Sep 2013 17:06:00 -0000	[thread overview]
Message-ID: <523C80A9.6070700@redhat.com> (raw)
In-Reply-To: <1379695885.5770.463.camel@ubuntu-sellcey>

On 09/20/2013 12:51 PM, Steve Ellcey wrote:
> On Thu, 2013-09-19 at 23:32 -0400, Carlos O'Donell wrote:
> 
>>> +
>>> +  /* Set rounding bits.  */
>>> +  cw &= ~0x3;
>>
>> What's the magic ~0x3? Should it be a new macro?
> 
> 0x3 is a mask to access the two bits in the FPU control register that
> define the rounding mode.  It probably should be a macro and it seems
> like it should go into fpu_control.h where it could be used by the
> 'real' fegetround and fesetround as well these new routines.  What do
> you think of this patch as a precursor to my original patch so that I
> can change all the code to use _FPU_RC_MASK instead of 0x3?

Perfect. Exactly the kind of thing that makes it easier to read,
understand, and maintain this code.
 
> Steve Ellcey
> sellcey@mips.com
> 
> 
> 
> 2013-09-19  Steve Ellcey  <sellcey@mips.com>
> 
> 	* sysdeps/mips/fpu_control.h (_FPU_RC_MASK): New.
> 	* sysdeps/mips/fpu/fegetround.c (fegetround): Use _FPU_RC_MASK.
> 	* sysdeps/mips/fpu/fesetround.c (fesetround): Use _FPU_RC_MASK.

Looks good to me. You should just check this in as an obvious cleanup.

Cheers,
Carlos.

  reply	other threads:[~2013-09-20 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 22:58 Steve Ellcey
2013-09-20  3:32 ` Carlos O'Donell
2013-09-20 16:51   ` Steve Ellcey
2013-09-20 17:06     ` Carlos O'Donell [this message]
2013-09-21 18:47       ` Maciej W. Rozycki
2013-09-22 17:40         ` Carlos O'Donell
2013-09-23 16:42           ` Steve Ellcey
2013-09-20 15:01 ` Richard Henderson
2013-09-20 15:35 ` Joseph S. Myers

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=523C80A9.6070700@redhat.com \
    --to=carlos@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    --cc=sellcey@mips.com \
    /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).