/* restore R1 - R14 */
- for (size_t i = 1; i < 15; i++)
+ for (unsigned i = 1; i < 15; i++)
{
if (!arm11->reg_list[ARM11_RC_RX + i].dirty)
continue;
/* MRC p14,0,r?,c0,c5,0 */
- arm11_run_instr_data_to_core1(arm11, 0xee100e15 | (i << 12), R(RX + i));
+ arm11_run_instr_data_to_core1(arm11,
+ 0xee100e15 | (i << 12), R(RX + i));
- // LOG_DEBUG("RESTORE R" ZU " %08x", i, R(RX + i));
+ // LOG_DEBUG("RESTORE R%u %08x", i, R(RX + i));
}
retval = arm11_run_instr_data_finish(arm11);
/* set all breakpoints */
- size_t brp_num = 0;
+ unsigned brp_num = 0;
for (bp = target->breakpoints; bp; bp = bp->next)
{
arm11_sc7_run(arm11, brp, ARRAY_SIZE(brp));
- LOG_DEBUG("Add BP " ZU " at %08" PRIx32 "", brp_num, bp->address);
+ LOG_DEBUG("Add BP %d at %08" PRIx32, brp_num,
+ bp->address);
brp_num++;
}
ARM11_REGCACHE_COUNT != ARRAY_SIZE(arm11_reg_defs) ||
ARM11_REGCACHE_COUNT != ARM11_RC_MAX)
{
- LOG_ERROR("BUG: arm11->reg_values inconsistent (%d " ZU " " ZU " %d)", ARM11_REGCACHE_COUNT, ARRAY_SIZE(arm11->reg_values), ARRAY_SIZE(arm11_reg_defs), ARM11_RC_MAX);
+ LOG_ERROR("BUG: arm11->reg_values inconsistent (%d %u %u %d)",
+ ARM11_REGCACHE_COUNT,
+ (unsigned) ARRAY_SIZE(arm11->reg_values),
+ (unsigned) ARRAY_SIZE(arm11_reg_defs),
+ ARM11_RC_MAX);
+ /* FIXME minimally, use a build_bug_on(X) mechanism;
+ * runtime exit() here is bad!
+ */
exit(-1);
}
#define NEW(type, variable, items) \
type * variable = calloc(1, sizeof(type) * items)
-/* For MinGW use 'I' prefix to print size_t (instead of 'z') */
-/* Except if __USE_MINGW_ANSI_STDIO is defined with MinGW */
-
-#if (!defined(__MSVCRT__) || defined(__USE_MINGW_ANSI_STDIO))
-#define ZU "%zu"
-#else
-#define ZU "%Iu"
-#endif
-
-
/* TEMPORARY -- till we switch to the shared infrastructure */
#define ARM11_REGCACHE_COUNT 20
arm11_setup_field(arm11, 1, NULL, NULL, chain5_fields + 2);
uint8_t *Readies;
- size_t readiesNum = (count + 1);
- size_t bytes = sizeof(*Readies)*readiesNum;
+ unsigned readiesNum = count + 1;
+ unsigned bytes = sizeof(*Readies)*readiesNum;
+
Readies = (uint8_t *) malloc(bytes);
if (Readies == NULL)
{
- LOG_ERROR("Out of memory allocating " ZU " bytes", bytes);
+ LOG_ERROR("Out of memory allocating %u bytes", bytes);
return ERROR_FAIL;
}
int retval = jtag_execute_queue();
if (retval == ERROR_OK)
{
- size_t error_count = 0;
+ unsigned error_count = 0;
for (size_t i = 0; i < readiesNum; i++)
{
}
if (error_count > 0 )
- LOG_ERROR(ZU " words out of " ZU " not transferred", error_count, readiesNum);
+ LOG_ERROR("%u words out of %u not transferred",
+ error_count, readiesNum);
}