[PATCH v2 02/11] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN

Richard Henderson posted 11 patches 4 years ago
Maintainers: "Edgar E. Iglesias" <edgar.iglesias@gmail.com>
There is a newer version of this series
[PATCH v2 02/11] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN
Posted by Richard Henderson 4 years ago
The only semantic of DISAS_TB_JUMP is that we've done goto_tb,
which is the same as DISAS_NORETURN -- we've exited the tb.

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
---
 target/cris/translate.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/target/cris/translate.c b/target/cris/translate.c
index bed7a7ed10..2ff4319dd1 100644
--- a/target/cris/translate.c
+++ b/target/cris/translate.c
@@ -55,7 +55,6 @@
 /* is_jmp field values */
 #define DISAS_JUMP    DISAS_TARGET_0 /* only pc was modified dynamically */
 #define DISAS_UPDATE  DISAS_TARGET_1 /* cpu state was modified dynamically */
-#define DISAS_TB_JUMP DISAS_TARGET_2 /* only pc was modified statically */
 #define DISAS_SWI     DISAS_TARGET_3
 
 /* Used by the decoder.  */
@@ -3243,12 +3242,12 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
                     gen_goto_tb(dc, 1, dc->jmp_pc);
                     gen_set_label(l1);
                     gen_goto_tb(dc, 0, dc->pc);
-                    dc->base.is_jmp = DISAS_TB_JUMP;
+                    dc->base.is_jmp = DISAS_NORETURN;
                     dc->jmp = JMP_NOJMP;
                 } else if (dc->jmp == JMP_DIRECT) {
                     cris_evaluate_flags(dc);
                     gen_goto_tb(dc, 0, dc->jmp_pc);
-                    dc->base.is_jmp = DISAS_TB_JUMP;
+                    dc->base.is_jmp = DISAS_NORETURN;
                     dc->jmp = JMP_NOJMP;
                 } else {
                     TCGv c = tcg_const_tl(dc->pc);
@@ -3311,7 +3310,7 @@ void gen_intermediate_code(CPUState *cs, TranslationBlock *tb, int max_insns)
             tcg_gen_exit_tb(NULL, 0);
             break;
         case DISAS_SWI:
-        case DISAS_TB_JUMP:
+        case DISAS_NORETURN:
             /* nothing more to generate */
             break;
         }
-- 
2.25.1


Re: [PATCH v2 02/11] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN
Posted by Philippe Mathieu-Daudé 4 years ago
On 6/20/21 11:32 PM, Richard Henderson wrote:
> The only semantic of DISAS_TB_JUMP is that we've done goto_tb,
> which is the same as DISAS_NORETURN -- we've exited the tb.
> 
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
> ---
>  target/cris/translate.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/target/cris/translate.c b/target/cris/translate.c
> index bed7a7ed10..2ff4319dd1 100644
> --- a/target/cris/translate.c
> +++ b/target/cris/translate.c
> @@ -55,7 +55,6 @@
>  /* is_jmp field values */
>  #define DISAS_JUMP    DISAS_TARGET_0 /* only pc was modified dynamically */
>  #define DISAS_UPDATE  DISAS_TARGET_1 /* cpu state was modified dynamically */
> -#define DISAS_TB_JUMP DISAS_TARGET_2 /* only pc was modified statically */
>  #define DISAS_SWI     DISAS_TARGET_3

Can we #define DISAS_SWI DISAS_TARGET_2 in the same commit?

Re: [PATCH v2 02/11] target/cris: Replace DISAS_TB_JUMP with DISAS_NORETURN
Posted by Richard Henderson 4 years ago
On 6/21/21 1:01 PM, Philippe Mathieu-Daudé wrote:
> On 6/20/21 11:32 PM, Richard Henderson wrote:
>> The only semantic of DISAS_TB_JUMP is that we've done goto_tb,
>> which is the same as DISAS_NORETURN -- we've exited the tb.
>>
>> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
>> ---
>>   target/cris/translate.c | 7 +++----
>>   1 file changed, 3 insertions(+), 4 deletions(-)
>>
>> diff --git a/target/cris/translate.c b/target/cris/translate.c
>> index bed7a7ed10..2ff4319dd1 100644
>> --- a/target/cris/translate.c
>> +++ b/target/cris/translate.c
>> @@ -55,7 +55,6 @@
>>   /* is_jmp field values */
>>   #define DISAS_JUMP    DISAS_TARGET_0 /* only pc was modified dynamically */
>>   #define DISAS_UPDATE  DISAS_TARGET_1 /* cpu state was modified dynamically */
>> -#define DISAS_TB_JUMP DISAS_TARGET_2 /* only pc was modified statically */
>>   #define DISAS_SWI     DISAS_TARGET_3
> 
> Can we #define DISAS_SWI DISAS_TARGET_2 in the same commit?

No point.  It goes away in patch 4.


r~