diff mbox series

[v3,23/26] target/s390x: don't use ld_code2 to probe next pc

Message ID 20221020115209.1761864-24-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
This isn't an translator picking up an instruction so we shouldn't use
the translator_lduw function which has side effects for plugins.

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

Comments

Richard Henderson Oct. 20, 2022, 12:06 p.m. UTC | #1
On 10/20/22 21:52, Alex Bennée wrote:
> This isn't an translator picking up an instruction so we shouldn't use
> the translator_lduw function which has side effects for plugins.
> 
> Signed-off-by: Alex Bennée<alex.bennee@linaro.org>
> ---
>   target/s390x/tcg/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~
David Hildenbrand Oct. 20, 2022, 1:22 p.m. UTC | #2
On 20.10.22 13:52, Alex Bennée wrote:
> This isn't an translator picking up an instruction so we shouldn't use
> the translator_lduw function which has side effects for plugins.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>   target/s390x/tcg/translate.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c
> index 1d2dddab1c..f4de8efe3a 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -6612,7 +6612,7 @@ static void s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs)
>   static target_ulong get_next_pc(CPUS390XState *env, DisasContext *s,
>                                   uint64_t pc)
>   {
> -    uint64_t insn = ld_code2(env, s, pc);
> +    uint64_t insn = cpu_lduw_code(env, pc);
>   
>       return pc + get_ilen((insn >> 8) & 0xff);
>   }

Reviewed-by: David Hildenbrand <david@redhat.com>
Ilya Leoshkevich Oct. 21, 2022, 10:35 a.m. UTC | #3
On Thu, 2022-10-20 at 12:52 +0100, Alex Bennée wrote:
> This isn't an translator picking up an instruction so we shouldn't
> use
> the translator_lduw function which has side effects for plugins.
> 
> Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
> ---
>  target/s390x/tcg/translate.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/target/s390x/tcg/translate.c
> b/target/s390x/tcg/translate.c
> index 1d2dddab1c..f4de8efe3a 100644
> --- a/target/s390x/tcg/translate.c
> +++ b/target/s390x/tcg/translate.c
> @@ -6612,7 +6612,7 @@ static void
> s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs)
>  static target_ulong get_next_pc(CPUS390XState *env, DisasContext *s,
>                                  uint64_t pc)
>  {
> -    uint64_t insn = ld_code2(env, s, pc);
> +    uint64_t insn = cpu_lduw_code(env, pc);
>  
>      return pc + get_ilen((insn >> 8) & 0xff);
>  }

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 1d2dddab1c..f4de8efe3a 100644
--- a/target/s390x/tcg/translate.c
+++ b/target/s390x/tcg/translate.c
@@ -6612,7 +6612,7 @@  static void s390x_tr_insn_start(DisasContextBase *dcbase, CPUState *cs)
 static target_ulong get_next_pc(CPUS390XState *env, DisasContext *s,
                                 uint64_t pc)
 {
-    uint64_t insn = ld_code2(env, s, pc);
+    uint64_t insn = cpu_lduw_code(env, pc);
 
     return pc + get_ilen((insn >> 8) & 0xff);
 }