From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR0rD-0007Rf-C9 for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:23:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VR0r8-00044H-8z for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:23:23 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:40734 helo=smtp.eu.adacore.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VR0r8-000445-39 for qemu-devel@nongnu.org; Tue, 01 Oct 2013 10:23:18 -0400 Message-ID: <524ADAD3.5020700@adacore.com> Date: Tue, 01 Oct 2013 16:23:15 +0200 From: Fabien Chouteau MIME-Version: 1.0 References: <1380556655-22282-1-git-send-email-chouteau@adacore.com> <1380556655-22282-4-git-send-email-chouteau@adacore.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Luiz Capitulino , QEMU Developers , =?UTF-8?B?QW5kcmVhcyBGw6RyYmU=?= =?UTF-8?B?cg==?= On 10/01/2013 03:08 AM, Peter Maydell wrote: > On 1 October 2013 00:57, Fabien Chouteau 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