qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH for-2.13] tcg: Improve TCGv_ptr support


From: Peter Maydell
Subject: Re: [Qemu-devel] [PATCH for-2.13] tcg: Improve TCGv_ptr support
Date: Thu, 19 Apr 2018 11:30:45 +0100

2018-04-17 23:26 GMT+01:00 Richard Henderson <address@hidden>:
> Drop TCGV_PTR_TO_NAT and TCGV_NAT_TO_PTR internal macros.
>
> Add tcg_temp_local_new_ptr, tcg_gen_brcondi_ptr, tcg_gen_ext_i32_ptr,
> tcg_gen_trunc_i64_ptr, tcg_gen_extu_ptr_i64, tcg_gen_trunc_ptr_i32.
>
> Use inlines instead of macros where possible.
>
> Signed-off-by: Richard Henderson <address@hidden>
> ----
>
> These additions will be used by target/arm/translate-sve.c.

> diff --git a/target/hppa/translate.c b/target/hppa/translate.c
> index c532889b1f..cdc397308b 100644
> --- a/target/hppa/translate.c
> +++ b/target/hppa/translate.c

> @@ -251,13 +245,7 @@
>  #define tcg_gen_qemu_ld_reg  tcg_gen_qemu_ld_i32
>  #define tcg_gen_qemu_st_reg  tcg_gen_qemu_st_i32
>  #define tcg_gen_atomic_xchg_reg tcg_gen_atomic_xchg_i32
> -#if UINTPTR_MAX == UINT32_MAX
> -# define tcg_gen_trunc_reg_ptr(p, r) \
> -    tcg_gen_mov_i32(TCGV_PTR_TO_NAT(p), r)
> -#else
> -# define tcg_gen_trunc_reg_ptr(p, r) \
> -    tcg_gen_extu_i32_i64(TCGV_PTR_TO_NAT(p), r)
> -#endif
> +#define tcg_gen_trunc_reg_ptr   tcg_gen_ext_i32_ptr

For the 64-bit host case, this used to be an unsigned
32->64 extension, but now it is a sign extension.

Otherwise the patch looks good, though reading it it felt like
it was really three patches rolled into one (roughly
correpsonding to the three paragraphs in the commit message)...

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]