From 6637a4265e6144f5a9ad29e9fa08aba4bd959cb9 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Mon, 9 Nov 2015 23:04:53 -0800 Subject: [PATCH] sim: cr16/d10v: localize translation funcs These functions are only used in the interp module, so there's no point in exporting them and declaring them in the external sim interface. --- include/gdb/ChangeLog | 9 +++++++++ include/gdb/sim-cr16.h | 23 ----------------------- include/gdb/sim-d10v.h | 23 ----------------------- sim/cr16/ChangeLog | 6 ++++++ sim/cr16/interp.c | 6 +++--- sim/d10v/ChangeLog | 6 ++++++ sim/d10v/interp.c | 6 +++--- 7 files changed, 27 insertions(+), 52 deletions(-) diff --git a/include/gdb/ChangeLog b/include/gdb/ChangeLog index 4d992d29a9b..57a83ce657e 100644 --- a/include/gdb/ChangeLog +++ b/include/gdb/ChangeLog @@ -1,3 +1,12 @@ +2015-11-10 Mike Frysinger + + * sim-cr16.h (sim_cr16_translate_dmap_addr): Delete. + (sim_cr16_translate_imap_addr): Likewise. + (sim_cr16_translate_addr): Likewise. + * sim-d10v.h (sim_d10v_translate_dmap_addr): Delete. + (sim_d10v_translate_imap_addr): Likewise. + (sim_d10v_translate_addr): Likewise. + 2015-06-17 Mike Frysinger * callback.h (CB_TARGET_DEFS_MAP): Add name member. diff --git a/include/gdb/sim-cr16.h b/include/gdb/sim-cr16.h index 4d4da0405d0..03f4b817e7c 100644 --- a/include/gdb/sim-cr16.h +++ b/include/gdb/sim-cr16.h @@ -33,29 +33,6 @@ enum SIM_CR16_MEMORY_IMAP = 0x10000000 }; -extern unsigned long sim_cr16_translate_dmap_addr - (unsigned long offset, - int nr_bytes, - unsigned long *phys, - void *regcache, - unsigned long (*dmap_register) (void *regcache, int reg_nr)); - -extern unsigned long sim_cr16_translate_imap_addr - (unsigned long offset, - int nr_bytes, - unsigned long *phys, - void *regcache, - unsigned long (*imap_register) (void *regcache, int reg_nr)); - -extern unsigned long sim_cr16_translate_addr - (unsigned long vaddr, - int nr_bytes, - unsigned long *phys, - void *regcache, - unsigned long (*dmap_register) (void *regcache, int reg_nr), - unsigned long (*imap_register) (void *regcache, int reg_nr)); - - /* The simulator makes use of the following register information. */ enum sim_cr16_regs diff --git a/include/gdb/sim-d10v.h b/include/gdb/sim-d10v.h index 5040dd60dab..34167669755 100644 --- a/include/gdb/sim-d10v.h +++ b/include/gdb/sim-d10v.h @@ -53,29 +53,6 @@ enum SIM_D10V_MEMORY_IMAP = 0x11000000 }; -extern unsigned long sim_d10v_translate_dmap_addr - (unsigned long offset, - int nr_bytes, - unsigned long *phys, - void *regcache, - unsigned long (*dmap_register) (void *regcache, int reg_nr)); - -extern unsigned long sim_d10v_translate_imap_addr - (unsigned long offset, - int nr_bytes, - unsigned long *phys, - void *regcache, - unsigned long (*imap_register) (void *regcache, int reg_nr)); - -extern unsigned long sim_d10v_translate_addr - (unsigned long vaddr, - int nr_bytes, - unsigned long *phys, - void *regcache, - unsigned long (*dmap_register) (void *regcache, int reg_nr), - unsigned long (*imap_register) (void *regcache, int reg_nr)); - - /* The simulator makes use of the following register information. */ enum sim_d10v_regs diff --git a/sim/cr16/ChangeLog b/sim/cr16/ChangeLog index e81bb585cbc..ccc4abb326a 100644 --- a/sim/cr16/ChangeLog +++ b/sim/cr16/ChangeLog @@ -1,3 +1,9 @@ +2015-11-10 Mike Frysinger + + * interp.c (sim_cr16_translate_dmap_addr): Mark static. + (sim_cr16_translate_imap_addr): Likewise. + (sim_cr16_translate_addr): Likewise. + 2015-06-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/cr16/interp.c b/sim/cr16/interp.c index 6e31e1a51c4..5b3f5bb81bf 100644 --- a/sim/cr16/interp.c +++ b/sim/cr16/interp.c @@ -426,7 +426,7 @@ imap_register (void *regcache, int reg_nr) /* Given a virtual address in the DMAP address space, translate it into a physical address. */ -unsigned long +static unsigned long sim_cr16_translate_dmap_addr (unsigned long offset, int nr_bytes, unsigned long *phys, @@ -489,7 +489,7 @@ sim_cr16_translate_dmap_addr (unsigned long offset, /* Given a virtual address in the IMAP address space, translate it into a physical address. */ -unsigned long +static unsigned long sim_cr16_translate_imap_addr (unsigned long offset, int nr_bytes, unsigned long *phys, @@ -542,7 +542,7 @@ sim_cr16_translate_imap_addr (unsigned long offset, return nr_bytes; } -unsigned long +static unsigned long sim_cr16_translate_addr (unsigned long memaddr, int nr_bytes, unsigned long *targ_addr, void *regcache, unsigned long (*dmap_register) (void *regcache, diff --git a/sim/d10v/ChangeLog b/sim/d10v/ChangeLog index aeef0a4534e..765d7a536ce 100644 --- a/sim/d10v/ChangeLog +++ b/sim/d10v/ChangeLog @@ -1,3 +1,9 @@ +2015-11-10 Mike Frysinger + + * interp.c (sim_d10v_translate_dmap_addr): Mark static. + (sim_d10v_translate_imap_addr): Likewise. + (sim_d10v_translate_addr): Likewise. + 2015-06-23 Mike Frysinger * configure: Regenerate. diff --git a/sim/d10v/interp.c b/sim/d10v/interp.c index b9755614423..9c059f72be7 100644 --- a/sim/d10v/interp.c +++ b/sim/d10v/interp.c @@ -388,7 +388,7 @@ set_spu_register (unsigned long value) /* Given a virtual address in the DMAP address space, translate it into a physical address. */ -unsigned long +static unsigned long sim_d10v_translate_dmap_addr (unsigned long offset, int nr_bytes, unsigned long *phys, @@ -448,7 +448,7 @@ sim_d10v_translate_dmap_addr (unsigned long offset, /* Given a virtual address in the IMAP address space, translate it into a physical address. */ -unsigned long +static unsigned long sim_d10v_translate_imap_addr (unsigned long offset, int nr_bytes, unsigned long *phys, @@ -501,7 +501,7 @@ sim_d10v_translate_imap_addr (unsigned long offset, return nr_bytes; } -unsigned long +static unsigned long sim_d10v_translate_addr (unsigned long memaddr, int nr_bytes, unsigned long *targ_addr, -- 2.30.2