qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Changing the content of target cpu registers


From: Stefano Bonifazi
Subject: Re: [Qemu-devel] Changing the content of target cpu registers
Date: Tue, 18 Jan 2011 19:13:35 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7

On 01/18/2011 06:17 PM, Blue Swirl wrote:
On Tue, Jan 18, 2011 at 9:29 AM, Stefano Bonifazi
<address@hidden>  wrote:
Hi all!
  I am working on qemu-user (qemu-ppc).
I'd like to edit the values of target registers during the execution. Can I
do that by simply changing the content of env->gpr[] or do these only
contain a copy of the values of the registers?
In this last case, where are the real values of the target registers stored
so that by modifying them I can alter the behavior of the target code
execution?
env->gpr is the canonical location, but the translator assigns TCG
variables to them (cpu_gpr[] in translate.c), so GPR contents may be
cached to these. But when helpers are called or the TB finishes,
env->gpr should be valid again.
Hi!
 Thank you for your answer!
So if I understand well if I set env->gpr in a code section where there is no TCG translation on progress, I can edit directly the target CPU register right?
Best Regards!
Stefano B.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]