qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Sebastian Huber <sebastian.huber@embedded-brains.de>
To: qemu-devel@nongnu.org
Cc: Peter Meydell <peter.maydell@linaro.org>,
	Fabien Chouteau <chouteau@adacore.com>,
	Sebastian Huber <sebastian.huber@embedded-brains.de>
Subject: [Qemu-devel] [PATCH v2] SPARC: Fix LEON3 power down instruction
Date: Wed, 27 Nov 2013 08:50:11 +0100	[thread overview]
Message-ID: <1385538611-8149-1-git-send-email-sebastian.huber@embedded-brains.de> (raw)
In-Reply-To: <CAFEAcA8DyS8ftustsMmQWGxmhMUNujVN25m+5d6XCPxQVj3d0A@mail.gmail.com>

Synchronize the program counter before the power down helper call
otherwise interrupts will return to the wrong context.

Signed-off-by: Sebastian Huber <sebastian.huber@embedded-brains.de>
---
 target-sparc/translate.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/target-sparc/translate.c b/target-sparc/translate.c
index 05639ef..7481c85 100644
--- a/target-sparc/translate.c
+++ b/target-sparc/translate.c
@@ -3630,6 +3630,7 @@ static void disas_sparc_insn(DisasContext * dc, unsigned int insn)
                                 if ((rd == 0x13) && (dc->def->features &
                                                      CPU_FEATURE_POWERDOWN)) {
                                     /* LEON3 power-down */
+                                    save_state(dc);
                                     gen_helper_power_down(cpu_env);
                                 }
                                 break;
-- 
1.7.7

  reply	other threads:[~2013-11-27  7:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-25 14:22 [Qemu-devel] [PATCH] SPARC: Fix LEON3 power down instruction Sebastian Huber
2013-11-26 11:24 ` Fabien Chouteau
2013-11-26 21:02 ` Peter Maydell
2013-11-27  7:50   ` Sebastian Huber [this message]
2013-12-06 17:48     ` [Qemu-devel] [PATCH v2] " Richard Henderson
2014-01-07 18:07       ` Sebastian Huber
2014-01-14  7:04         ` Sebastian Huber
2014-01-15  5:47           ` Edgar E. Iglesias

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=1385538611-8149-1-git-send-email-sebastian.huber@embedded-brains.de \
    --to=sebastian.huber@embedded-brains.de \
    --cc=chouteau@adacore.com \
    --cc=peter.maydell@linaro.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).