On 10/01/2013 03:08 AM, Peter Maydell wrote: > On 1 October 2013 00:57, Fabien Chouteau <chout...@adacore.com> 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