Received: from [140.186.70.92] (port=34668 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PovM0-0007r1-Ev for qemu-devel@nongnu.org; Mon, 14 Feb 2011 05:08:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PovLz-0004Vu-4s for qemu-devel@nongnu.org; Mon, 14 Feb 2011 05:08:24 -0500 Received: from mel.act-europe.fr ([194.98.77.210]:54044) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PovLy-0004S9-QH for qemu-devel@nongnu.org; Mon, 14 Feb 2011 05:08:23 -0500 Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Tristan Gingold In-Reply-To: <1297159190-29092-1-git-send-email-gingold@adacore.com> Date: Mon, 14 Feb 2011 11:07:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <331CBE8E-7699-4AB1-B2F7-A76ACEA247D3@adacore.com> References: <1297159190-29092-1-git-send-email-gingold@adacore.com> Subject: [Qemu-devel] Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store. List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "qemu-devel@nongnu.org Developers" Cc: Alexander Graf , Aurelien Jarno Potential reviewers CC: On Feb 8, 2011, at 10:59 AM, Tristan Gingold wrote: > Handle option '-icount X' on powerpc targets. >=20 > Signed-off-by: Tristan Gingold > --- > target-ppc/translate_init.c | 36 = ++++++++++++++++++++++++++++++++++++ > 1 files changed, 36 insertions(+), 0 deletions(-) >=20 > 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); > + } > } >=20 > 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 >=20 > @@ -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); > + } > } >=20 > 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); > + } > } >=20 > __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); > + } > } >=20 > 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); > + } > } >=20 > __attribute__ (( unused )) > --=20 > 1.7.3.GIT >=20 >=20