Richard Henderson <richard.hender...@linaro.org> writes:
> Shuffle the fraction to the end, otherwise sort by size. > Add frac_hi and frac_lo members to alias frac. > > Signed-off-by: Richard Henderson <richard.hender...@linaro.org> > --- > fpu/softfloat.c | 13 +++++++++++-- > 1 file changed, 11 insertions(+), 2 deletions(-) > > diff --git a/fpu/softfloat.c b/fpu/softfloat.c > index 2123453d40..2d6f61ee7a 100644 > --- a/fpu/softfloat.c > +++ b/fpu/softfloat.c > @@ -511,10 +511,19 @@ static inline __attribute__((unused)) bool > is_qnan(FloatClass c) > */ > > typedef struct { > - uint64_t frac; > - int32_t exp; > FloatClass cls; > bool sign; > + int32_t exp; > + union { > + /* Routines that know the structure may reference the singular name. > */ > + uint64_t frac; > + /* > + * Routines expanded with multiple structures reference "hi" and > "lo". > + * In this structure, the one word is both highest and lowest. > + */ > + uint64_t frac_hi; > + uint64_t frac_lo; This confuses me. Is this because it could be frac_hi or frac_lo at the "top" of the structure because of endian issues? > + }; > } FloatParts64; > > #define DECOMPOSED_BINARY_POINT 63 -- Alex Bennée