From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=59493 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PpibB-0005Zf-VY for qemu-devel@nongnu.org; Wed, 16 Feb 2011 09:43:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PpibA-0000O2-7T for qemu-devel@nongnu.org; Wed, 16 Feb 2011 09:43:21 -0500 Received: from mail-bw0-f45.google.com ([209.85.214.45]:43810) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PpibA-0000Nj-06 for qemu-devel@nongnu.org; Wed, 16 Feb 2011 09:43:20 -0500 Received: by bwz16 with SMTP id 16so1546600bwz.4 for ; Wed, 16 Feb 2011 06:43:18 -0800 (PST) Date: Wed, 16 Feb 2011 15:43:13 +0100 From: "Edgar E. Iglesias" Message-ID: <20110216144313.GA8694@edde.se.axis.com> References: <1297159190-29092-1-git-send-email-gingold@adacore.com> <331CBE8E-7699-4AB1-B2F7-A76ACEA247D3@adacore.com> <4D59132D.7080205@suse.de> <20110215083954.GA34339@ulanbator.act-europe.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110215083954.GA34339@ulanbator.act-europe.fr> Subject: [Qemu-devel] Re: [PATCHv2] 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: Tristan Gingold Cc: Alexander Graf , Aurelien Jarno , "qemu-devel@nongnu.org Developers" On Tue, Feb 15, 2011 at 09:39:54AM +0100, Tristan Gingold wrote: > Handle option '-icount X' on powerpc targets. I've applied this one, thanks. > > Signed-off-by: Tristan Gingold > --- > target-ppc/translate_init.c | 42 ++++++++++++++++++++++++++++++++++++++++++ > 1 files changed, 42 insertions(+), 0 deletions(-) > > diff --git a/target-ppc/translate_init.c b/target-ppc/translate_init.c > index 907535e..27aff74 100644 > --- a/target-ppc/translate_init.c > +++ b/target-ppc/translate_init.c > @@ -154,12 +154,26 @@ 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 +181,26 @@ 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 +218,26 @@ 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 >