* [Qemu-devel] nb_globals vs nb_temps
@ 2012-01-08 13:05 Xin Tong
2012-01-08 13:37 ` Peter Maydell
2012-01-08 16:40 ` Andreas Färber
0 siblings, 2 replies; 5+ messages in thread
From: Xin Tong @ 2012-01-08 13:05 UTC (permalink / raw)
To: qemu-devel
>From the line of comment at TCGTemp * temps. The "globals first,
temps after". Whenever a global/temp is allocated, the
nb_globals/nb_temps is incremented. nb_globals is set to 0 when the
tcg is initialized, but i can not find where nb_temps is set. Anyone
care to answer ?
Thanks
Xin
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] nb_globals vs nb_temps
2012-01-08 13:05 [Qemu-devel] nb_globals vs nb_temps Xin Tong
@ 2012-01-08 13:37 ` Peter Maydell
2012-01-08 14:02 ` Xin Tong
2012-01-08 16:40 ` Andreas Färber
1 sibling, 1 reply; 5+ messages in thread
From: Peter Maydell @ 2012-01-08 13:37 UTC (permalink / raw)
To: Xin Tong; +Cc: qemu-devel
On 8 January 2012 13:05, Xin Tong <xerox.time.tech@gmail.com> wrote:
> From the line of comment at TCGTemp * temps. The "globals first,
> temps after". Whenever a global/temp is allocated, the
> nb_globals/nb_temps is incremented. nb_globals is set to 0 when the
> tcg is initialized, but i can not find where nb_temps is set. Anyone
> care to answer ?
tcg_func_start().
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] nb_globals vs nb_temps
2012-01-08 13:37 ` Peter Maydell
@ 2012-01-08 14:02 ` Xin Tong
2012-01-08 14:31 ` Peter Maydell
0 siblings, 1 reply; 5+ messages in thread
From: Xin Tong @ 2012-01-08 14:02 UTC (permalink / raw)
To: Peter Maydell; +Cc: qemu-devel
s->nb_temps = s->nb_globals; in tcg_func_start.
Is it still possible to allocated TCGTemp globals after tcg_func_start
is called. If it is allowed, aren't global temps and local temps going
to become interleaved ?
Thanks
Xin
On Sun, Jan 8, 2012 at 8:37 AM, Peter Maydell <peter.maydell@linaro.org> wrote:
> On 8 January 2012 13:05, Xin Tong <xerox.time.tech@gmail.com> wrote:
>> From the line of comment at TCGTemp * temps. The "globals first,
>> temps after". Whenever a global/temp is allocated, the
>> nb_globals/nb_temps is incremented. nb_globals is set to 0 when the
>> tcg is initialized, but i can not find where nb_temps is set. Anyone
>> care to answer ?
>
> tcg_func_start().
>
> -- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] nb_globals vs nb_temps
2012-01-08 14:02 ` Xin Tong
@ 2012-01-08 14:31 ` Peter Maydell
0 siblings, 0 replies; 5+ messages in thread
From: Peter Maydell @ 2012-01-08 14:31 UTC (permalink / raw)
To: Xin Tong; +Cc: qemu-devel
On 8 January 2012 14:02, Xin Tong <xerox.time.tech@gmail.com> wrote:
> s->nb_temps = s->nb_globals; in tcg_func_start.
>
> Is it still possible to allocated TCGTemp globals after tcg_func_start
> is called.
No. From tcg/README:
# A TCG "global" is a variable which is live in all the functions
# (equivalent of a C global variable). They are defined before the
# functions defined.
-- PMM
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] nb_globals vs nb_temps
2012-01-08 13:05 [Qemu-devel] nb_globals vs nb_temps Xin Tong
2012-01-08 13:37 ` Peter Maydell
@ 2012-01-08 16:40 ` Andreas Färber
1 sibling, 0 replies; 5+ messages in thread
From: Andreas Färber @ 2012-01-08 16:40 UTC (permalink / raw)
To: Xin Tong; +Cc: qemu-devel
Am 08.01.2012 14:05, schrieb Xin Tong:
> i can not find where nb_temps is set. Anyone
> care to answer ?
$ grep -r nb_temps path/to/qemu/sources
shows a manageable amount of search hits, with two assignments:
one in tcg/optimize.c, one in tcg/tcg.c.
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-01-08 16:42 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-01-08 13:05 [Qemu-devel] nb_globals vs nb_temps Xin Tong
2012-01-08 13:37 ` Peter Maydell
2012-01-08 14:02 ` Xin Tong
2012-01-08 14:31 ` Peter Maydell
2012-01-08 16:40 ` Andreas Färber
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).