From: Tristan Gingold <gingold@adacore.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
Date: Tue, 8 Feb 2011 10:59:50 +0100 [thread overview]
Message-ID: <1297159190-29092-1-git-send-email-gingold@adacore.com> (raw)
Handle option '-icount X' on powerpc targets.
Signed-off-by: Tristan Gingold <gingold@adacore.com>
---
target-ppc/translate_init.c | 36 ++++++++++++++++++++++++++++++++++++
1 files changed, 36 insertions(+), 0 deletions(-)
diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c
index 907535e..7ef86ad 100644
--- a/target-ppc/translate_init.c
+++ b/target-ppc/translate_init.c
@@ -154,12 +154,24 @@ static void spr_read_ureg (void *opaque, int gprn, int sprn)
#if !defined(CONFIG_USER_ONLY)
static void spr_read_decr (void *opaque, int gprn, int sprn)
{
+ if (use_icount)
+ gen_io_start();
gen_helper_load_decr(cpu_gpr[gprn]);
+ if (use_icount) {
+ gen_io_end();
+ gen_stop_exception(opaque);
+ }
}
static void spr_write_decr (void *opaque, int sprn, int gprn)
{
+ if (use_icount)
+ gen_io_start();
gen_helper_store_decr(cpu_gpr[gprn]);
+ if (use_icount) {
+ gen_io_end();
+ gen_stop_exception(opaque);
+ }
}
#endif
@@ -167,12 +179,24 @@ static void spr_write_decr (void *opaque, int sprn, int gprn)
/* Time base */
static void spr_read_tbl (void *opaque, int gprn, int sprn)
{
+ if (use_icount)
+ gen_io_start();
gen_helper_load_tbl(cpu_gpr[gprn]);
+ if (use_icount) {
+ gen_io_end();
+ gen_stop_exception(opaque);
+ }
}
static void spr_read_tbu (void *opaque, int gprn, int sprn)
{
+ if (use_icount)
+ gen_io_start();
gen_helper_load_tbu(cpu_gpr[gprn]);
+ if (use_icount) {
+ gen_io_end();
+ gen_stop_exception(opaque);
+ }
}
__attribute__ (( unused ))
@@ -190,12 +214,24 @@ static void spr_read_atbu (void *opaque, int gprn, int sprn)
#if !defined(CONFIG_USER_ONLY)
static void spr_write_tbl (void *opaque, int sprn, int gprn)
{
+ if (use_icount)
+ gen_io_start();
gen_helper_store_tbl(cpu_gpr[gprn]);
+ if (use_icount) {
+ gen_io_end();
+ gen_stop_exception(opaque);
+ }
}
static void spr_write_tbu (void *opaque, int sprn, int gprn)
{
+ if (use_icount)
+ gen_io_start();
gen_helper_store_tbu(cpu_gpr[gprn]);
+ if (use_icount) {
+ gen_io_end();
+ gen_stop_exception(opaque);
+ }
}
__attribute__ (( unused ))
--
1.7.3.GIT
next reply other threads:[~2011-02-08 9:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-08 9:59 Tristan Gingold [this message]
2011-02-14 10:07 ` [Qemu-devel] Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store Tristan Gingold
2011-02-14 11:34 ` [Qemu-devel] " Alexander Graf
2011-02-14 11:46 ` Edgar E. Iglesias
2011-02-14 11:55 ` Tristan Gingold
2011-02-15 8:39 ` [Qemu-devel] [PATCHv2] " Tristan Gingold
2011-02-16 14:43 ` [Qemu-devel] " 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=1297159190-29092-1-git-send-email-gingold@adacore.com \
--to=gingold@adacore.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).