diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-05-03 23:27:16 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-05-04 08:13:45 -0400 |
commit | 5ee0bc23a68fe2a6a7717b31fda1db878b2c9764 (patch) | |
tree | 89d9ac8cad39ef7afdf6dfa1d93a5f06b87a440f /sim/d10v | |
parent | 225bda24db9671e2087fda892f94141625836a40 (diff) | |
download | fsf-binutils-gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.zip fsf-binutils-gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.tar.gz fsf-binutils-gdb-5ee0bc23a68fe2a6a7717b31fda1db878b2c9764.tar.bz2 |
sim: clean up bfd_vma printing
A lot of this code predates the bfd_vma format define, so we have a
random mix of casts to known types so we can printf the value. Use
the BFD_VMA_FMT that now exists to simplify and reliability output
across different build configs.
Diffstat (limited to 'sim/d10v')
-rw-r--r-- | sim/d10v/ChangeLog | 5 | ||||
-rw-r--r-- | sim/d10v/d10v_sim.h | 1 | ||||
-rw-r--r-- | sim/d10v/interp.c | 3 |
3 files changed, 7 insertions, 2 deletions
diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index ebe6cd3..bbf97d2 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,8 @@ +2021-05-04 Mike Frysinger <vapier@gentoo.org> + + * d10v_sim.h (decode_pc): Delete. + * interp.c (sim_create_inferior): Use BFD_VMA_FMT. + 2021-05-01 Mike Frysinger <vapier@gentoo.org> * config.in, configure: Regenerate. diff --git a/sim/d10v/d10v_sim.h b/sim/d10v/d10v_sim.h index a3755bf..64f974f 100644 --- a/sim/d10v/d10v_sim.h +++ b/sim/d10v/d10v_sim.h @@ -444,7 +444,6 @@ while (0) extern uint8 *dmem_addr (SIM_DESC, SIM_CPU *, uint16 offset); extern uint8 *imem_addr (SIM_DESC, SIM_CPU *, uint32); -extern bfd_vma decode_pc (void); #define RB(x) (*(dmem_addr (sd, cpu, x))) #define SB(addr,data) ( RB(addr) = (data & 0xff)) diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index 90c171e..86e566a 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -1160,7 +1160,8 @@ sim_create_inferior (SIM_DESC sd, struct bfd *abfd, start_address = 0xffc0 << 2; #ifdef DEBUG if (d10v_debug) - sim_io_printf (sd, "sim_create_inferior: PC=0x%lx\n", (long) start_address); + sim_io_printf (sd, "sim_create_inferior: PC=0x%" BFD_VMA_FMT "x\n", + start_address); #endif { SIM_CPU *cpu = STATE_CPU (sd, 0); |