qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] cpu_regs in target-i386


From: Peter Maydell
Subject: Re: [Qemu-devel] cpu_regs in target-i386
Date: Sun, 27 Nov 2011 20:59:38 +0000

On 27 November 2011 16:17, Xin Tong <address@hidden> wrote:
> So the offset value (120) is really encapsulated in the TCGv
> structure. and when we need the offset, we just call GET_TCGV_IA64
> like what it is doing here
>
>  static inline void tcg_gen_op3_i64(TCGOpcode opc, TCGv_i64 arg1, TCGv_i64 
> arg2,
>                                   TCGv_i64 arg3)
> {
>    *gen_opc_ptr++ = opc;
>    *gen_opparam_ptr++ = GET_TCGV_I64(arg1);
>    *gen_opparam_ptr++ = GET_TCGV_I64(arg2);
>    *gen_opparam_ptr++ = GET_TCGV_I64(arg3);
> }

No, this is simply coping the TCGv from one place to another.
(GET_TCGV_I64() is a only a macro which checks at compile time
that you've really passed it a TCGv_i64 and not, say, a TCGv_i32.
In a non-debug build it does nothing.)

This function is writing out the intermediate representation
[see tcg/README] for a three-operand operation. We won't attempt
to actually use the offset value (120) until much later when a
subsequent pass reads the intermediate representation and writes
out native code for it.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]