On 30 January 2017 at 18:16, Laurent Vivier <laur...@vivier.eu> wrote: > Signed-off-by: Laurent Vivier <laur...@vivier.eu> > +#elif defined(TARGET_M68K) > +static int pickNaN(flag aIsQNaN, flag aIsSNaN, flag bIsQNaN, flag bIsSNaN, > + flag aIsLargerSignificand) > +{ > + /* If either operand, but not both operands, of an operation is a > + * nonsignaling NAN, then that NAN is returned as the result. If both > + * operands are nonsignaling NANs, then the destination operand > + * nonsignaling NAN is returned as the result. > + */ > + > + if (aIsSNaN) { > + return 0; > + } else if (bIsSNaN) { > + return 1; > + } else if (bIsQNaN) { > + return 1; > + } else { > + return 0; > + } > +}
This function doesn't seem to quite do what the comment says (in particular the comment doesn't say anything about handling of signaling NaNs but the code makes decisions based on which inputs are signaling). PS: NaN is conventionally capitalized with a lowercase 'a'. thanks -- PMM