From: Aurelien Jarno <aurelien@aurel32.net>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [RFC][PATCH] tcg: allocate memory to spill registers on startup
Date: Fri, 10 Apr 2009 18:06:50 +0200 [thread overview]
Message-ID: <49DF6E9A.7060300@aurel32.net> (raw)
In-Reply-To: <200904101652.31884.paul@codesourcery.com>
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
aurelien@aurel32.net http://www.aurel32.net
prev parent reply other threads:[~2009-04-10 16:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-10 8:54 [Qemu-devel] [RFC][PATCH] tcg: allocate memory to spill registers on startup Aurelien Jarno
2009-04-10 14:44 ` Paul Brook
2009-04-10 14:56 ` Aurelien Jarno
2009-04-10 15:20 ` Paul Brook
2009-04-10 15:31 ` Aurelien Jarno
2009-04-10 15:52 ` Paul Brook
2009-04-10 16:06 ` Aurelien Jarno [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=49DF6E9A.7060300@aurel32.net \
--to=aurelien@aurel32.net \
--cc=paul@codesourcery.com \
--cc=qemu-devel@nongnu.org \
/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).