From: Sergey Fedorov <serge.fdrv@gmail.com>
To: Stefan Weil <sw@weilnetz.de>,
Sergey Fedorov <sergey.fedorov@linaro.org>,
Richard Henderson <rth@twiddle.net>
Cc: QEMU Developer <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 4/5] cpu-exec: Move TB execution stuff out of cpu_exec()
Date: Fri, 15 Jul 2016 22:32:29 +0300 [thread overview]
Message-ID: <57893A4D.7040602@gmail.com> (raw)
In-Reply-To: <861bc603-772f-4f32-1f43-802eb85e4f42@weilnetz.de>
On 15/07/16 09:45, Stefan Weil wrote:
> Hi,
>
> Am 11.05.2016 um 12:21 schrieb Sergey Fedorov:
> [...]
>> int cpu_exec(CPUState *cpu)
>> @@ -516,8 +576,6 @@ int cpu_exec(CPUState *cpu)
>> CPUArchState *env = &x86_cpu->env;
>> #endif
>> int ret;
>> - TranslationBlock *tb, *last_tb;
>> - int tb_exit = 0;
> Here tb_exit was only once set to 0, ...
>
>> SyncClocks sc;
>>
>> /* replay_interrupt may need current_cpu */
>> @@ -544,6 +602,9 @@ int cpu_exec(CPUState *cpu)
>> init_delay_params(&sc, cpu);
>>
>> for(;;) {
>> + TranslationBlock *tb, *last_tb;
>> + int tb_exit = 0;
> ... while now it is zeroed in each iteration of the for loop.
> I'm not sure whether the new code is still correct.
That is okay because 'tb_exit' only makes sense when "last_tb != NULL".
But we always reset 'last_tb' in this loop:
last_tb = NULL; /* forget the last executed TB after exception */
>
> If it is, ...
>
>> +
>> /* prepare setjmp context for exception handling */
>> if (sigsetjmp(cpu->jmp_env, 0) == 0) {
> ... the declaration of tb_exit could also be done here, after the sigsetjmp.
> That would fix a compiler warning which I get when compiling with
> -Wclobbered:
>
>
> cpu-exec.c:603:13: warning: variable ‘tb_exit’ might be clobbered by
> ‘longjmp’ or ‘vfork’ [-Wclobbered]
I've sent the patch to fix this:
Message-Id: <20160715193123.28113-1-sergey.fedorov@linaro.org>
Thanks,
Sergey
next prev parent reply other threads:[~2016-07-15 19:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 10:21 [Qemu-devel] [PATCH 0/5] cpu-exec: Restructure cpu_exec() Sergey Fedorov
2016-05-11 10:21 ` [Qemu-devel] [PATCH 1/5] cpu-exec: Move halt handling out of cpu_exec() Sergey Fedorov
2016-05-11 10:21 ` [Qemu-devel] [PATCH 2/5] cpu-exec: Move exception " Sergey Fedorov
2016-05-11 10:21 ` [Qemu-devel] [PATCH 3/5] cpu-exec: Move interrupt " Sergey Fedorov
2016-05-11 10:21 ` [Qemu-devel] [PATCH 4/5] cpu-exec: Move TB execution stuff " Sergey Fedorov
2016-07-15 6:45 ` Stefan Weil
2016-07-15 19:32 ` Sergey Fedorov [this message]
2016-05-11 10:21 ` [Qemu-devel] [PATCH 5/5] cpu-exec: Remove unused 'x86_cpu' and 'env' from cpu_exec() Sergey Fedorov
2016-05-12 0:05 ` [Qemu-devel] [PATCH 0/5] cpu-exec: Restructure cpu_exec() Richard Henderson
-- strict thread matches above, loose matches on Subject: below --
2016-05-10 15:46 Sergey Fedorov
2016-05-10 15:46 ` [Qemu-devel] [PATCH 4/5] cpu-exec: Move TB execution stuff out of cpu_exec() Sergey Fedorov
2016-05-10 16:56 ` Richard Henderson
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=57893A4D.7040602@gmail.com \
--to=serge.fdrv@gmail.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=sergey.fedorov@linaro.org \
--cc=sw@weilnetz.de \
/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.