From: Stefan Weil <weil@mail.berlios.de>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: TeLeMan <geleman@gmail.com>, qemu-devel <qemu-devel@nongnu.org>,
zhur@ispras.ru, Kirill Batuzov <batuzovk@ispras.ru>
Subject: Re: [Qemu-devel] [PATCH] TCG: fix copy propagation
Date: Sat, 06 Aug 2011 22:13:32 +0200 [thread overview]
Message-ID: <4E3DA06C.7050506@mail.berlios.de> (raw)
In-Reply-To: <CAAu8pHvSJvL-ypbieMj=h3=xKpmYz3iuzi9BpwsZcrNiS2Svug@mail.gmail.com>
Am 06.08.2011 16:06, schrieb Blue Swirl:
> Copy propagation introduced in 22613af4a6d9602001e6d0e7b6d98aa40aa018dc
> considered only global registers. However, register temps and stack
> allocated locals must be handled differently because register temps
> don't survive across brcond.
>
> Fix by propagating only within same class of temps.
>
> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
> ---
> tcg/optimize.c | 13 +++++++------
> tcg/tcg.h | 5 +++++
> 2 files changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/tcg/optimize.c b/tcg/optimize.c
> index a3bfa5e..748ecf9 100644
> --- a/tcg/optimize.c
> +++ b/tcg/optimize.c
> @@ -185,12 +185,13 @@ static int op_to_movi(int op)
> }
> }
>
> -static void tcg_opt_gen_mov(TCGArg *gen_args, TCGArg dst, TCGArg src,
> - int nb_temps, int nb_globals)
> +static void tcg_opt_gen_mov(TCGContext *s, TCGArg *gen_args, TCGArg dst,
> + TCGArg src, int nb_temps, int nb_globals)
> {
> reset_temp(dst, nb_temps, nb_globals);
> assert(temps[src].state != TCG_TEMP_COPY);
> - if (src >= nb_globals) {
> + if (src >= nb_globals &&
> + tcg_arg_is_local(s, src) == tcg_arg_is_local(s, dst)) {
> assert(temps[src].state != TCG_TEMP_CONST);
[snip]
Hi Blue,
your patch fixes qemu-system-x86_64 which now seems to work on 32 bit
hosts, too.
qemu-system-mips64(el) still fail with the same abort. They work when I
remove the
if block in tcg_opt_gen_mov.
The Debian kernel for qemu-system-mips64 which I used for the test is
available on
http://qemu.weilnetz.de/mips64/.
I could not reproduce the crash with qemu-system-ppc64 - neither with
nor without
your patch.
Kind regards,
Stefan
next prev parent reply other threads:[~2011-08-06 20:13 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-08-06 14:06 [Qemu-devel] [PATCH] TCG: fix copy propagation Blue Swirl
2011-08-06 20:13 ` Stefan Weil [this message]
2011-08-06 20:33 ` Stefan Weil
2011-08-06 21:07 ` Blue Swirl
-- strict thread matches above, loose matches on Subject: below --
2011-08-06 21:26 Blue Swirl
2011-08-07 6:48 ` Stefan Weil
2011-08-07 9:36 ` Blue Swirl
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=4E3DA06C.7050506@mail.berlios.de \
--to=weil@mail.berlios.de \
--cc=batuzovk@ispras.ru \
--cc=blauwirbel@gmail.com \
--cc=geleman@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=zhur@ispras.ru \
/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).