From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:42024) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svt14-00014b-6u for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:40:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Svt0z-0006Hh-RR for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:40:22 -0400 Received: from roura.ac.upc.edu ([147.83.33.10]:58521 helo=roura.ac.upc.es) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Svt0z-0006Ge-HW for qemu-devel@nongnu.org; Mon, 30 Jul 2012 12:40:17 -0400 Received: from [147.83.34.143] (dync-34-143.ac.upc.es [147.83.34.143]) by roura.ac.upc.es (8.13.8/8.13.8) with ESMTP id q6UGeEu2028346 for ; Mon, 30 Jul 2012 18:40:14 +0200 Message-ID: <5016B8EE.9060203@ac.upc.edu> Date: Mon, 30 Jul 2012 18:40:14 +0200 From: Jose Cano Reyes MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Adding a parameter to a helper List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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.