Commit 444ce24195b97d1b425cd250a731e3f5f4b4bbfa
1 parent
a702b353
use correct printf format
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3611 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
3 changed files
with
7 additions
and
3 deletions
hw/pxa.h
... | ... | @@ -203,7 +203,7 @@ struct pxa2xx_i2s_s { |
203 | 203 | }; |
204 | 204 | |
205 | 205 | # define PA_FMT "0x%08lx" |
206 | -# define REG_FMT "0x%lx" | |
206 | +# define REG_FMT "0x" TARGET_FMT_plx | |
207 | 207 | |
208 | 208 | struct pxa2xx_state_s *pxa270_init(unsigned int sdram_size, DisplayState *ds, |
209 | 209 | const char *revision); | ... | ... |
hw/pxa2xx_dma.c
... | ... | @@ -303,7 +303,7 @@ static uint32_t pxa2xx_dma_read(void *opaque, target_phys_addr_t offset) |
303 | 303 | } |
304 | 304 | |
305 | 305 | cpu_abort(cpu_single_env, |
306 | - "%s: Bad offset 0x%04lx\n", __FUNCTION__, offset); | |
306 | + "%s: Bad offset 0x" TARGET_FMT_plx "\n", __FUNCTION__, offset); | |
307 | 307 | return 7; |
308 | 308 | } |
309 | 309 | |
... | ... | @@ -401,7 +401,7 @@ static void pxa2xx_dma_write(void *opaque, |
401 | 401 | break; |
402 | 402 | } |
403 | 403 | fail: |
404 | - cpu_abort(cpu_single_env, "%s: Bad offset 0x%04lx\n", | |
404 | + cpu_abort(cpu_single_env, "%s: Bad offset " TARGET_FMT_plx "\n", | |
405 | 405 | __FUNCTION__, offset); |
406 | 406 | } |
407 | 407 | } | ... | ... |
hw/spitz.c
... | ... | @@ -12,7 +12,11 @@ |
12 | 12 | #define spitz_printf(format, ...) \ |
13 | 13 | fprintf(stderr, "%s: " format, __FUNCTION__, ##__VA_ARGS__) |
14 | 14 | #undef REG_FMT |
15 | +#if TARGET_PHYS_ADDR_BITS == 32 | |
16 | +#define REG_FMT "0x%02x" | |
17 | +#else | |
15 | 18 | #define REG_FMT "0x%02lx" |
19 | +#endif | |
16 | 20 | |
17 | 21 | /* Spitz Flash */ |
18 | 22 | #define FLASH_BASE 0x0c000000 | ... | ... |