From: malc <av1474@comtv.ru>
To: Max Filippov <jcmvbkbc@gmail.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel@nongnu.org, Aurelien Jarno <aurelien@aurel32.net>,
Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] Shifts, ppc[64], xtensa
Date: Fri, 21 Sep 2012 02:53:41 +0400 (MSK) [thread overview]
Message-ID: <alpine.LNX.2.00.1209210253080.6466@linmac> (raw)
In-Reply-To: <CAMo8Bf+eOWuyPfrN6W4aWr9FNpoBU+M7FC1AoOD49_O2G1h1Gw@mail.gmail.com>
On Thu, 20 Sep 2012, Max Filippov wrote:
> On Wed, Sep 19, 2012 at 11:53 PM, Richard Henderson <rth@twiddle.net> wrote:
> > On 09/19/2012 11:30 AM, Peter Maydell wrote:
> >> ...but on the other hand that ought to work for PPC too, so
> >> presumably my analysis is wrong somewhere.
> >
> > It isn't. It's a target-xtensa bug.
> >
[..snip..]
>
> This code is generated when TB ends on LEND
> (zero-overhead loop ending) with branching instruction.
> So, in addition to 3 way branch there's extra looping code
> generated by unconditional gen_check_loop_end(dc, 0);
> at the end of disas_xtensa_insn. I was pretty sure that this
> dead code would make no harm. --enable-debug-tcg says
> nothing on x86_64 host. The following should fix that:
It does, once the commit message is fixed i can apply it.
>
> -- >8 --
> From: Max Filippov <jcmvbkbc@gmail.com>
> Date: Thu, 20 Sep 2012 04:07:20 +0400
> Subject: [PATCH] target-xtensa: don't emit extra gen_check_loop_end
>
> Unconditional gen_check_loop_end at the end of disas_xtensa_insn
> can emit tcg_gen_goto_tb with slot id already used in the TB (e.g. when
> TB ends at LEND with a branch). Not all tcg backends can handle that.
>
> Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
> ---
> target-xtensa/translate.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/target-xtensa/translate.c b/target-xtensa/translate.c
> index 63b37b3..57a2b6f 100644
> --- a/target-xtensa/translate.c
> +++ b/target-xtensa/translate.c
> @@ -2502,7 +2502,9 @@ static void disas_xtensa_insn(DisasContext *dc)
> break;
> }
>
> - gen_check_loop_end(dc, 0);
> + if (dc->is_jmp == DISAS_NEXT) {
> + gen_check_loop_end(dc, 0);
> + }
> dc->pc = dc->next_pc;
>
> return;
>
--
mailto:av1474@comtv.ru
prev parent reply other threads:[~2012-09-20 22:53 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-18 19:52 [Qemu-devel] Shifts, ppc[64], xtensa malc
2012-09-18 23:20 ` Max Filippov
2012-09-19 12:49 ` malc
2012-09-19 15:00 ` Max Filippov
2012-09-19 0:10 ` Richard Henderson
2012-09-19 12:46 ` malc
2012-09-19 12:57 ` Peter Maydell
2012-09-19 17:00 ` Richard Henderson
2012-09-19 17:02 ` Richard Henderson
2012-09-19 17:11 ` Peter Maydell
2012-09-19 17:30 ` Richard Henderson
2012-09-19 17:51 ` Aurelien Jarno
2012-09-19 18:01 ` Richard Henderson
2012-09-19 18:30 ` Peter Maydell
2012-09-19 18:35 ` Richard Henderson
2012-09-19 19:53 ` Richard Henderson
2012-09-19 20:05 ` Peter Maydell
2012-09-19 21:21 ` Richard Henderson
2012-09-20 0:29 ` Max Filippov
2012-09-20 14:03 ` Richard Henderson
2012-09-20 14:22 ` Max Filippov
2012-09-20 22:53 ` malc [this message]
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=alpine.LNX.2.00.1209210253080.6466@linmac \
--to=av1474@comtv.ru \
--cc=aurelien@aurel32.net \
--cc=jcmvbkbc@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
/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).