qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Aravind Prakash <prakar177@gmail.com>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Regarding tcg_gen_helper
Date: Wed, 24 Mar 2010 00:41:25 -0400	[thread overview]
Message-ID: <15537c51003232141w234dc989v270de419ccb46498@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 865 bytes --]

Hello,
My name is Aravind. I am working on a project which involves inserting code
to call one of my functions.
This is what it looks like:

//The function to be called.
void log_entry(int reg, int data)
{
      printf("REG access\n");
      printf("Data got REG = %d and data = %d\n", reg, data);
      fprintf(logfileptr, "Register = %d, Data = %d\n", reg, data);
}

static inline void gen_reg_log(int reg, int data)
{
//This is effectively calling tcg_gen_helper64 without the sizemask
        TCGv_ptr fn;
      TCGArg args[2];
       fn = tcg_const_ptr((tcg_target_long)log_entry);
      args[0] = GET_TCGV_I64(reg);
      args[1] = GET_TCGV_I64(data);
      tcg_gen_callN(&tcg_ctx, fn, 0, 0, 0, 2, args);
      tcg_temp_free_ptr(fn);
}

When I run this, I get a segfault. I do not know where to proceed. Any
suggestions will be appreciated.

Thanks,
Aravind.

[-- Attachment #2: Type: text/html, Size: 1014 bytes --]

                 reply	other threads:[~2010-03-24  4:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=15537c51003232141w234dc989v270de419ccb46498@mail.gmail.com \
    --to=prakar177@gmail.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).