qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 01/22] target/i386: optimize computation of JL and JLE from f


From: Richard Henderson
Subject: Re: [PATCH 01/22] target/i386: optimize computation of JL and JLE from flags
Date: Fri, 29 Dec 2023 07:53:03 +1100
User-agent: Mozilla Thunderbird

On 12/23/23 05:15, Paolo Bonzini wrote:
Take advantage of the fact that there can be no 1 bits between SF and OF.
If they were adjacent, you could sum SF and get a carry only if SF was
already set.  Then the value of OF in the sum is the XOR of OF itself,
the carry (which is SF) and 0 (the value of the OF bit in the addend):
this is OF^SF exactly.

Because OF and SF are not adjacent, just place more 1 bits to the
left so that the carry propagates, which means summing CC_O - CC_S.

Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
---
  target/i386/tcg/translate.c | 10 ++++------
  1 file changed, 4 insertions(+), 6 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]