From: Richard Henderson <rth@twiddle.net>
To: Aurelien Jarno <aurelien@aurel32.net>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 1/2] tcg: fix register allocation with two aliased dead inputs
Date: Thu, 04 Jun 2015 14:17:19 -0700 [thread overview]
Message-ID: <5570C05F.3000207@twiddle.net> (raw)
In-Reply-To: <1433447228-29425-2-git-send-email-aurelien@aurel32.net>
On 06/04/2015 12:47 PM, Aurelien Jarno wrote:
> For TCG ops with two outputs registers (add2, sub2, div2, div2u), when
> the same input temp is used for the two inputs aliased to the two
> outputs, and when these inputs are both dead, the register allocation
> code wrongly assigned the same register to the same output.
>
> This happens for example with sub2 t1, t2, t3, t3, t4, t5, when t3 is
> not used anymore after the TCG op. In that case the same register is
> used for t1, t2 and t3.
>
> The fix is to look for already allocated aliased input when allocating
> a dead aliased input and check that the register is not already
> used.
>
> Cc: Richard Henderson <rth@twiddle.net>
> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
> ---
> tcg/tcg.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
Reviewed-by: Richard Henderson <rth@twiddle.net>
r~
next prev parent reply other threads:[~2015-06-04 21:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-04 19:47 [Qemu-devel] [PATCH v3 0/2] tcg: improve dead computation Aurelien Jarno
2015-06-04 19:47 ` [Qemu-devel] [PATCH v3 1/2] tcg: fix register allocation with two aliased dead inputs Aurelien Jarno
2015-06-04 21:17 ` Richard Henderson [this message]
2015-06-04 19:47 ` [Qemu-devel] [PATCH v3 2/2] tcg: fix dead computation for repeated input arguments 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=5570C05F.3000207@twiddle.net \
--to=rth@twiddle.net \
--cc=aurelien@aurel32.net \
--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).