On 23.05.2017 05:03, Richard Henderson wrote:
> Signed-off-by: Richard Henderson <r...@twiddle.net>
> ---
>  target/s390x/mem_helper.c | 10 +++++-----
>  target/s390x/translate.c  |  1 -
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c
> index d37e691..748a6e8 100644
> --- a/target/s390x/mem_helper.c
> +++ b/target/s390x/mem_helper.c
> @@ -707,13 +707,13 @@ void HELPER(unpk)(CPUS390XState *env, uint32_t len, 
> uint64_t dest,
>  void HELPER(tr)(CPUS390XState *env, uint32_t len, uint64_t array,
>                  uint64_t trans)
>  {
> -    int i;
> +    uintptr_t ra = GETPC();
> +    uint32_t i;
>  
>      for (i = 0; i <= len; i++) {
> -        uint8_t byte = cpu_ldub_data(env, array + i);
> -        uint8_t new_byte = cpu_ldub_data(env, trans + byte);
> -
> -        cpu_stb_data(env, array + i, new_byte);
> +        uint8_t byte = cpu_ldub_data_ra(env, array + i, ra);
> +        uint8_t new_byte = cpu_ldub_data_ra(env, trans + byte, ra);
> +        cpu_stb_data_ra(env, array + i, new_byte, ra);
>      }
>  }
>  
> diff --git a/target/s390x/translate.c b/target/s390x/translate.c
> index e8eefec..b506cee 100644
> --- a/target/s390x/translate.c
> +++ b/target/s390x/translate.c
> @@ -4070,7 +4070,6 @@ static ExitStatus op_tprot(DisasContext *s, DisasOps *o)
>  static ExitStatus op_tr(DisasContext *s, DisasOps *o)
>  {
>      TCGv_i32 l = tcg_const_i32(get_field(s->fields, l1));
> -    potential_page_fault(s);
>      gen_helper_tr(cpu_env, l, o->addr1, o->in2);
>      tcg_temp_free_i32(l);
>      set_cc_static(s);
> 

Reviewed-by: Thomas Huth <th...@redhat.com>


Reply via email to