|
From: | Richard Henderson |
Subject: | Re: [PATCH 2/4] target/m68k: pass sign directly into make_quotient() |
Date: | Mon, 2 Jan 2023 09:35:36 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 |
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 4Or 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~
[Prev in Thread] | Current Thread | [Next in Thread] |