Handle icount for powerpc tbl/tbu/decr load and store.
PATCH 1/1 Handle icount for powerpc tbl/tbu/decr load and store.
Handle option '-icount X' on powerpc targets.
--- target-ppc/translate_init.c | 36 ++++++++++++++++++++++++++++++++++++ 1 files changed, 36 insertions(+), 0 deletions(-)
target-ppc/translate_init.c +36 -0
@@ -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 ))
Signature · 1 line
1.7.3.GIT
[Qemu-devel] Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
Potential reviewers CC:
Quoted 90 lines · Tristan Gingold
Handle option '-icount X' on powerpc targets.
Signed-off-by Tristan Gingold <[email protected]>---
target-ppc/translate_init.c| 36 ++++++++++++++++++++++++++++++++++++1 files changed, 36 insertions(+), 0 deletions(-)target-ppc/translate_init.c +36
-0@@ -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 ))Signature · 1 line
1.7.3.GIT
[Qemu-devel] Re: Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
Quoted 9 lines · Tristan Gingold
Potential reviewers CC:
Quoted 4 lines · Tristan Gingold
Handle option '-icount X' on powerpc targets.
Signed-off-by Tristan Gingold <[email protected]>
Braces are broken. Edgar knows his way around icount a lot better than me - I've never actually used it. Edgar, any comments?
Alex
[Qemu-devel] Re: Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
Quoted 6 lines · Alexander Graf
Quoted 5 lines · Tristan Gingold
Potential reviewers CC:
On Feb 8, 2011, at 10:59 AM, Tristan Gingold wrote:
Quoted 7 lines
Quoted 4 lines
Quoted 4 lines
Handle option '-icount X' on powerpc targets.
Signed-off-by Tristan Gingold <[email protected]>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
[Qemu-devel] Re: Ping: [PATCH] Handle icount for powerpc tbl/tbu/decr load and store.
Quoted 9 lines · Edgar E. Iglesias
Quoted 8 lines · Alexander Graf
Quoted 7 lines · Tristan Gingold
Potential reviewers CC:
Quoted 2 lines · Tristan Gingold
Handle option '-icount X' on powerpc targets.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Quoted 2 lines
Signed-off-by Tristan Gingold <[email protected]>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.
PATCH v2 1/1 Handle icount for powerpc tbl/tbu/decr load and store.
In reply to Alexander GrafHandle option '-icount X' on powerpc targets.
--- target-ppc/translate_init.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-)
target-ppc/translate_init.c +42 -0
@@ -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 ))
Signature · 1 line
1.7.3.GIT
Edgar E. Iglesias
AppliedQuoted 1 line · Tristan Gingold
Handle option '-icount X' on powerpc targets.
I've applied this one, thanks.
Quoted 94 lines
Signed-off-by Tristan Gingold <[email protected]>--- target-ppc/translate_init.c | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 42 insertions(+), 0 deletions(-)target-ppc/translate_init.c +42
-0@@ -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 ))Signature · 1 line
1.7.3.GIT