[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] SPARC target : Fix carry flag update inaddxcc a
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] SPARC target : Fix carry flag update inaddxcc and subxc |
Date: |
Mon, 10 Apr 2006 19:13:54 +0100 |
User-agent: |
KMail/1.9.1 |
On Monday 10 April 2006 19:04, Blue Swirl wrote:
> >Doesn't this condition in addx and the corresponding line in subx need
> >similar
> >treatment?
>
> They don't change the flags.
It certainly look like they do.
In particular if TARGET_SPARC64 we have
if ((T0 & 0xffffffff) < (src1 & 0xffffffff))
env->psr |= PSR_CARRY;
But if !TARGET_SPARC64 we have
- if (T0 < src1)
+ if (T0 < src1 || (has_carry && T0 <= src1))
env->psr |= PSR_CARRY;
I'd expect these two to be the same (modulo the explicit truncation in the
first case).
Paul