use correct printf format

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3611 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2007-11-11 19:47:59 +00:00
parent a702b35388
commit 444ce24195
3 changed files with 7 additions and 3 deletions

View File

@ -203,7 +203,7 @@ struct pxa2xx_i2s_s {
}; };
# define PA_FMT "0x%08lx" # define PA_FMT "0x%08lx"
# define REG_FMT "0x%lx" # define REG_FMT "0x" TARGET_FMT_plx
struct pxa2xx_state_s *pxa270_init(unsigned int sdram_size, DisplayState *ds, struct pxa2xx_state_s *pxa270_init(unsigned int sdram_size, DisplayState *ds,
const char *revision); const char *revision);

View File

@ -303,7 +303,7 @@ static uint32_t pxa2xx_dma_read(void *opaque, target_phys_addr_t offset)
} }
cpu_abort(cpu_single_env, cpu_abort(cpu_single_env,
"%s: Bad offset 0x%04lx\n", __FUNCTION__, offset); "%s: Bad offset 0x" TARGET_FMT_plx "\n", __FUNCTION__, offset);
return 7; return 7;
} }
@ -401,7 +401,7 @@ static void pxa2xx_dma_write(void *opaque,
break; break;
} }
fail: fail:
cpu_abort(cpu_single_env, "%s: Bad offset 0x%04lx\n", cpu_abort(cpu_single_env, "%s: Bad offset " TARGET_FMT_plx "\n",
__FUNCTION__, offset); __FUNCTION__, offset);
} }
} }

View File

@ -12,7 +12,11 @@
#define spitz_printf(format, ...) \ #define spitz_printf(format, ...) \
fprintf(stderr, "%s: " format, __FUNCTION__, ##__VA_ARGS__) fprintf(stderr, "%s: " format, __FUNCTION__, ##__VA_ARGS__)
#undef REG_FMT #undef REG_FMT
#if TARGET_PHYS_ADDR_BITS == 32
#define REG_FMT "0x%02x"
#else
#define REG_FMT "0x%02lx" #define REG_FMT "0x%02lx"
#endif
/* Spitz Flash */ /* Spitz Flash */
#define FLASH_BASE 0x0c000000 #define FLASH_BASE 0x0c000000