From: Jun Koi <junkoi2004@gmail.com>
To: Laurent Desnogues <laurent.desnogues@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 17:40:23 +0900 [thread overview]
Message-ID: <fdaac4d50912110040k339abd7dq2c08c179869ba426@mail.gmail.com> (raw)
In-Reply-To: <761ea48b0912102336r7fba6f75q56d153a57241ed05@mail.gmail.com>
On Fri, Dec 11, 2009 at 4:36 PM, Laurent Desnogues
<laurent.desnogues@gmail.com> wrote:
> 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
>
Now I see how TCG manipulates the stack memory there.
Thanks,
J
prev parent reply other threads:[~2009-12-11 8:40 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
2009-12-11 8:40 ` Jun Koi [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=fdaac4d50912110040k339abd7dq2c08c179869ba426@mail.gmail.com \
--to=junkoi2004@gmail.com \
--cc=agraf@suse.de \
--cc=laurent.desnogues@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).