qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array


From: Fabien Chouteau
Subject: Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array
Date: Tue, 01 Oct 2013 16:23:15 +0200
User-agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/20130803 Thunderbird/17.0.8

On 10/01/2013 03:08 AM, Peter Maydell wrote:
> On 1 October 2013 00:57, Fabien Chouteau <address@hidden> wrote:
> 
>> +#define MD_I64 0
>> +#define MD_I32 1
> 
>> -#define MD_TLONG 0
>> -#define MD_I32   1
> 
>> -    { "eax", offsetof(CPUX86State, regs[0]) },
>> -    { "ecx", offsetof(CPUX86State, regs[1]) },
> 
>> +    { "eax", offsetof(CPUX86State, regs[0]) },
>> +    { "ecx", offsetof(CPUX86State, regs[1]) },
> 
> I like this generally, but this detail is wrong. These changes
> mean that these registers (and many others) are now described
> as being int64_t wide rather than target_long wide, so you'll
> find that on 32 bit x86 they will read/write incorrectly.
> This is why I suggested that you need to have target-i386/monitor.c
> do an
> #if TARGET_LONG_BITS == 32
> #define MD_TLONG MD_I32
> #else
> #define MD_TLONG MD_I64
> #endif
> 
> and then specifically mark these fields as MD_TLONG.

This seems complicated. Is there a way to use target_long in monitor.h?

-- 
Fabien Chouteau



reply via email to

[Prev in Thread] Current Thread [Next in Thread]