From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44990) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGR2S-0001g8-QQ for qemu-devel@nongnu.org; Sat, 18 Jul 2015 08:16:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGR2N-0008Vj-OE for qemu-devel@nongnu.org; Sat, 18 Jul 2015 08:16:20 -0400 Received: from mail-wg0-x22b.google.com ([2a00:1450:400c:c00::22b]:36060) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGR2N-0008Va-Gy for qemu-devel@nongnu.org; Sat, 18 Jul 2015 08:16:15 -0400 Received: by wgbcc4 with SMTP id cc4so6174768wgb.3 for ; Sat, 18 Jul 2015 05:16:14 -0700 (PDT) Sender: Paolo Bonzini References: From: Paolo Bonzini Message-ID: <55AA4388.9070008@redhat.com> Date: Sat, 18 Jul 2015 14:16:08 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH v3 15/35] include/exec: Split target_long def to new header List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite , qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, rth@twiddle.net, edgar.iglesias@gmail.com, afaerber@suse.de, Peter Crosthwaite On 18/07/2015 11:40, Peter Crosthwaite wrote: > +/* target_ulong is the type of a virtual address */ > +#if TARGET_LONG_SIZE == 4 > +#define target_long int32_t > +#define target_ulong uint32_t > +#define TARGET_FMT_lx "%08x" > +#define TARGET_FMT_ld "%d" > +#define TARGET_FMT_lu "%u" > +#elif TARGET_LONG_SIZE == 8 > +#define target_long int64_t > +#define target_ulong uint64_t > +#define TARGET_FMT_lx "%016" PRIx64 > +#define TARGET_FMT_ld "%" PRId64 > +#define TARGET_FMT_lu "%" PRIu64 > +#else > +#error TARGET_LONG_SIZE undefined > +#endif Would it be possible, or make sense, to do #define target_long arm_target_long #define target_ulong arm_target_ulong instead? This makes prototypes nicer when printed in the debugger with ptype. Where could this be done? And can we assert that TARGET_FMT_l* is not used outside arch-obj-y? Paolo