qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@nowt.org>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Arm sbcs bugfix
Date: Wed, 2 Feb 2005 15:41:26 +0000	[thread overview]
Message-ID: <200502021541.26579.paul@nowt.org> (raw)

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

The logic for setting CF in the arm sbcs instruction was wrong. The attached 
patch fixes it. Found while testing some soft-float code.

Paul

[-- Attachment #2: patch.qemu_sbcs --]
[-- Type: text/x-diff, Size: 956 bytes --]

Index: target-arm/op.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/op.c,v
retrieving revision 1.6
diff -u -p -r1.6 op.c
--- target-arm/op.c	31 Jan 2005 20:43:28 -0000	1.6
+++ target-arm/op.c	2 Feb 2005 15:25:49 -0000
@@ -190,10 +190,10 @@ void OPPROTO op_ ## sbc ## l_T0_T1_cc(vo
     src1 = T0;                                  \
     if (!env->CF) {                             \
         T0 = T0 - T1 - 1;                       \
-        env->CF = src1 >= T1;                   \
+        env->CF = src1 > T1;                    \
     } else {                                    \
         T0 = T0 - T1;                           \
-        env->CF = src1 > T1;                    \
+        env->CF = src1 >= T1;                   \
     }                                           \
     env->VF = (src1 ^ T1) & (src1 ^ T0);        \
     env->NZF = T0;                              \

                 reply	other threads:[~2005-02-02 15:56 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200502021541.26579.paul@nowt.org \
    --to=paul@nowt.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).