On Tue, Apr 12, 2011 at 11:59:29PM +0200, Aurelien Jarno wrote: > Given that float32_*() functions are IEEE754 compliant, the efscmp*() > functions are correctly implemented, while efstst*() are not. This > patch reverse the implementation of this two groups of functions and > fix the comments. It also use float32_eq() instead of float32_eq_quiet() > as qNaNs should not be ignored.
Thanks for addressing this; the E500 emulation in QEMU is more like how we wish the hardware acted, rather than how it actually acts. :) It's late here, but I think this change: > -static inline uint32_t efscmplt(uint32_t op1, uint32_t op2) > +static inline uint32_t efststlt(uint32_t op1, uint32_t op2) > { > - /* XXX: TODO: test special values (NaN, infinites, ...) */ > + /* XXX: TODO: ignore special values (NaN, infinites, ...) */ > return efststlt(op1, op2); > } is not correct, as you've just turned this into an infinite (inlined!) loop. You'd want to change the efststlt call into an efscmplt call. Similarly for efstst{gt,eq}. -Nathan