qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 10/x] ppc: Convert op_subf to TCG


From: Aurélien Jarno
Subject: Re: [Qemu-devel] [PATCH 10/x] ppc: Convert op_subf to TCG
Date: Fri, 5 Sep 2008 16:18:58 +0200
User-agent: Mutt/1.5.18 (2008-05-17)

On Fri, Sep 05, 2008 at 01:46:42AM +0200, Andreas Färber wrote:
> Replace op_subf with tcg_gen_sub_tl.
>
> Signed-off-by: Andreas Faerber <address@hidden>

Applied thanks.

> ---
>  target-ppc/op.c        |    7 -------
>  target-ppc/translate.c |   16 ++++++++++------
>  2 files changed, 10 insertions(+), 13 deletions(-)
>
> diff --git a/target-ppc/op.c b/target-ppc/op.c
> index 4ee411b..01b944b 100644
> --- a/target-ppc/op.c
> +++ b/target-ppc/op.c
> @@ -881,13 +881,6 @@ void OPPROTO op_nego_64 (void)
>  }
>  #endif
>
> -/* subtract from */
> -void OPPROTO op_subf (void)
> -{
> -    T0 = T1 - T0;
> -    RETURN();
> -}
> -
>  /* subtract from carrying */
>  void OPPROTO op_check_subfc (void)
>  {
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index f505be1..6561304 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -950,10 +950,14 @@ GEN_INT_ARITH2 (mullw,  0x1F, 0x0B, 0x07,  
> PPC_INTEGER);
>  /* neg    neg.    nego    nego.    */
>  GEN_INT_ARITH1_64 (neg,    0x1F, 0x08, 0x03, PPC_INTEGER);
>  /* subf   subf.   subfo   subfo.   */
> +static always_inline void gen_op_subf (void)
> +{
> +    tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
> +}
>  static always_inline void gen_op_subfo (void)
>  {
>      tcg_gen_not_tl(cpu_T[2], cpu_T[0]);
> -    gen_op_subf();
> +    tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
>      gen_op_check_addo();
>  }
>  #if defined(TARGET_PPC64)
> @@ -961,7 +965,7 @@ static always_inline void gen_op_subfo (void)
>  static always_inline void gen_op_subfo_64 (void)
>  {
>      tcg_gen_not_i64(cpu_T[2], cpu_T[0]);
> -    gen_op_subf();
> +    tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
>      gen_op_check_addo_64();
>  }
>  #endif
> @@ -969,26 +973,26 @@ GEN_INT_ARITH2_64 (subf,   0x1F, 0x08, 0x01,  
> PPC_INTEGER);
>  /* subfc  subfc.  subfco  subfco.  */
>  static always_inline void gen_op_subfc (void)
>  {
> -    gen_op_subf();
> +    tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
>      gen_op_check_subfc();
>  }
>  static always_inline void gen_op_subfco (void)
>  {
>      tcg_gen_not_tl(cpu_T[2], cpu_T[0]);
> -    gen_op_subf();
> +    tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
>      gen_op_check_subfc();
>      gen_op_check_addo();
>  }
>  #if defined(TARGET_PPC64)
>  static always_inline void gen_op_subfc_64 (void)
>  {
> -    gen_op_subf();
> +    tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
>      gen_op_check_subfc_64();
>  }
>  static always_inline void gen_op_subfco_64 (void)
>  {
>      tcg_gen_not_i64(cpu_T[2], cpu_T[0]);
> -    gen_op_subf();
> +    tcg_gen_sub_tl(cpu_T[0], cpu_T[1], cpu_T[0]);
>      gen_op_check_subfc_64();
>      gen_op_check_addo_64();
>  }
> -- 
> 1.5.5.1
>



-- 
  .''`.  Aurelien Jarno             | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   address@hidden         | address@hidden
   `-    people.debian.org/~aurel32 | www.aurel32.net




reply via email to

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