[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] TCG is hard to understand!
From: |
Jun Koi |
Subject: |
Re: [Qemu-devel] TCG is hard to understand! |
Date: |
Fri, 11 Dec 2009 17:40:23 +0900 |
On Fri, Dec 11, 2009 at 4:36 PM, Laurent Desnogues
<address@hidden> wrote:
> On Fri, Dec 11, 2009 at 4:18 AM, Jun Koi <address@hidden> 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