qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] arm/translate.c: Fix adc_CC/sbc_CC implementati


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH] arm/translate.c: Fix adc_CC/sbc_CC implementation
Date: Mon, 25 Feb 2013 09:44:10 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130110 Thunderbird/17.0.2

On 02/25/2013 09:15 AM, Laurent Desnogues wrote:
> Looking at the new sbc_cc, it seems that if t0=t1 and CF=1,
> then CF will be cleared while the old code in the helper did
> set it.

Sigh, yes I see it.  While the transform

        x + ~y + cf
->
        x - y + cf - 1

works for the low 32-bits, it gets the carry wrong:

        x - x + (1-1) = 0
whereas
        x + ~x + 1 = 0xffffffff + 1 = 0x1_00000000

I need to just do exactly what the spec says, not "optimize" it.


r~



reply via email to

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