From: Laurent Desnogues <laurent.desnogues@gmail.com>
To: Jun Koi <junkoi2004@gmail.com>
Cc: Alexander Graf <agraf@suse.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] TCG is hard to understand!
Date: Fri, 11 Dec 2009 08:36:38 +0100 [thread overview]
Message-ID: <761ea48b0912102336r7fba6f75q56d153a57241ed05@mail.gmail.com> (raw)
In-Reply-To: <fdaac4d50912101918s5c11cebardc845acf704f2a0e@mail.gmail.com>
On Fri, Dec 11, 2009 at 4:18 AM, Jun Koi <junkoi2004@gmail.com> wrote:
>
> Another question: I look at tcg_gen_callN() to see how the helper is
> executed. We put the helper opcode into the TCG code buffer, and put
> helper's params into gen_opparam_buf.
>
> However, then when TCG generates code to actually call the helper, we
> just put the opcode of the host insn into the output buffer, which is
> target code at this step, then run it.
>
> Now when the helper is executed, it must get its param from the stack,
> which is really the host stack. But as said above, its params are in
> gen_opparam_buf, but not in stack?
> I searched around, and dont see anywhere we link gen_opparam_buf with
> the host stack. So how the helper can get its param??
>
> Surely I missed something, or misunderstand the whole picture. Any hint?
Take a look at tcg.c:tcg_reg_alloc_call
Laurent
next prev parent reply other threads:[~2009-12-11 7:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-10 16:44 [Qemu-devel] TCG is hard to understand! Jun Koi
2009-12-10 22:21 ` Andreas Färber
2009-12-11 2:34 ` Jun Koi
2009-12-11 3:02 ` Alexander Graf
2009-12-11 3:18 ` Jun Koi
2009-12-11 7:36 ` Laurent Desnogues [this message]
2009-12-11 8:40 ` Jun Koi
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=761ea48b0912102336r7fba6f75q56d153a57241ed05@mail.gmail.com \
--to=laurent.desnogues@gmail.com \
--cc=agraf@suse.de \
--cc=junkoi2004@gmail.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).