From: Liu Ping Fan <qemulist@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 2/2] ppc: tcg: implement helper_nap
Date: Mon, 6 Jan 2014 08:56:31 +0800 [thread overview]
Message-ID: <1388969791-4752-2-git-send-email-pingfank@linux.vnet.ibm.com> (raw)
In-Reply-To: <1388969791-4752-1-git-send-email-pingfank@linux.vnet.ibm.com>
When nap, clear no persistent register as ISA spec says.
Signed-off-by: Liu Ping Fan <pingfank@linux.vnet.ibm.com>
---
target-ppc/excp_helper.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/target-ppc/excp_helper.c b/target-ppc/excp_helper.c
index a9712bc..5dbb166 100644
--- a/target-ppc/excp_helper.c
+++ b/target-ppc/excp_helper.c
@@ -892,6 +892,20 @@ void helper_hrfid(CPUPPCState *env)
void helper_nap(CPUPPCState *env)
{
+ int i;
+ for (i = 0; i < 32; i++) {
+ env->gpr[i] = 0;
+ }
+ env->lr = 0;
+ env->ctr = 0;
+ for (i = 0; i < 8; i++) {
+ env->crf[i] = 0;
+ }
+ env->msr = 0;
+ for (i = 0; i < 32; i++) {
+ env->fpr[i] = 0;
+ }
+
}
#endif
--
1.8.1.4
prev parent reply other threads:[~2014-01-06 0:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-01-06 0:56 [Qemu-devel] [PATCH 1/2] ppc: tcg: add nap insn support Liu Ping Fan
2014-01-06 0:56 ` Liu Ping Fan [this message]
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=1388969791-4752-2-git-send-email-pingfank@linux.vnet.ibm.com \
--to=qemulist@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).