All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jose Cano Reyes <jcano@ac.upc.edu>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Adding a parameter to a helper
Date: Mon, 30 Jul 2012 18:40:14 +0200	[thread overview]
Message-ID: <5016B8EE.9060203@ac.upc.edu> (raw)

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	other threads:[~2012-07-30 16:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-30 16:40 Jose Cano Reyes [this message]
2012-07-31 13:19 ` [Qemu-devel] Adding a parameter to a helper Laurent Desnogues
2012-07-31 15:09   ` Jose Cano Reyes
2012-07-31 15:14     ` Laurent Desnogues
2012-07-31 17:14       ` Jose Cano Reyes

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5016B8EE.9060203@ac.upc.edu \
    --to=jcano@ac.upc.edu \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.