qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] Arm sbcs bugfix
@ 2005-02-02 15:41 Paul Brook
  0 siblings, 0 replies; only message in thread
From: Paul Brook @ 2005-02-02 15:41 UTC (permalink / raw)
  To: qemu-devel

[-- 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;                              \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-02 15:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-02 15:41 [Qemu-devel] Arm sbcs bugfix Paul Brook

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).