All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] How to get gpr register contents in translate.c
@ 2012-03-07 15:24 Elta
  2012-03-08 22:28 ` Andreas Färber
  0 siblings, 1 reply; 2+ messages in thread
From: Elta @ 2012-03-07 15:24 UTC (permalink / raw)
  To: qemu-devel@nongnu.org

Hello everyone, I'm a newcomer here, nice to see you!
Now I get trouble in translate.c. I really want to get gpr value in translate.c, but cpu_gpr[rs]'s type is TCGv, can not get the real value of rs. Is the have any method or macro can made it? Thanks for your attention, have a nice day!

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] How to get gpr register contents in translate.c
  2012-03-07 15:24 [Qemu-devel] How to get gpr register contents in translate.c Elta
@ 2012-03-08 22:28 ` Andreas Färber
  0 siblings, 0 replies; 2+ messages in thread
From: Andreas Färber @ 2012-03-08 22:28 UTC (permalink / raw)
  To: Elta; +Cc: qemu-devel@nongnu.org

Hello,

Am 07.03.2012 16:24, schrieb Elta:
> Now I get trouble in translate.c. I really want to get gpr value in translate.c, but cpu_gpr[rs]'s type is TCGv, can not get the real value of rs. Is the have any method or macro can made it?

You forgot to mention which target you are talking about. ;)

Translation happens ahead of time. You do have access to CPUState but
its fields likely do not have the value you are interested in.
You'll have to read up on TCG and how to emit code that does what you
want to do with the register value at runtime rather than at translation
time.

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-08 22:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-07 15:24 [Qemu-devel] How to get gpr register contents in translate.c Elta
2012-03-08 22:28 ` Andreas Färber

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.