From: Max Filippov <jcmvbkbc@gmail.com>
To: Aurelien Jarno <aurelien@aurel32.net>
Cc: qemu-devel <qemu-devel@nongnu.org>, Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] assertion in temp_save
Date: Tue, 20 Nov 2012 05:09:57 +0300 [thread overview]
Message-ID: <CAMo8BfJTurcnoHBTRDR2OTwXMHebio7Q1t9eaWj40LyifG=C5A@mail.gmail.com> (raw)
In-Reply-To: <CAMo8Bf+oWHG0prhER8Q0-tA84Cfq=Ww7acAJPEfR_54R3FDUnQ@mail.gmail.com>
On Sun, Nov 18, 2012 at 7:34 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
> On Sun, Nov 18, 2012 at 7:19 AM, Max Filippov <jcmvbkbc@gmail.com> wrote:
>> Hi Aurelien,
>>
>> starting with commit 2c0366f tcg: don't explicitly save globals and temps
>> I get the following abort on target-xtensa:
>>
>> qemu-system-xtensa: tcg/tcg.c:1665: temp_save: Assertion
>> `s->temps[temp].val_type == 2 || s->temps[temp].fixed_reg' failed.
>> Aborted
>>
>> I see that that commit only adds assertion and that bad thing happens
>> elsewhere. I've found that removal of tcg_gen_discard_i32 in the
>> gen_right_shift_sar makes it work again. The trace of the TB that fails
>> translation is below. If 'discard loc5' is removed it starts to work.
>>
>> Any idea of what might be wrong?
>
> In the debugger loc5 looks like this when abort happens:
>
> (gdb) p s->temps[105]
> $2 = {
> base_type = TCG_TYPE_I32,
> type = TCG_TYPE_I32,
> val_type = 0,
> reg = 11,
> val = 32,
> mem_reg = 4,
> mem_offset = 128,
> fixed_reg = 0,
> mem_coherent = 0,
> mem_allocated = 0,
> temp_local = 1,
> temp_allocated = 0,
> next_free_temp = -1,
> name = 0x0
> }
Looks like the issue is local temp reaching the end of TB in a dead state.
Hence the question: is discard applicable to local temps?
Or maybe I should just make it global (two other tcg values used with discard
in other targets are also globals) and avoid temp_local_new/temp_free at
first place?
--
Thanks.
-- Max
next prev parent reply other threads:[~2012-11-20 2:10 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-18 3:19 [Qemu-devel] assertion in temp_save Max Filippov
2012-11-18 3:34 ` Max Filippov
2012-11-20 2:09 ` Max Filippov [this message]
2012-11-20 17:47 ` Aurelien Jarno
2012-11-20 19:33 ` Max Filippov
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='CAMo8BfJTurcnoHBTRDR2OTwXMHebio7Q1t9eaWj40LyifG=C5A@mail.gmail.com' \
--to=jcmvbkbc@gmail.com \
--cc=aurelien@aurel32.net \
--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).