This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
RE: [PATCH] Add generic HAVE_RM_CTX implementation
- From: "Wilco" <wdijkstr at arm dot com>
- To: "'Siddhesh Poyarekar'" <siddhesh at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>, "'Marcus Shawcroft'" <marcus dot shawcroft at gmail dot com>
- Date: Mon, 12 May 2014 13:02:52 +0100
- Subject: RE: [PATCH] Add generic HAVE_RM_CTX implementation
- Authentication-results: sourceware.org; auth=none
- References: <000101cf58af$83900a90$8ab01fb0$ at com> <20140430113915 dot GZ10922 at spoyarek dot pnq dot redhat dot com> <000601cf6479$a0d81590$e28840b0$ at com> <20140512060235 dot GD1224 at spoyarek dot pnq dot redhat dot com>
> Siddhesh Poyarekar wrote:
> On Wed, Apr 30, 2014 at 02:39:36PM +0100, Wilco wrote:
> > Would anyone mind a huge speedup?
>
> They wouldn't, but I haven't done an exhaustive code check across
> architectures (or testing for that matter) to confidently assert that
> the change would definitely be welcome by all. That is why I asked
> for another opinion from another maintainer on this.
Marcus (AArch64) already reviewed it.
> > Basically I see this as a first step towards cleaning up
> > math_private.h and the way math functions use fenv. Ideally the
> > default implementation should be efficient across all targets, and
> > it looks like this is easy to achieve.
>
> Agreed and if you can get another maintainer to agree, then I think
> this patch is good to go with the changes I suggested earlier.
As for your other comment:
> Shouldn't this be __fegetenv and __fesetround? We shouldn't need to
> go through the extra dereference since these functions are
> internal-only. Likewise for all uses below.
I agree we should avoid PLTs for internal calls. However I'm certain
most targets wouldn't build if I used __fegetenv etc. libm_hidden_ver
is used inconsistently, so this is yet another area that needs a cleanup.
Solving that wasn't the purpose of my patch - in fact it is consistent
with the rest of math_private.h.
Btw can we agree on what the rules are? Eg.
* Every exported symbol should have a libm_hidden_ver.
* All internal calls must use the hidden symbol.
I'll improve the formatting of SET_RESTORE_ROUND_NOEX*.
Cheers,
Wilco