qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
@ 2011-02-08  9:59 Tristan Gingold
  2011-02-14 10:07 ` [Qemu-devel] Ping: " Tristan Gingold
  0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2011-02-08  9:59 UTC (permalink / raw)
  To: qemu-devel

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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
  2011-02-08  9:59 [Qemu-devel] [PATCH] Handle icount for powerpc tbl/tbu/decr load and store Tristan Gingold
@ 2011-02-14 10:07 ` Tristan Gingold
  2011-02-14 11:34   ` [Qemu-devel] " Alexander Graf
  0 siblings, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2011-02-14 10:07 UTC (permalink / raw)
  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.
> 
> 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
> 
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] Re: Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
  2011-02-14 10:07 ` [Qemu-devel] Ping: " Tristan Gingold
@ 2011-02-14 11:34   ` Alexander Graf
  2011-02-14 11:46     ` Edgar E. Iglesias
  2011-02-15  8:39     ` [Qemu-devel] [PATCHv2] " Tristan Gingold
  0 siblings, 2 replies; 7+ messages in thread
From: Alexander Graf @ 2011-02-14 11:34 UTC (permalink / raw)
  To: Tristan Gingold
  Cc: Edgar E. Iglesias, qemu-devel@nongnu.org Developers,
	Aurelien Jarno

Tristan Gingold wrote:
> Potential reviewers CC:
>
> On Feb 8, 2011, at 10:59 AM, Tristan Gingold wrote:
>
>   
>> Handle option '-icount X' on powerpc targets.
>>
>> Signed-off-by: Tristan Gingold <gingold@adacore.com>
>>     

Braces are broken. Edgar knows his way around icount a lot better than
me - I've never actually used it. Edgar, any comments?


Alex

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] Re: Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
  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
  1 sibling, 1 reply; 7+ messages in thread
From: Edgar E. Iglesias @ 2011-02-14 11:46 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Tristan Gingold, qemu-devel@nongnu.org Developers, Aurelien Jarno

On Mon, Feb 14, 2011 at 12:34:05PM +0100, Alexander Graf wrote:
> Tristan Gingold wrote:
> > Potential reviewers CC:
> >
> > On Feb 8, 2011, at 10:59 AM, Tristan Gingold wrote:
> >
> >   
> >> Handle option '-icount X' on powerpc targets.
> >>
> >> Signed-off-by: Tristan Gingold <gingold@adacore.com>
> >>     
> 
> Braces are broken. Edgar knows his way around icount a lot better than
> me - I've never actually used it. Edgar, any comments?

AFAICS, the patch looks OK (except for the indentation).

Cheers

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] Re: Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
  2011-02-14 11:46     ` Edgar E. Iglesias
@ 2011-02-14 11:55       ` Tristan Gingold
  0 siblings, 0 replies; 7+ messages in thread
From: Tristan Gingold @ 2011-02-14 11:55 UTC (permalink / raw)
  To: Edgar E. Iglesias
  Cc: Alexander Graf, Aurelien Jarno, qemu-devel@nongnu.org Developers


On Feb 14, 2011, at 12:46 PM, Edgar E. Iglesias wrote:

> On Mon, Feb 14, 2011 at 12:34:05PM +0100, Alexander Graf wrote:
>> Tristan Gingold wrote:
>>> Potential reviewers CC:
>>> 
>>> On Feb 8, 2011, at 10:59 AM, Tristan Gingold wrote:
>>> 
>>> 
>>>> Handle option '-icount X' on powerpc targets.
>>>> 
>>>> Signed-off-by: Tristan Gingold <gingold@adacore.com>
>>>> 
>> 
>> Braces are broken. Edgar knows his way around icount a lot better than
>> me - I've never actually used it. Edgar, any comments?
> 
> AFAICS, the patch looks OK (except for the indentation).

Thanks.  New version soon.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Qemu-devel] [PATCHv2] Handle icount for powerpc tbl/tbu/decr load and store.
  2011-02-14 11:34   ` [Qemu-devel] " Alexander Graf
  2011-02-14 11:46     ` Edgar E. Iglesias
@ 2011-02-15  8:39     ` Tristan Gingold
  2011-02-16 14:43       ` [Qemu-devel] " Edgar E. Iglesias
  1 sibling, 1 reply; 7+ messages in thread
From: Tristan Gingold @ 2011-02-15  8:39 UTC (permalink / raw)
  To: Alexander Graf
  Cc: Edgar E. Iglesias, qemu-devel@nongnu.org Developers,
	Aurelien Jarno

Handle option '-icount X' on powerpc targets.

Signed-off-by: Tristan Gingold <gingold@adacore.com>
---
 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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [Qemu-devel] Re: [PATCHv2] Handle icount for powerpc tbl/tbu/decr load and store.
  2011-02-15  8:39     ` [Qemu-devel] [PATCHv2] " Tristan Gingold
@ 2011-02-16 14:43       ` Edgar E. Iglesias
  0 siblings, 0 replies; 7+ messages in thread
From: Edgar E. Iglesias @ 2011-02-16 14:43 UTC (permalink / raw)
  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 <gingold@adacore.com>
> ---
>  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
> 

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-02-16 14:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-08  9:59 [Qemu-devel] [PATCH] Handle icount for powerpc tbl/tbu/decr load and store Tristan Gingold
2011-02-14 10:07 ` [Qemu-devel] Ping: " 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

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).