qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] Adding a parameter to a helper


From: Jose Cano Reyes
Subject: [Qemu-devel] Adding a parameter to a helper
Date: Mon, 30 Jul 2012 18:40:14 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

Hi all,

I am trying to add a new integer parameter to an existing helper and call this helper in "targeti386/translate.c". I have several problems:

1) I cannot add an integer parameter to the helper, the compiler says that it must be "TCGv_i32", despite I declare this new parameter as "int" in "target-i386/helper.h". Why?

2) If I use the the function "tcg_const_i32" in order to convert my integer to TCGv_i32 I always obtain the same output value, that is:

        tcg_const_i32(10) = 1074260520
        tcg_const_i32(22) = 1074260520
        tcg_const_i32(30) = 1074260520
        ...

3) Moreover, wen I pass this value in the helper call "gen_helper_flds_ST0", that is:

     gen_helper_flds_ST0(cpu_tmp2_i32, tcg_const_i32(MY_INT_VALUE));

How can I use MY_INT_VALUE later in the function "tcg_gen_helperN" . This function is called by DEF_HELPER_FLAGS2, which corresponds to DEF_HELPER_2 (definition of my helper).


Thanks in advance,

   Jose Cano.



reply via email to

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