qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Laurent Desnogues" <laurent.desnogues@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH][ARM] Fix wrong destination register for smuad, smusd, smlad, smlsd
Date: Wed, 25 Jun 2008 17:25:50 +0200	[thread overview]
Message-ID: <761ea48b0806250825m3e09a152t79b3edf40b040afc@mail.gmail.com> (raw)
In-Reply-To: <761ea48b0806230240h31745caaj24e9c6f9ce80eea2@mail.gmail.com>

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

2008/6/23 Laurent Desnogues <laurent.desnogues@gmail.com>:
> smuad, smusd, smlad, smlsd write the wrong register, resulting in
> PC corruption.

Here is a better patch.

I will stop posting patches as I have the feeling the maintainer
doesn't care.  He might be rewriting everything and so my
patches are useless and a waste of time for everyone :-)

Laurent

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: arm-smuad-2.patch --]
[-- Type: text/x-patch; name=arm-smuad-2.patch, Size: 887 bytes --]

--- svn-ref/target-arm/translate.c	2008-06-09 08:52:48.000000000 +0200
+++ svn/target-arm/translate.c	2008-06-25 17:20:54.000000000 +0200
@@ -6502,13 +6502,13 @@
                             gen_storeq_reg(s, rn, rd, tmp2);
                         } else {
                             /* smuad, smusd, smlad, smlsd */
-                            if (rn != 15)
+                            if (rd != 15)
                               {
-                                tmp2 = load_reg(s, rn);
+                                tmp2 = load_reg(s, rd);
                                 gen_helper_add_setq(tmp, tmp, tmp2);
                                 dead_tmp(tmp2);
                               }
-                            store_reg(s, rd, tmp);
+                            store_reg(s, rn, tmp);
                         }
                     }
                     break;

  reply	other threads:[~2008-06-25 15:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-23  9:40 [Qemu-devel] [PATCH][ARM] Fix wrong destination register for smuad, smusd, smlad, smlsd Laurent Desnogues
2008-06-25 15:25 ` Laurent Desnogues [this message]
2008-06-25 16:58   ` [Qemu-devel] " Paul Brook
2008-06-25 17:15     ` Laurent Desnogues
2008-06-25 17:27       ` Paul Brook
2008-06-25 19:00         ` Laurent Desnogues
2008-06-25 19:11         ` Vincent Palatin

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=761ea48b0806250825m3e09a152t79b3edf40b040afc@mail.gmail.com \
    --to=laurent.desnogues@gmail.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).