Skip to contentSkip to conversation

How to get gpr register contents in translate.c

Qemu-devel Elta 2 participants 2 messages Mar 7, 2012 – Mar 8, 2012

lore
Share & tools
lore

Elta

author
#0 lore raw

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!

#1 lore raw

Hello,

Am 07.03.2012 16:24, schrieb Elta:

Quoted 1 line

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

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