All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@twiddle.net>
To: Peter Maydell <peter.maydell@linaro.org>, qemu-devel@nongnu.org
Cc: patches@linaro.org, "Michael Matz" <matz@suse.de>,
	"Claudio Fontana" <claudio.fontana@linaro.org>,
	"Dirk Mueller" <dmueller@suse.de>,
	"Will Newton" <will.newton@linaro.org>,
	"Laurent Desnogues" <laurent.desnogues@gmail.com>,
	"Alex Bennée" <alex.bennee@linaro.org>,
	kvmarm@lists.cs.columbia.edu,
	"Christoffer Dall" <christoffer.dall@linaro.org>
Subject: Re: [Qemu-devel] [PATCH v2 01/13] target-arm: A64: add support for conditional select
Date: Sat, 07 Dec 2013 05:59:02 +1300	[thread overview]
Message-ID: <52A20256.3040706@twiddle.net> (raw)
In-Reply-To: <1386335953-28876-2-git-send-email-peter.maydell@linaro.org>

On 12/07/2013 02:19 AM, Peter Maydell wrote:
> +    tcg_rd = cpu_reg(s, rd);
> +
> +    if (cond >= 0x0e) { /* condition "always" */
> +        tcg_src = read_cpu_reg(s, rn, sf);
> +        tcg_gen_mov_i64(tcg_rd, tcg_src);
> +    } else {
> +        /* OPTME: we could use movcond here, at the cost of duplicating
> +         * a lot of the arm_gen_test_cc() logic.
> +         */
> +        int label_match = gen_new_label();
> +        int label_continue = gen_new_label();
> +
> +        arm_gen_test_cc(cond, label_match);
> +        /* nomatch: */
> +        tcg_src = cpu_reg(s, rm);

Sorry for missing this in the first round: For the silly corner case of Rd ==
XZR, tcg_rd is dead after the branch.

We could either move the tcg_rd assignment down into each basic block with the
assignment to tcg_src, or simply add

    if (rd == 31) {
        /* silly no-op write; until we use movcond we must special-case
           this to avoid a dead temporary across basic blocks.  */
        return;
    }

Either solution is ok by me.


r~

  reply	other threads:[~2013-12-06 16:59 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-06 13:19 [Qemu-devel] [PATCH v2 00/13] target-arm: A64 decoder set 2: misc logic and bit ops Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 01/13] target-arm: A64: add support for conditional select Peter Maydell
2013-12-06 16:59   ` Richard Henderson [this message]
2013-12-06 17:24     ` Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 02/13] target-arm: A64: add support for logical (shifted register) Peter Maydell
2013-12-06 17:02   ` Richard Henderson
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 03/13] target-arm: A64: add support for ADR and ADRP Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 04/13] target-arm: A64: add support for EXTR Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 05/13] target-arm: A64: add support for 2-src data processing and DIV Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 06/13] target-arm: A64: add support for 2-src shift reg insns Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 07/13] target-arm: A64: add support for 1-src data processing and CLZ Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 08/13] target-arm: A64: add support for 1-src RBIT insn Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 09/13] target-arm: A64: add support for 1-src REV insns Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 10/13] target-arm: A64: add support for bitfield insns Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 11/13] host-utils: add clrsb32/64 - count leading redundant sign bits Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 12/13] target-arm: A64: add support for 1-src CLS insn Peter Maydell
2013-12-06 13:19 ` [Qemu-devel] [PATCH v2 13/13] target-arm: A64: add support for logical (immediate) insns Peter Maydell

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=52A20256.3040706@twiddle.net \
    --to=rth@twiddle.net \
    --cc=alex.bennee@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=claudio.fontana@linaro.org \
    --cc=dmueller@suse.de \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=laurent.desnogues@gmail.com \
    --cc=matz@suse.de \
    --cc=patches@linaro.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=will.newton@linaro.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.