qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] target/ppc: Fix 64-bit decrementer


From: Richard Henderson
Subject: Re: [PATCH v2] target/ppc: Fix 64-bit decrementer
Date: Tue, 14 Sep 2021 07:41:04 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0

On 9/14/21 6:43 AM, Cédric Le Goater wrote:
and then another sign calculation on a target_ulong

        ...
        && !(decr & (1ULL << (nr_bits - 1))))) {

I was wondering if that was supposed to be an unsigned test for a "small" value (i.e. decr < MAKE_64BIT_MASK(0, nr_bits)? Certainly decr should never be negative, since the decrementer never increments, and I can't figure out what it's supposed to mean otherwise.


We should introduce intermediate 'int64_t' variables to extract the
sign values from the target_ulong. That would be cleaner.

Yes it would.  The underflow test becomes easier for certain.

r~



reply via email to

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