diff mbox series

[v3,24/26] target/s390x: don't probe next pc for EXecuted insns

Message ID 20221020115209.1761864-25-alex.bennee@linaro.org
State Superseded
Headers show
Series testing/next (docker, avocado, s390x, MAINTAINERS) | expand

Commit Message

Alex Bennée Oct. 20, 2022, 11:52 a.m. UTC
We have finished the TB anyway so we can shortcut the other tests by
checking dc->ex_value first.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
 target/s390x/tcg/translate.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

David Hildenbrand Oct. 20, 2022, 1:22 p.m. UTC | #1
On 20.10.22 13:52, Alex Bennée wrote:
> We have finished the TB anyway so we can shortcut the other tests by
> checking dc->ex_value first.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   target/s390x/tcg/translate.c | 6 +++---
>   1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
> index f4de8efe3a..95279e5dc3 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -6624,9 +6624,9 @@ static void s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
>   
>       dc->base.is_jmp = translate_one(env, dc);
>       if (dc->base.is_jmp == DISAS_NEXT) {
> -        if (!is_same_page(dcbase, dc->base.pc_next) ||
> -            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next)) ||
> -            dc->ex_value) {
> +        if (dc->ex_value ||
> +            !is_same_page(dcbase, dc->base.pc_next) ||
> +            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next))) {
>               dc->base.is_jmp = DISAS_TOO_MANY;
>           }
>       }

Reviewed-by: David Hildenbrand <david@redhat.com>
Ilya Leoshkevich Oct. 21, 2022, 10:37 a.m. UTC | #2
On Thu, 2022-10-20 at 12:52 +0100, Alex Bennée wrote:
> We have finished the TB anyway so we can shortcut the other tests by
> checking dc->ex_value first.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  target/s390x/tcg/translate.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/target/s390x/tcg/translate.c
> b/target/s390x/tcg/translate.c
> index f4de8efe3a..95279e5dc3 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -6624,9 +6624,9 @@ static void
> s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
>  
>      dc->base.is_jmp = translate_one(env, dc);
>      if (dc->base.is_jmp == DISAS_NEXT) {
> -        if (!is_same_page(dcbase, dc->base.pc_next) ||
> -            !is_same_page(dcbase, get_next_pc(env, dc, dc-
> >base.pc_next)) ||
> -            dc->ex_value) {
> +        if (dc->ex_value ||
> +            !is_same_page(dcbase, dc->base.pc_next) ||
> +            !is_same_page(dcbase, get_next_pc(env, dc, dc-
> >base.pc_next))) {
>              dc->base.is_jmp = DISAS_TOO_MANY;
>          }
>      }

Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
diff mbox series

Patch

diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
index f4de8efe3a..95279e5dc3 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -6624,9 +6624,9 @@  static void s390x_tr_translate_insn(DisasContextBase *dcbase, CPUState *cs)
 
     dc->base.is_jmp = translate_one(env, dc);
     if (dc->base.is_jmp == DISAS_NEXT) {
-        if (!is_same_page(dcbase, dc->base.pc_next) ||
-            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next)) ||
-            dc->ex_value) {
+        if (dc->ex_value ||
+            !is_same_page(dcbase, dc->base.pc_next) ||
+            !is_same_page(dcbase, get_next_pc(env, dc, dc->base.pc_next))) {
             dc->base.is_jmp = DISAS_TOO_MANY;
         }
     }