qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Alexander Graf <agraf@suse.de>
To: Richard Henderson <rth@twiddle.net>, qemu-ppc@nongnu.org
Cc: Tom Musta <tommusta@gmail.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 2/2] PPC: e500: Merge 32 and 64 bit SPE emulation
Date: Wed, 04 Jun 2014 23:51:21 +0200	[thread overview]
Message-ID: <538F94D9.1000203@suse.de> (raw)
In-Reply-To: <538F91D1.1030604@twiddle.net>


On 04.06.14 23:38, Richard Henderson wrote:
> On 06/04/2014 02:09 PM, Alexander Graf wrote:
>> @@ -9030,13 +8820,10 @@ static inline void gen_evmwumi(DisasContext *ctx)
>>       t1 = tcg_temp_new_i64();
>>   
>>       /* t0 := rA; t1 := rB */
>> -#if defined(TARGET_PPC64)
>> -    tcg_gen_ext32u_tl(t0, cpu_gpr[rA(ctx->opcode)]);
>> -    tcg_gen_ext32u_tl(t1, cpu_gpr[rB(ctx->opcode)]);
>> -#else
>>       tcg_gen_extu_tl_i64(t0, cpu_gpr[rA(ctx->opcode)]);
>> +    tcg_gen_ext32u_i64(t0, t0);
> Better in one step:
>
>   tcg_gen_ext32u_i64(t0, cpu_gpr[rA(ctx->opcode)]);

But cpu_gpr can be i32 for qemu-system-ppc, no?

>
>> @@ -9112,13 +8899,10 @@ static inline void gen_evmwsmi(DisasContext *ctx)
>>       t1 = tcg_temp_new_i64();
>>   
>>       /* t0 := rA; t1 := rB */
>> +    tcg_gen_extu_tl_i64(t0, cpu_gpr[rA(ctx->opcode)]);
>> +    tcg_gen_ext32s_i64(t0, t0);
>> +    tcg_gen_extu_tl_i64(t1, cpu_gpr[rB(ctx->opcode)]);
>> +    tcg_gen_ext32s_i64(t1, t1);
> Similarly.
>
> Although I do wonder about using the actual 32-bit widening multiply
> primitives: tcg_gen_mulu2_i32 / tcg_gen_muls2_i32.
>
> I suspect the optimizer would clean up the unsigned version, but it hasn't got
> a chance with the signed version.

I personally don't really care too much about SPE performance - anything 
that doesn't fail works for me ;).

> Otherwise, it looks ok.

Thanks a lot for looking through it!


Alex

  reply	other threads:[~2014-06-04 21:51 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-04 21:09 [Qemu-devel] [PATCH 1/2] TCG: Fix tcg_gen_extr_i64_tl for 32bit Alexander Graf
2014-06-04 21:09 ` [Qemu-devel] [PATCH 2/2] PPC: e500: Merge 32 and 64 bit SPE emulation Alexander Graf
2014-06-04 21:38   ` Richard Henderson
2014-06-04 21:51     ` Alexander Graf [this message]
2014-06-04 21:57       ` Richard Henderson
2014-06-04 21:12 ` [Qemu-devel] [PATCH 1/2] TCG: Fix tcg_gen_extr_i64_tl for 32bit Richard Henderson

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=538F94D9.1000203@suse.de \
    --to=agraf@suse.de \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-ppc@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=tommusta@gmail.com \
    /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).