Re: [Qemu-devel] TCG is hard to understand!

2009-12-11 Thread Jun Koi
On Fri, Dec 11, 2009 at 4:36 PM, Laurent Desnogues wrote: > On Fri, Dec 11, 2009 at 4:18 AM, Jun Koi 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. >

Re: [Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Laurent Desnogues
On Fri, Dec 11, 2009 at 4:18 AM, Jun Koi 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 hel

Re: [Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Jun Koi
Hi Alex, >> However, I still dont understand what the line (3) does. Could you >> give some hints? >> static TCGv_i32 cpu_tmp2_i32;                                      // 1 ... gen_ldst_modrm(s, modrm, OT_WORD, OR_TMP0, 0);   // 2 gen_jmp_im(pc_start - s->cs_base);            

Re: [Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Alexander Graf
On 11.12.2009, at 03:34, Jun Koi wrote: > On Fri, Dec 11, 2009 at 7:21 AM, Andreas Färber > wrote: >> Hi, >> >> Am 10.12.2009 um 17:44 schrieb Jun Koi: >> >>> I am trying to understand how TCG works. For example, I look at the >>> LLDT insn on x86. >>> >>> In target-i386/translate.c, we tran

Re: [Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Jun Koi
On Fri, Dec 11, 2009 at 7:21 AM, Andreas Färber wrote: > Hi, > > Am 10.12.2009 um 17:44 schrieb Jun Koi: > >> I am trying to understand how TCG works. For example, I look at the >> LLDT insn on x86. >> >> In target-i386/translate.c, we translate LLDT to TCG code, like below: >> >> >> static TCGv_i

Re: [Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Andreas Färber
Hi, Am 10.12.2009 um 17:44 schrieb Jun Koi: I am trying to understand how TCG works. For example, I look at the LLDT insn on x86. In target-i386/translate.c, we translate LLDT to TCG code, like below: static TCGv_i32 cpu_tmp2_i32; // 1 ... gen_ldst_mod

[Qemu-devel] TCG is hard to understand!

2009-12-10 Thread Jun Koi
Hi, I am trying to understand how TCG works. For example, I look at the LLDT insn on x86. In target-i386/translate.c, we translate LLDT to TCG code, like below: static TCGv_i32 cpu_tmp2_i32; // 1 ... gen_ldst_modrm(s, modrm, OT_WORD, OR_TMP0, 0); // 2 gen_