On 24 October 2013 17:17, Tom Musta <tommu...@gmail.com> wrote: > This patch adds routines to the softfloat library that are useful for > the PowerPC VSX implementation. The routines are, however, not specific > to PowerPC and are approprriate for softfloat. > > The following routines are added: > > - float32_is_denormal() returns true if the 32-bit floating point number > is denormalized. > - float64_is_denormal() returns true if the 64-bit floating point number > is denormalized.
Can you point me at the patches which use these, please? I couldn't find them with a quick search in my email client. > - float32_get_unbiased_exp() returns the unbiased exponent of a 32-bit > floating point number. > - float64_get_unbiased_exp() returns the unbiased exponent of a 64-bit > floating point number. These look rather odd to me, and again I can't find the uses in your patchset. Returning just the exponent is a bit odd and suggests that maybe the split between target code and softfloat is in the wrong place. > - float32_to_uint64() converts a 32-bit floating point number to an > unsigned 64 bit number. I would put this in its own patch, personally. > > +INLINE int float32_is_denormal(float32 a) > +{ > + return ((float32_val(a) & 0x7f800000) == 0) && > + ((float32_val(a) & 0x007fffff) != 0); > +} return float32_is_zero_or_denormal(a) && !float32_is_zero(a); is easier to review and less duplicative of code. thanks -- PMM