All of lore.kernel.org
 help / color / mirror / Atom feed
From: Aurelien Jarno <aurelien@aurel32.net>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0
Date: Mon, 02 Apr 2007 12:04:17 +0200	[thread overview]
Message-ID: <4610D521.7060704@aurel32.net> (raw)
In-Reply-To: <1171210865.20672.12.camel@localhost>

Matthew Howkins a écrit :
> There is a bug in the ARM emulation of data-processing instructions with
> ASR <reg> when the shift==0. The current QEMU CVS incorrectly modifies
> the C-flag, when it should be preserved.
> 
> The attached patch corrects this.
> 

This patch is consistent with the reference manual, I think it should be
applied. Has it been lost?

> ------------------------------------------------------------------------
> 
> Index: target-arm/op.c
> ===================================================================
> RCS file: /sources/qemu/qemu/target-arm/op.c,v
> retrieving revision 1.21
> diff -u -r1.21 op.c
> --- target-arm/op.c	26 Jun 2006 19:55:19 -0000	1.21
> +++ target-arm/op.c	11 Feb 2007 16:08:22 -0000
> @@ -667,7 +667,7 @@
>      if (shift >= 32) {
>          env->CF = (T1 >> 31) & 1;
>          T1 = (int32_t)T1 >> 31;
> -    } else {
> +    } else if (shift != 0) {
>          env->CF = (T1 >> (shift - 1)) & 1;
>          T1 = (int32_t)T1 >> shift;
>      }
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel


-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net

  reply	other threads:[~2007-04-02 10:07 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11 16:21 [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0 Matthew Howkins
2007-04-02 10:04 ` Aurelien Jarno [this message]
2007-05-19 21:55   ` Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4610D521.7060704@aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.