All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Howkins <matthew@howkins.me.uk>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0
Date: Sun, 11 Feb 2007 16:21:05 +0000	[thread overview]
Message-ID: <1171210865.20672.12.camel@localhost> (raw)

[-- Attachment #1: Type: text/plain, Size: 231 bytes --]

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.

Matthew



[-- Attachment #2: qemu_arm_asr_reg.patch --]
[-- Type: text/x-patch, Size: 525 bytes --]

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;
     }

             reply	other threads:[~2007-02-11 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-11 16:21 Matthew Howkins [this message]
2007-04-02 10:04 ` [Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR <reg> when shift==0 Aurelien Jarno
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=1171210865.20672.12.camel@localhost \
    --to=matthew@howkins.me.uk \
    --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.