This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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, LIBGCC] Avoid count_leading_zeros with undefined result (PR 78067)


On Thu, 10 Nov 2016, James Greenhalgh wrote:

> 
> On Wed, Nov 09, 2016 at 10:16:35PM +0000, Joseph Myers wrote:
> > On Wed, 9 Nov 2016, Bernd Edlinger wrote:
> >
> > > Yes, but maybe introduce a test if the half-wide value fits?
> > >
> > > like:
> > >
> > > #define M_OK2(M, T) ((M) > sizeof(T) * CHAR_BIT / 2 - 1)
> >
> > Something like that.
> 
> In patch form, that would look like this...
> 
> I've checked on my ARM and AArch64 trees with _Float16 support that this
> lets the tests pass.
> 
> OK?

OK.

-- 
Joseph S. Myers
joseph@codesourcery.com


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