On 16.02.2011 12:53, Peter Maydell wrote: > On 14 February 2011 16:47, Christophe Lyon <christophe.l...@st.com> wrote: >> >> These two special values are needed to implement some helper functions, >> which return these values in some cases. > > I assume this is for vrecpe, right? I think it would be better > to post this as part of that patchset; it's easier to see the > rationale for adding the functions when you also have the > code that's using them.
Indeed. I'll post the bigger patch. >> >> /*---------------------------------------------------------------------------- >> +| Returns the default NaN. >> +*----------------------------------------------------------------------------*/ >> + >> +float32 float32_nan(void) >> +{ >> + return float32_default_nan; >> +} > > Maybe we should just expose float32_default_nan in > softfloat.h somehow; that would match float32_zero, > float32_one, etc (ie it would not be a function). > It was my initial intention, but it implies adding a #if defined(TARGET_XXX) block in softfloat.h, and I feared this was not desirable. Thanks.