All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Färber" <afaerber@suse.de>
To: Elta <elta.era@gmail.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] How to get gpr register contents in translate.c
Date: Thu, 08 Mar 2012 23:28:30 +0100	[thread overview]
Message-ID: <4F59328E.7080700@suse.de> (raw)
In-Reply-To: <4F4A7E8D-4CDD-4019-B3B6-9B3D8BCC4FAF@gmail.com>

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

      reply	other threads:[~2012-03-08 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=4F59328E.7080700@suse.de \
    --to=afaerber@suse.de \
    --cc=elta.era@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.