sim: common: fix printf formats
For 32-bit targets, %x happens to work for unsigned_word. But for 64-bit targets, it's too small, and gcc throws an error. Use the right printf format define for them.
This commit is contained in:
parent
933306703a
commit
90e123dd60
@ -1,3 +1,7 @@
|
||||
2021-01-11 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* sim-core.c (sim_memory_map): Change %#x to PRIxTW.
|
||||
|
||||
2021-01-11 Mike Frysinger <vapier@gentoo.org>
|
||||
|
||||
* acinclude.m4 (SIM_AC_COMMON): Delete checks for stdlib.h, string.h,
|
||||
|
||||
@ -480,7 +480,8 @@ sim_memory_map (SIM_DESC sd)
|
||||
if (mapping->level != 0)
|
||||
continue;
|
||||
|
||||
entry = xasprintf ("<memory type='ram' start='%#x' length='%#x'/>\n",
|
||||
entry = xasprintf ("<memory type='ram' start='%#" PRIxTW "' "
|
||||
"length='%#" PRIxTW "'/>\n",
|
||||
mapping->base, mapping->nr_bytes);
|
||||
/* The sim memory map is organized by access, not by addresses.
|
||||
So a RWX memory map will have three independent mappings.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user