[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] cpu_regs in target-i386
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] cpu_regs in target-i386 |
Date: |
Sun, 27 Nov 2011 15:53:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:8.0) Gecko/20111105 Thunderbird/8.0 |
Am 27.11.2011 15:36, schrieb Xin Tong:
> If i understand correctly here, those are just array of offsets for
> the emulated registers such that the tcg can easily get access to the
> address of the emulated registers. This is, however, different from
> the env (CPUx86State) variable which will always have a host register
> pointing to it ( host register is made to point to env in the tb enter
> prologue).
Yes:
host register pointed to by cpu_env contains address of env
+
offset stored in cpu_* variable
=
address of corresponding struct member in env
Andreas
> On Sun, Nov 27, 2011 at 9:12 AM, Andreas Färber <address@hidden> wrote:
>> Am 27.11.2011 14:46, schrieb Xin Tong:
>>> When the x86 vcpu is initialized, a CPUX86State is qemu_mallocz'ed.
>>> env is used to point to it and modifications to the CPUX86State can
>>> thereby be done via the register that contains the env. I do not get
>>> what the cpu_regs[CPU_NB_REGS] are for, do not we already have a set
>>> of emulated x86 registers when we allocate the CPUX86State ?
>>
>> I assume in i386, too, it will be a TCGv array and will be initialized
>> to point to individual memory offsets inside CPU*State.
>> So they're for convenience and readability.
>>
>> HTE,
>> Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
- [Qemu-devel] cpu_regs in target-i386, Xin Tong, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Andreas Färber, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Xin Tong, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386,
Andreas Färber <=
- Re: [Qemu-devel] cpu_regs in target-i386, Xin Tong, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Peter Maydell, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Xin Tong, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Peter Maydell, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Xin Tong, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Peter Maydell, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Xin Tong, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Xin Tong, 2011/11/27
- Re: [Qemu-devel] cpu_regs in target-i386, Andreas Färber, 2011/11/27