Patchwork [v2,17/26] target-cris: rename helper flags

login
register
mail settings
Submitter Aurelien Jarno
Date Oct. 9, 2012, 7:56 p.m.
Message ID <1349812584-19551-18-git-send-email-aurelien@aurel32.net>
Download mbox | patch
Permalink /patch/190438/
State New
Headers show

Comments

Aurelien Jarno - Oct. 9, 2012, 7:56 p.m.
Rename helper flags to the new ones. This is purely a mechanical change,
it's possible to use better flags by looking at the helpers.

Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
 target-cris/helper.h |   18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)
Edgar Iglesias - Oct. 10, 2012, 10:02 a.m.
On Tue, Oct 09, 2012 at 09:56:15PM +0200, Aurelien Jarno wrote:
> Rename helper flags to the new ones. This is purely a mechanical change,
> it's possible to use better flags by looking at the helpers.
> 
> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>

Looks good, thanks!

Acked-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>


> ---
>  target-cris/helper.h |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/target-cris/helper.h b/target-cris/helper.h
> index 99fb326..fe12083 100644
> --- a/target-cris/helper.h
> +++ b/target-cris/helper.h
> @@ -10,19 +10,19 @@ DEF_HELPER_1(rfn, void, env);
>  DEF_HELPER_3(movl_sreg_reg, void, env, i32, i32)
>  DEF_HELPER_3(movl_reg_sreg, void, env, i32, i32)
>  
> -DEF_HELPER_FLAGS_1(lz, TCG_CALL_PURE, i32, i32);
> -DEF_HELPER_FLAGS_4(btst, TCG_CALL_PURE, i32, env, i32, i32, i32);
> +DEF_HELPER_FLAGS_1(lz, TCG_CALL_NO_SE, i32, i32);
> +DEF_HELPER_FLAGS_4(btst, TCG_CALL_NO_SE, i32, env, i32, i32, i32);
>  
> -DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_PURE, i32, env, i32, i32, i32)
> -DEF_HELPER_FLAGS_4(evaluate_flags_mulu, TCG_CALL_PURE, i32, env, i32, i32, i32)
> -DEF_HELPER_FLAGS_5(evaluate_flags_mcp, TCG_CALL_PURE, i32, env,
> +DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_NO_SE, i32, env, i32, i32, i32)
> +DEF_HELPER_FLAGS_4(evaluate_flags_mulu, TCG_CALL_NO_SE, i32, env, i32, i32, i32)
> +DEF_HELPER_FLAGS_5(evaluate_flags_mcp, TCG_CALL_NO_SE, i32, env,
>                                                        i32, i32, i32, i32)
> -DEF_HELPER_FLAGS_5(evaluate_flags_alu_4, TCG_CALL_PURE, i32, env,
> +DEF_HELPER_FLAGS_5(evaluate_flags_alu_4, TCG_CALL_NO_SE, i32, env,
>                                                          i32, i32, i32, i32)
> -DEF_HELPER_FLAGS_5(evaluate_flags_sub_4, TCG_CALL_PURE, i32, env,
> +DEF_HELPER_FLAGS_5(evaluate_flags_sub_4, TCG_CALL_NO_SE, i32, env,
>                                                          i32, i32, i32, i32)
> -DEF_HELPER_FLAGS_3(evaluate_flags_move_4, TCG_CALL_PURE, i32, env, i32, i32)
> -DEF_HELPER_FLAGS_3(evaluate_flags_move_2, TCG_CALL_PURE, i32, env, i32, i32)
> +DEF_HELPER_FLAGS_3(evaluate_flags_move_4, TCG_CALL_NO_SE, i32, env, i32, i32)
> +DEF_HELPER_FLAGS_3(evaluate_flags_move_2, TCG_CALL_NO_SE, i32, env, i32, i32)
>  DEF_HELPER_1(evaluate_flags, void, env)
>  DEF_HELPER_1(top_evaluate_flags, void, env)
>  
> -- 
> 1.7.10.4
>
Edgar Iglesias - Oct. 10, 2012, 10:05 a.m.
On Tue, Oct 09, 2012 at 09:56:15PM +0200, Aurelien Jarno wrote:
> Rename helper flags to the new ones. This is purely a mechanical change,
> it's possible to use better flags by looking at the helpers.
> 
> Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
>  target-cris/helper.h |   18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/target-cris/helper.h b/target-cris/helper.h
> index 99fb326..fe12083 100644
> --- a/target-cris/helper.h
> +++ b/target-cris/helper.h
> @@ -10,19 +10,19 @@ DEF_HELPER_1(rfn, void, env);
>  DEF_HELPER_3(movl_sreg_reg, void, env, i32, i32)
>  DEF_HELPER_3(movl_reg_sreg, void, env, i32, i32)
>  
> -DEF_HELPER_FLAGS_1(lz, TCG_CALL_PURE, i32, i32);
> -DEF_HELPER_FLAGS_4(btst, TCG_CALL_PURE, i32, env, i32, i32, i32);
> +DEF_HELPER_FLAGS_1(lz, TCG_CALL_NO_SE, i32, i32);


btw, lz could be TCG_CALL_NO_RGSE like in the microblaze case.
I guess the _CONST was missing from before...





> +DEF_HELPER_FLAGS_4(btst, TCG_CALL_NO_SE, i32, env, i32, i32, i32);
>  
> -DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_PURE, i32, env, i32, i32, i32)
> -DEF_HELPER_FLAGS_4(evaluate_flags_mulu, TCG_CALL_PURE, i32, env, i32, i32, i32)
> -DEF_HELPER_FLAGS_5(evaluate_flags_mcp, TCG_CALL_PURE, i32, env,
> +DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_NO_SE, i32, env, i32, i32, i32)
> +DEF_HELPER_FLAGS_4(evaluate_flags_mulu, TCG_CALL_NO_SE, i32, env, i32, i32, i32)
> +DEF_HELPER_FLAGS_5(evaluate_flags_mcp, TCG_CALL_NO_SE, i32, env,
>                                                        i32, i32, i32, i32)
> -DEF_HELPER_FLAGS_5(evaluate_flags_alu_4, TCG_CALL_PURE, i32, env,
> +DEF_HELPER_FLAGS_5(evaluate_flags_alu_4, TCG_CALL_NO_SE, i32, env,
>                                                          i32, i32, i32, i32)
> -DEF_HELPER_FLAGS_5(evaluate_flags_sub_4, TCG_CALL_PURE, i32, env,
> +DEF_HELPER_FLAGS_5(evaluate_flags_sub_4, TCG_CALL_NO_SE, i32, env,
>                                                          i32, i32, i32, i32)
> -DEF_HELPER_FLAGS_3(evaluate_flags_move_4, TCG_CALL_PURE, i32, env, i32, i32)
> -DEF_HELPER_FLAGS_3(evaluate_flags_move_2, TCG_CALL_PURE, i32, env, i32, i32)
> +DEF_HELPER_FLAGS_3(evaluate_flags_move_4, TCG_CALL_NO_SE, i32, env, i32, i32)
> +DEF_HELPER_FLAGS_3(evaluate_flags_move_2, TCG_CALL_NO_SE, i32, env, i32, i32)
>  DEF_HELPER_1(evaluate_flags, void, env)
>  DEF_HELPER_1(top_evaluate_flags, void, env)
>  
> -- 
> 1.7.10.4
>
Aurelien Jarno - Oct. 10, 2012, 12:09 p.m.
On Wed, Oct 10, 2012 at 12:05:51PM +0200, Edgar E. Iglesias wrote:
> On Tue, Oct 09, 2012 at 09:56:15PM +0200, Aurelien Jarno wrote:
> > Rename helper flags to the new ones. This is purely a mechanical change,
> > it's possible to use better flags by looking at the helpers.
> > 
> > Cc: Edgar E. Iglesias <edgar.iglesias@gmail.com>
> > Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> > ---
> >  target-cris/helper.h |   18 +++++++++---------
> >  1 file changed, 9 insertions(+), 9 deletions(-)
> > 
> > diff --git a/target-cris/helper.h b/target-cris/helper.h
> > index 99fb326..fe12083 100644
> > --- a/target-cris/helper.h
> > +++ b/target-cris/helper.h
> > @@ -10,19 +10,19 @@ DEF_HELPER_1(rfn, void, env);
> >  DEF_HELPER_3(movl_sreg_reg, void, env, i32, i32)
> >  DEF_HELPER_3(movl_reg_sreg, void, env, i32, i32)
> >  
> > -DEF_HELPER_FLAGS_1(lz, TCG_CALL_PURE, i32, i32);
> > -DEF_HELPER_FLAGS_4(btst, TCG_CALL_PURE, i32, env, i32, i32, i32);
> > +DEF_HELPER_FLAGS_1(lz, TCG_CALL_NO_SE, i32, i32);
> 
> 
> btw, lz could be TCG_CALL_NO_RGSE like in the microblaze case.
> I guess the _CONST was missing from before...
> 

Indeed. The change was purely mechanical. We should later review the
helpers flags for all targets, especially given this patch series give
new optimization opportunities. For example helpers which read globals,
but don't write them.

Patch

diff --git a/target-cris/helper.h b/target-cris/helper.h
index 99fb326..fe12083 100644
--- a/target-cris/helper.h
+++ b/target-cris/helper.h
@@ -10,19 +10,19 @@  DEF_HELPER_1(rfn, void, env);
 DEF_HELPER_3(movl_sreg_reg, void, env, i32, i32)
 DEF_HELPER_3(movl_reg_sreg, void, env, i32, i32)
 
-DEF_HELPER_FLAGS_1(lz, TCG_CALL_PURE, i32, i32);
-DEF_HELPER_FLAGS_4(btst, TCG_CALL_PURE, i32, env, i32, i32, i32);
+DEF_HELPER_FLAGS_1(lz, TCG_CALL_NO_SE, i32, i32);
+DEF_HELPER_FLAGS_4(btst, TCG_CALL_NO_SE, i32, env, i32, i32, i32);
 
-DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_PURE, i32, env, i32, i32, i32)
-DEF_HELPER_FLAGS_4(evaluate_flags_mulu, TCG_CALL_PURE, i32, env, i32, i32, i32)
-DEF_HELPER_FLAGS_5(evaluate_flags_mcp, TCG_CALL_PURE, i32, env,
+DEF_HELPER_FLAGS_4(evaluate_flags_muls, TCG_CALL_NO_SE, i32, env, i32, i32, i32)
+DEF_HELPER_FLAGS_4(evaluate_flags_mulu, TCG_CALL_NO_SE, i32, env, i32, i32, i32)
+DEF_HELPER_FLAGS_5(evaluate_flags_mcp, TCG_CALL_NO_SE, i32, env,
                                                       i32, i32, i32, i32)
-DEF_HELPER_FLAGS_5(evaluate_flags_alu_4, TCG_CALL_PURE, i32, env,
+DEF_HELPER_FLAGS_5(evaluate_flags_alu_4, TCG_CALL_NO_SE, i32, env,
                                                         i32, i32, i32, i32)
-DEF_HELPER_FLAGS_5(evaluate_flags_sub_4, TCG_CALL_PURE, i32, env,
+DEF_HELPER_FLAGS_5(evaluate_flags_sub_4, TCG_CALL_NO_SE, i32, env,
                                                         i32, i32, i32, i32)
-DEF_HELPER_FLAGS_3(evaluate_flags_move_4, TCG_CALL_PURE, i32, env, i32, i32)
-DEF_HELPER_FLAGS_3(evaluate_flags_move_2, TCG_CALL_PURE, i32, env, i32, i32)
+DEF_HELPER_FLAGS_3(evaluate_flags_move_4, TCG_CALL_NO_SE, i32, env, i32, i32)
+DEF_HELPER_FLAGS_3(evaluate_flags_move_2, TCG_CALL_NO_SE, i32, env, i32, i32)
 DEF_HELPER_1(evaluate_flags, void, env)
 DEF_HELPER_1(top_evaluate_flags, void, env)