On 17 December 2013 17:45, Peter Maydell <peter.mayd...@linaro.org> wrote: > I'm partway through fixing this bug in an implementation of > float*_to_uint16 which the ARM AArch64 needs. I think the > cleanest approach to this looks like this: > > uint32 float64_to_uint32( float64 a STATUS_PARAM ) > { > int64_t v; > uint32 res; > int old_exc_flags = get_float_exception_flags(status); > > v = float64_to_uint64(a STATUS_VAR); > if (v > 0xffffffff) { > res = 0xffffffff; > } else { > return v; > } > set_float_exception_flags(old_exc_flags);
...should be set_float_exception_flags(old_exc_flags, status); > float_raise(float_flag_invalid STATUS_VAR); > return res; > } thanks -- PMM