|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH v3 15/35] include/exec: Split target_long def to new header |
Date: | Sat, 18 Jul 2015 14:16:08 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |