|
From: | Lauren E Guckert |
Subject: | Re: [Qemu-devel] Guest Code Instruction Trace |
Date: | Mon, 23 Dec 2013 14:10:29 -0600 |
On 23 December 2013 03:45, Lauren E Guckert <address@hidden> wrote:The TCGv type represents a TCG value. You have to
> IN TRANSLATE.C:
> DISAS_INSN FUNCTION:
>
> ++ TCGv t0 = tcg_temp_new();
> ++ TCGv t1 = tcg_temp_new();
> ++ t0= pc_start; t1 = b;
> ++ tcg_gen_helper_fast_trace(t0,t1);
use the TCG functions to manipulate them. If you just
assign a random value like 'b' to them then things are
obviously going to go wrong. Look at other code which
passes constant values to helper functions (hint, it
will use tcg_const_i32() or tcg_const_i64() to create
the TCGv.)
Why are you doing this rather than just using a simple helper
> IN TCG/TCG-OP.H ADDED (here if I pass 0 args, it executes fine and prints
> dummy message correct number of times):
> static inline void tcg_gen_helper_fast_trace(target_ulong pc,int op)
> {
> int sizemask = 0;
> TCGArg args[2];
> #ifdef TARGET_X86_64
> sizemask |= tcg_gen_sizemask(0,0,0);
> sizemask |= tcg_gen_sizemask(1,1,0);
> sizemask |= tcg_gen_sizemask(2,1,0);
> args[0] = GET_TCGV_I64(pc);
> args[1] = GET_TCGV_I64(op);
> tcg_gen_helperN(tcg_helper_fast_trace64, 0, sizemask, ((TCGArg)(-1)),2 ,
> args);
declared in helper.h like everything else? Why is yours special?
thanks
-- PMM
[Prev in Thread] | Current Thread | [Next in Thread] |