All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
	qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
	qemu-stable <qemu-stable@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 1/2] target-xtensa: fix extui shift amount
Date: Thu, 20 Sep 2012 17:02:15 -0700	[thread overview]
Message-ID: <505BAE87.8040707@twiddle.net> (raw)
In-Reply-To: <1348181990-23415-2-git-send-email-jcmvbkbc@gmail.com>

On 09/20/2012 03:59 PM, Max Filippov wrote:
> +                if (shiftimm) {
> +                    tcg_gen_shri_i32(tmp, cpu_R[RRR_T], shiftimm);
> +                } else {
> +                    tcg_gen_mov_i32(tmp, cpu_R[RRR_T]);
> +                }

tcg_gen_shri_i32 will perform this conditional already.

> +                switch (maskimm) {
> +                case 0xff:
> +                    tcg_gen_ext8u_i32(cpu_R[RRR_R], tmp);
> +                    break;
> +
> +                case 0xffff:
> +                    tcg_gen_ext16u_i32(cpu_R[RRR_R], tmp);
> +                    break;

And while this optimization happens eventually, we should
change tcg-op.h to make sure it happens in tcg_gen_andi.


r~

  reply	other threads:[~2012-09-21  0:02 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-20 22:59 [Qemu-devel] [PATCH 0/2] target-xtensa: fix extui and gen_check_loop_end Max Filippov
2012-09-20 22:59 ` [Qemu-devel] [PATCH 1/2] target-xtensa: fix extui shift amount Max Filippov
2012-09-21  0:02   ` Richard Henderson [this message]
2012-09-20 22:59 ` [Qemu-devel] [PATCH 2/2] target-xtensa: don't emit extra tcg_gen_goto_tb Max Filippov
2012-09-20 23:09 ` [Qemu-devel] [PATCH 0/2] target-xtensa: fix extui and gen_check_loop_end malc

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=505BAE87.8040707@twiddle.net \
    --to=rth@twiddle.net \
    --cc=aurelien@aurel32.net \
    --cc=jcmvbkbc@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-stable@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.