qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Aurélien Jarno" <aurelien@aurel32.net>
To: "Andreas Färber" <planche2k@googlemail.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 8/x] ppc: Convert op_set_FT0 to TCG
Date: Thu, 4 Sep 2008 22:36:19 +0200	[thread overview]
Message-ID: <20080904203619.GA1819@volta.aurel32.net> (raw)
In-Reply-To: <9F25F767-0618-4970-88E0-83FD155753C4@googlemail.com>

On Thu, Sep 04, 2008 at 07:59:37PM +0200, Andreas Färber wrote:
> Replace op_set_FT0 with tcg_gen_movi_i64.
>
> Signed-off-by: Andreas Faerber <andreas.faerber@web.de>
>
> ---
> Here's a small one since we now seem to be both working on ppc.
>
> I'm not sure if this is correct since the dyngen op set the upper half  
> to zero. Do we need an explicit cast to 32 bits for the immediate  
> argument to assure they will be zero? Or was that just to avoid garbage 
> with dyngen?

No we don't. If you like at the instruction decoding, or at the PowerPC
manual, you will see that the resulting number is always representable
with a 32-bit variable. In dyngen, I guess it was to avoid passing both 
PARAM1 and PARAM2.

Patch applied.

>
> Andreas
>
>  target-ppc/op.c        |   10 ----------
>  target-ppc/translate.c |    2 +-
>  2 files changed, 1 insertions(+), 11 deletions(-)
>
> diff --git a/target-ppc/op.c b/target-ppc/op.c
> index a31b41f..81329e3 100644
> --- a/target-ppc/op.c
> +++ b/target-ppc/op.c
> @@ -424,16 +424,6 @@ void OPPROTO op_load_fpscr_FT0 (void)
>      RETURN();
>  }
>
> -void OPPROTO op_set_FT0 (void)
> -{
> -    CPU_DoubleU u;
> -
> -    u.l.upper = 0;
> -    u.l.lower = PARAM1;
> -    FT0 = u.d;
> -    RETURN();
> -}
> -
>  void OPPROTO op_load_fpscr_T0 (void)
>  {
>      T0 = (env->fpscr >> PARAM1) & 0xF;
> diff --git a/target-ppc/translate.c b/target-ppc/translate.c
> index 9dd2506..5139ae6 100644
> --- a/target-ppc/translate.c
> +++ b/target-ppc/translate.c
> @@ -2090,7 +2090,7 @@ GEN_HANDLER(mtfsfi, 0x3F, 0x06, 0x04, 0x006f0800, 
> PPC_FLOAT)
>      bf = crbD(ctx->opcode) >> 2;
>      sh = 7 - bf;
>      gen_optimize_fprf();
> -    gen_op_set_FT0(FPIMM(ctx->opcode) << (4 * sh));
> +    tcg_gen_movi_i64(cpu_FT[0], FPIMM(ctx->opcode) << (4 * sh));
>      gen_reset_fpstatus();
>      gen_op_store_fpscr(1 << sh);
>      if (unlikely(Rc(ctx->opcode) != 0)) {
> -- 
> 1.5.5.1
>


>


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

  reply	other threads:[~2008-09-04 20:36 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 13:36 [Qemu-devel] [PATCH] [ppc] Convert gen_set_{T0,T1} to TCG Andreas Färber
2008-09-02 14:32 ` [Qemu-devel] [PATCH] [ppc] Convert op_reset_T0, op_set_{T0, T1} " Andreas Färber
2008-09-02 15:39   ` [Qemu-devel] [PATCH] [ppc] Convert op_move_{T1,T2}_T0 " Andreas Färber
2008-09-02 16:19     ` Aurelien Jarno
2008-09-02 16:57     ` [Qemu-devel] [PATCH 4/x] [ppc] Convert op_moven_T2_T0 " Andreas Färber
2008-09-02 22:22       ` [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0,T1,T2} " Andreas Färber
2008-09-02 23:20         ` Aurelien Jarno
2008-09-03  0:39           ` [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0, T1, T2} " Andreas Färber
2008-09-03  5:07             ` Aurelien Jarno
2008-09-03 10:41               ` Andreas Färber
2008-09-03 11:28                 ` Thiemo Seufer
2008-09-03 18:07                   ` Andreas Färber
2008-09-03 18:26                     ` Blue Swirl
2008-09-03 19:00                       ` Andreas Färber
2008-09-03 19:12                         ` Blue Swirl
2008-09-03 20:04                           ` [Qemu-devel] [PATCH 5/x v2] ppc: Convert GPR moves " Andreas Färber
2008-09-04  5:25                             ` Aurelien Jarno
2008-09-04 10:21                               ` Andreas Färber
2008-09-04 12:24                             ` [Qemu-devel] [PATCH 6/x] ppc: Convert Altivec register " Andreas Färber
2008-09-04 14:08                               ` [Qemu-devel] [PATCH 7/x] ppc: Convert FPR " Andreas Färber
2008-09-04 14:39                                 ` Aurélien Jarno
2008-09-04 17:59                                   ` [Qemu-devel] [PATCH 8/x] ppc: Convert op_set_FT0 " Andreas Färber
2008-09-04 20:36                                     ` Aurélien Jarno [this message]
2008-09-04 22:53                                       ` [Qemu-devel] [PATCH 9/x] ppc: Convert op_add, op_addi " Andreas Färber
2008-09-05 14:18                                         ` Aurélien Jarno
2008-09-05 17:17                                           ` Andreas Färber
2008-09-05 17:49                                             ` Aurelien Jarno
2008-09-04 23:46                                       ` [Qemu-devel] [PATCH 10/x] ppc: Convert op_subf " Andreas Färber
2008-09-05 14:18                                         ` Aurélien Jarno
2008-09-04 14:39                               ` [Qemu-devel] [PATCH 6/x] ppc: Convert Altivec register moves " Aurélien Jarno
2008-09-07 14:22                         ` [Qemu-devel] [PATCH 5/x] ppc: Convert op_load_gpr_{T0, T1, T2} " Paul Brook
2008-09-03 12:41                 ` Aurélien Jarno
2008-09-03 12:58                   ` Andreas Färber
2008-09-03 13:00                     ` Aurélien Jarno
2008-09-03 13:23                     ` Thiemo Seufer
2008-09-03 13:45                       ` Tristan Gingold
2008-09-03 16:04                     ` Andreas Färber
2008-09-02 23:27       ` [Qemu-devel] [PATCH 4/x] [ppc] Convert op_moven_T2_T0 " Aurélien Jarno
2008-09-02 15:58   ` [Qemu-devel] [PATCH] [ppc] Convert op_reset_T0, op_set_{T0, T1} " Aurelien Jarno
2008-09-02 16:44     ` [Qemu-devel] [PATCH 2/x v2] " Andreas Färber
2008-09-02 23:28       ` Aurélien Jarno
2008-09-02 16:18 ` [Qemu-devel] [PATCH] [ppc] Convert gen_set_{T0,T1} " Aurelien Jarno

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080904203619.GA1819@volta.aurel32.net \
    --to=aurelien@aurel32.net \
    --cc=planche2k@googlemail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).