This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: [PATCH 4/5] ARM: Cleanup fenv implementation


Joseph wrote:
> 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?

Wilco







Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]