qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Ulrich Hecht <uli@suse.de>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Qemu arm emulation
Date: Sat, 5 Feb 2005 13:45:11 +0100	[thread overview]
Message-ID: <200502051345.11450.uli@suse.de> (raw)
In-Reply-To: <200502041419.24446.paul@codesourcery.com>

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

Hi!

On Friday 04 February 2005 15:19, Paul Brook wrote:
> On Friday 04 February 2005 12:30, Ulrich Hecht wrote:
> > +void OPPROTO op_movl_T1_im_cc(void)
> > +{
> > +    T1 = PARAM1;
> > +    env->CF = PARAM1 >> 31;
> > +}
>
> This should be "((uint32_t) PARAM1) >> 31".
> The comments say CF is 0 or 1. PARAM1 is signed, so your code will
> result in 0 or -1 on 32-bit hosts.
>
> >              /* XXX: is CF modified ? */
>
> Probably want to remove this comment now.

OK.

CU
Uli

[-- Attachment #2: qemu-shifter_carry.patch --]
[-- Type: text/x-diff, Size: 1241 bytes --]

Index: target-arm/op.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/op.c,v
retrieving revision 1.7
diff -u -r1.7 op.c
--- target-arm/op.c	2 Feb 2005 20:43:01 -0000	1.7
+++ target-arm/op.c	4 Feb 2005 14:24:39 -0000
@@ -105,6 +105,12 @@
     T1 = PARAM1;
 }
 
+void OPPROTO op_movl_T1_im_cc(void)
+{
+    T1 = PARAM1;
+    env->CF = ((uint32_t)PARAM1) >> 31;
+}
+
 void OPPROTO op_movl_T2_im(void)
 {
     T2 = PARAM1;
Index: target-arm/translate.c
===================================================================
RCS file: /cvsroot/qemu/qemu/target-arm/translate.c,v
retrieving revision 1.15
diff -u -r1.15 translate.c
--- target-arm/translate.c	31 Jan 2005 20:43:28 -0000	1.15
+++ target-arm/translate.c	4 Feb 2005 14:24:39 -0000
@@ -535,8 +535,10 @@
             shift = ((insn >> 8) & 0xf) * 2;
             if (shift)
                 val = (val >> shift) | (val << (32 - shift));
-            gen_op_movl_T1_im(val);
-            /* XXX: is CF modified ? */
+            if (logic_cc && shift)
+              gen_op_movl_T1_im_cc(val);
+            else
+              gen_op_movl_T1_im(val);
         } else {
             /* register */
             rm = (insn) & 0xf;

  reply	other threads:[~2005-02-05 13:27 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-03 21:07 [Qemu-devel] Qemu arm emulation Charlie Baylis
2004-12-03 21:13 ` Paul Brook
2004-12-08 22:33   ` Fabrice Bellard
2004-12-08 22:48     ` Paul Brook
2005-02-04 12:30 ` Ulrich Hecht
2005-02-04 14:19   ` Paul Brook
2005-02-05 12:45     ` Ulrich Hecht [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-11-30 19:48 [Qemu-devel] qemu & " Philippe BEAU

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=200502051345.11450.uli@suse.de \
    --to=uli@suse.de \
    --cc=paul@codesourcery.com \
    --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).