qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 20/26] tcg-aarch64: Introduce tcg_out_insn_3507


From: Claudio Fontana
Subject: Re: [Qemu-devel] [PATCH 20/26] tcg-aarch64: Introduce tcg_out_insn_3507
Date: Wed, 26 Mar 2014 10:40:54 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1

On 15.03.2014 03:48, Richard Henderson wrote:
> Cleaning up the implementation of REV and REV16 at the same time.
> 
> Signed-off-by: Richard Henderson <address@hidden>
> ---
>  tcg/aarch64/tcg-target.c | 22 ++++++++++++++--------
>  1 file changed, 14 insertions(+), 8 deletions(-)
> 
> diff --git a/tcg/aarch64/tcg-target.c b/tcg/aarch64/tcg-target.c
> index fa1a45d..bf4b654 100644
> --- a/tcg/aarch64/tcg-target.c
> +++ b/tcg/aarch64/tcg-target.c
> @@ -327,6 +327,10 @@ typedef enum {
>      I3506_CSEL      = 0x1a800000,
>      I3506_CSINC     = 0x1a800400,
>  
> +    /* Data-processing (1 source) instructions.  */
> +    I3507_REV16     = 0x5ac00400,
> +    I3507_REV       = 0x5ac00800,
> +
>      /* Data-processing (2 source) instructions.  */
>      I3508_LSLV      = 0x1ac02000,
>      I3508_LSRV      = 0x1ac02400,
> @@ -545,6 +549,12 @@ static void tcg_out_insn_3506(TCGContext *s, AArch64Insn 
> insn, TCGType ext,
>                | tcg_cond_to_aarch64[c] << 12);
>  }
>  
> +static void tcg_out_insn_3507(TCGContext *s, AArch64Insn insn, TCGType ext,
> +                              TCGReg rd, TCGReg rn)
> +{
> +    tcg_out32(s, insn | ext << 31 | rn << 5 | rd);
> +}
> +
>  static void tcg_out_insn_3509(TCGContext *s, AArch64Insn insn, TCGType ext,
>                                TCGReg rd, TCGReg rn, TCGReg rm, TCGReg ra)
>  {
> @@ -952,19 +962,15 @@ static void tcg_out_brcond(TCGContext *s, TCGMemOp ext, 
> TCGCond c, TCGArg a,
>  }
>  
>  static inline void tcg_out_rev(TCGContext *s, TCGType ext,
> -                               TCGReg rd, TCGReg rm)
> +                               TCGReg rd, TCGReg rn)
>  {
> -    /* using REV 0x5ac00800 */
> -    unsigned int base = ext ? 0xdac00c00 : 0x5ac00800;
> -    tcg_out32(s, base | rm << 5 | rd);
> +    tcg_out_insn(s, 3507, REV, ext, rd, rn);
>  }
>  
>  static inline void tcg_out_rev16(TCGContext *s, TCGType ext,
> -                                 TCGReg rd, TCGReg rm)
> +                                 TCGReg rd, TCGReg rn)
>  {
> -    /* using REV16 0x5ac00400 */
> -    unsigned int base = ext ? 0xdac00400 : 0x5ac00400;
> -    tcg_out32(s, base | rm << 5 | rd);
> +    tcg_out_insn(s, 3507, REV16, ext, rd, rn);
>  }
>  
>  static inline void tcg_out_sxt(TCGContext *s, TCGType ext, TCGMemOp s_bits,
> 

Reviewed-by: Claudio Fontana <address@hidden>




reply via email to

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