[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC][PATCH] tcg: allocate memory to spill registers on

From: Aurelien Jarno
Subject: Re: [Qemu-devel] [RFC][PATCH] tcg: allocate memory to spill registers on startup
Date: Fri, 10 Apr 2009 18:06:50 +0200
User-agent: Mozilla-Thunderbird (X11/20090103)

Paul Brook a écrit :
>> I am trying to fix the following comment from Fabrice (tcg.c)
>> /* XXX: for load/store we could do that only for the slow path
>>    (i.e. when a memory callback is called) */
>> The idea is not to do register allocation/spilling in tcg-target.c, but
>> to save registers containing TCG globals to memory in the slow path only
>> and without touching the TCGTemp structure. That's why it has to be done
>> in tcg-target.c
> Hmm, you don't actually have to allocate a slot, just you need to stash the 
> values somewhere while you're making the slow call, then restore them 
> afterwards. The bits that do need writing back to home locations (i.e. 
> visible guest cpu state) already have memory locations.

For TCG globals, that's true.

But the plan is also to reduce the list of clobbered registers when the
fast path is taken (e.g. only 2 registers are used by the load/store
code on x86_64). This means that the other clobbered registers according
to the ABI have to be saved/restored when taking the slow path. This
looks like the best location to save those registers.

Aurelien Jarno                          GPG: 1024D/F1BCDB73
address@hidden                 http://www.aurel32.net

reply via email to

[Prev in Thread] Current Thread [Next in Thread]