On 1/2/23 02:10, Mark Cave-Ayland wrote:
I think you need an "abs(floatx80_to_int32())" in both cases as you do in PATCH 
4

Or in fact

     sign = extractFloatx80Sign(res);
     quot = floatx80_to_int32(floatx80_abs(res->d), status);
     make_quotient(env, sign, quot);

Thanks for the suggestion. Just out of curiosity, how does moving the abs to before the integer conversion make a difference here? Is it because floatx80_to_int32() can fail in some circumstances because of the sign of the result?

It's a simple and operation on floats, instead of cmp+cmov on integers.

I think it's a touch clearer as well, having just saved the fp sign, you discard it before moving on to the next thing.


r~

Reply via email to