This is the mail archive of the
mailing list for the glibc project.
RE: [PATCH 4/5] ARM: Cleanup fenv implementation
- From: "Wilco" <wdijkstr at arm dot com>
- To: "'Joseph Myers'" <joseph at codesourcery dot com>
- Cc: "GNU C Library" <libc-alpha at sourceware dot org>
- Date: Wed, 11 Jun 2014 14:27:18 +0100
- Subject: RE: [PATCH 4/5] ARM: Cleanup fenv implementation
- Authentication-results: sourceware.org; auth=none
- References: <003a01cf84cd$71cc24c0$55646e40$ at com> <Pine dot LNX dot 4 dot 64 dot 1406101724030 dot 8581 at digraph dot polyomino dot org dot uk>
> On Tue, 10 Jun 2014, Wilco wrote:
> > This is a series of patches which improves the ARM fenv implementation.
> > Improve rounding mode check in libc_fesetround_vfp and
> > libc_feholdsetround_vfp so it ignores out of range values.
> I don't see this as an improvement. Invalid rounding modes should never
> get here, and it's confusing to change a variable called "round" to
> something other than the rounding mode.
It's not only safer (for the unlikely case where you pass an incorrect
rounding mode) but also faster as it saves an instruction and enables the use
of CBZ. Note the AAarch64 version is exactly the same.
Maybe naming it "round_adjust" or "round_diff" would make it clearer?