sim: dv-cfi: fix printf format

Use the existing PRI constants to select the right format rather than
assume signed_cell is always %u.  Fixes building for riscv64.
This commit is contained in:
Mike Frysinger
2021-04-24 00:16:08 -04:00
parent 837b53fd08
commit 3886790f13
2 changed files with 5 additions and 1 deletions

View File

@@ -1,3 +1,7 @@
2021-04-24 Mike Frysinger <vapier@gentoo.org>
* dv-cfi.c (attach_cfi_regs): Change %u to PRIiTC.
2021-04-24 Mike Frysinger <vapier@gentoo.org> 2021-04-24 Mike Frysinger <vapier@gentoo.org>
* sim-options.c (ARG_HASH_SIZE): Increase to 256. * sim-options.c (ARG_HASH_SIZE): Increase to 256.

View File

@@ -610,7 +610,7 @@ attach_cfi_regs (struct hw *me, struct cfi *cfi)
if (cfi_cmdsets[i]->id == ival) if (cfi_cmdsets[i]->id == ival)
cfi->cmdset = cfi_cmdsets[i]; cfi->cmdset = cfi_cmdsets[i];
if (cfi->cmdset == NULL) if (cfi->cmdset == NULL)
hw_abort (me, "cmdset %u not supported", ival); hw_abort (me, "cmdset %" PRIiTC " not supported", ival);
if (ret == 2) if (ret == 2)
{ {