From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:39956) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUrs4-0000k0-2a for qemu-devel@nongnu.org; Tue, 01 Apr 2014 02:08:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WUrs3-0003uo-3V for qemu-devel@nongnu.org; Tue, 01 Apr 2014 02:08:28 -0400 Received: from mail-ve0-x22b.google.com ([2607:f8b0:400c:c01::22b]:45694) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WUrs2-0003uk-UP for qemu-devel@nongnu.org; Tue, 01 Apr 2014 02:08:27 -0400 Received: by mail-ve0-f171.google.com with SMTP id jy13so5760408veb.2 for ; Mon, 31 Mar 2014 23:08:26 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 1 Apr 2014 11:38:26 +0530 Message-ID: From: Gaurav Sharma Content-Type: multipart/alternative; boundary=047d7b5d84ef08459b04f5f4ff9a Subject: Re: [Qemu-devel] When are register values committed to CPUARMState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: QEMU Developers --047d7b5d84ef08459b04f5f4ff9a Content-Type: text/plain; charset=UTF-8 Seems, I am bit confused. So if i have to dump the target cpu registers, where would be the corresponding code to look into On Tue, Apr 1, 2014 at 12:47 AM, Peter Maydell wrote: > [put qemu-devel back on CC] > On 31 March 2014 20:13, Gaurav Sharma wrote: > > On Mon, Mar 31, 2014 at 11:35 PM, Peter Maydell < > peter.maydell@linaro.org> > > wrote: > >> On 31 March 2014 18:59, Gaurav Sharma wrote: > >> > I want to know, when are the register values committed to CPUARMState > >> > structure ? > >> > >> When they need to be. Mostly we keep register values in TCG > >> globals, > > > > >> By TCG globals here do we mean, cpu_R[] array, because if i see the > > code for a simple add, i can see source and destination values for the > TCG > > ops being this array? In the init function isn't this array mapped on to > > CPUARMState ? > > Yes, but... > > >> which means they're held in host registers except > >> when calling helpers which might read or write globals > > ...as I say TCG is free to keep globals in host registers > a lot of the time and only writes values back to the > CPUARMState when it needs to. > > thanks > -- PMM > --047d7b5d84ef08459b04f5f4ff9a Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Seems, I am bit confused. So if i have to dump the target = cpu registers, where would be the corresponding code to look into
=


On Tue, Apr 1= , 2014 at 12:47 AM, Peter Maydell <peter.maydell@linaro.org>= wrote:
[put qemu-devel back on CC]
On 31 March 2014 20:13, Gaurav Sharma <gauravs.2010@gmail.com> wrote:
> On Mon, Mar 31, 2014 at 11:35 PM, Peter Maydell <peter.maydell@linaro.org>
> wrote:
>> On 31 March 2014 18:59, Gaurav Sharma <gauravs.2010@gmail.com> wrote:
>> > I want to know, when are the register v= alues committed to =C2=A0CPUARMState
>> > structure ?
>>
>> When they need to be. Mostly we keep register values in TCG
>> globals,
>
> =C2=A0 =C2=A0>> By TCG globals here do we mean, cpu_R[] array, b= ecause if i see the
> code for a simple add, i can see source and destination values for the= TCG
> ops being this array? In the init function isn't this array mapped= on to
> CPUARMState ?

Yes, but...

>> which means they're held in host registers except
>> when calling helpers which might read or write globals

...as I say TCG is free to keep globals in host registers
a lot of the time and only writes values back to the
CPUARMState when it needs to.

thanks
-- PMM

--047d7b5d84ef08459b04f5f4ff9a--