* [Qemu-devel] Regarding tcg_gen_helper
@ 2010-03-24 4:41 Aravind Prakash
0 siblings, 0 replies; only message in thread
From: Aravind Prakash @ 2010-03-24 4:41 UTC (permalink / raw)
To: qemu-devel
[-- 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 --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2010-03-24 4:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-24 4:41 [Qemu-devel] Regarding tcg_gen_helper Aravind Prakash
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).