diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-13 22:45:02 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-30 12:41:53 -0400 |
commit | 6cf75d895ad992f4f99f94bdcf469afe0482f8fa (patch) | |
tree | 8cc4f4b265de34da729bf2c46e8b1783d4cfd41a /sim | |
parent | 953fac6481598d64087f45030f243374ba599099 (diff) | |
download | gdb-6cf75d895ad992f4f99f94bdcf469afe0482f8fa.zip gdb-6cf75d895ad992f4f99f94bdcf469afe0482f8fa.tar.gz gdb-6cf75d895ad992f4f99f94bdcf469afe0482f8fa.tar.bz2 |
sim: move scache init to dynamic modules.c
Use the new modules.c framework to find & initialize this module.
Diffstat (limited to 'sim')
-rw-r--r-- | sim/common/ChangeLog | 7 | ||||
-rw-r--r-- | sim/common/cgen-scache.c | 6 | ||||
-rw-r--r-- | sim/common/cgen-scache.h | 3 | ||||
-rw-r--r-- | sim/common/sim-module.c | 3 |
4 files changed, 12 insertions, 7 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index c3c7d3e..c6fa33c 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,12 @@ 2021-06-30 Mike Frysinger <vapier@gentoo.org> + * cgen-scache.c (scache_install): Rename to ... + (sim_install_scache): ... this. New prototype. + * cgen-scache.h (scache_install): Delete. + * sim-module.c (early_modules): Delete scache_install. + +2021-06-30 Mike Frysinger <vapier@gentoo.org> + * sim-module.c (early_modules): Delete profile_install. * sim-profile.c (profile_install): Rename to ... (sim_install_profile): ... this. New prototype. diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c index f1c7571..c14d5d2 100644 --- a/sim/common/cgen-scache.c +++ b/sim/common/cgen-scache.c @@ -175,8 +175,12 @@ scache_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt, return SIM_RC_OK; } +/* Provide a prototype to silence -Wmissing-prototypes. */ +SIM_RC sim_install_scache (SIM_DESC sd); + +/* Install the simulator cache into the simulator. */ SIM_RC -scache_install (SIM_DESC sd) +sim_install_scache (SIM_DESC sd) { sim_add_option_table (sd, NULL, scache_options); sim_module_add_init_fn (sd, scache_init); diff --git a/sim/common/cgen-scache.h b/sim/common/cgen-scache.h index b197922..b435281 100644 --- a/sim/common/cgen-scache.h +++ b/sim/common/cgen-scache.h @@ -109,9 +109,6 @@ typedef struct cpu_scache { /* Non-zero if cache is in use. */ #define USING_SCACHE_P(sd) (STATE_SCACHE_SIZE (sd) > 0) -/* Install the simulator cache into the simulator. */ -MODULE_INSTALL_FN scache_install; - /* Lookup a PC value in the scache [compilation only]. */ extern SCACHE * scache_lookup (SIM_CPU *, IADDR); /* Return a pointer to at least N buffers. */ diff --git a/sim/common/sim-module.c b/sim/common/sim-module.c index 120785e..d2b220ab 100644 --- a/sim/common/sim-module.c +++ b/sim/common/sim-module.c @@ -40,9 +40,6 @@ static MODULE_INSTALL_FN * const early_modules[] = { sim_core_install, sim_memopt_install, sim_watchpoint_install, -#if WITH_SCACHE - scache_install, -#endif }; static int early_modules_len = ARRAY_SIZE (early_modules); |