From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:39862) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5lp4-0004Qw-Rk for qemu-devel@nongnu.org; Thu, 08 Mar 2012 17:28:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S5lp3-0006Ye-9e for qemu-devel@nongnu.org; Thu, 08 Mar 2012 17:28:34 -0500 Received: from cantor2.suse.de ([195.135.220.15]:55138 helo=mx2.suse.de) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S5lp3-0006YV-2u for qemu-devel@nongnu.org; Thu, 08 Mar 2012 17:28:33 -0500 Message-ID: <4F59328E.7080700@suse.de> Date: Thu, 08 Mar 2012 23:28:30 +0100 From: =?ISO-8859-1?Q?Andreas_F=E4rber?= MIME-Version: 1.0 References: <4F4A7E8D-4CDD-4019-B3B6-9B3D8BCC4FAF@gmail.com> In-Reply-To: <4F4A7E8D-4CDD-4019-B3B6-9B3D8BCC4FAF@gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: [Qemu-devel] How to get gpr register contents in translate.c List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 tra= nslate.c, but cpu_gpr[rs]'s type is TCGv, can not get the real value of r= s. 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 --=20 SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 N=FCrnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imend=F6rffer; HRB 16746 AG N=FCrnbe= rg