All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Bonifazi <stefboombastic@gmail.com>
To: Blue Swirl <blauwirbel@gmail.com>
Cc: QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Changing the content of target cpu registers
Date: Tue, 18 Jan 2011 19:13:35 +0100	[thread overview]
Message-ID: <4D35D84F.5070501@gmail.com> (raw)
In-Reply-To: <AANLkTim9ZLDEQscwcO4hswzz4nJbP-KLnYJ_cU-MYNEw@mail.gmail.com>

On 01/18/2011 06:17 PM, Blue Swirl wrote:
> On Tue, Jan 18, 2011 at 9:29 AM, Stefano Bonifazi
> <stefboombastic@gmail.com>  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	other threads:[~2011-01-18 18:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-18  9:29 [Qemu-devel] Changing the content of target cpu registers Stefano Bonifazi
2011-01-18 17:17 ` Blue Swirl
2011-01-18 18:13   ` Stefano Bonifazi [this message]
2011-01-21 22:41     ` Raphaël Lefèvre
2011-01-22 19:35       ` Blue Swirl

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=4D35D84F.5070501@gmail.com \
    --to=stefboombastic@gmail.com \
    --cc=blauwirbel@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 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.