sim: move scache init to dynamic modules.c
authorMike Frysinger <vapier@gentoo.org>
Mon, 14 Jun 2021 02:45:02 +0000 (22:45 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 30 Jun 2021 16:41:53 +0000 (12:41 -0400)
Use the new modules.c framework to find & initialize this module.

sim/common/ChangeLog
sim/common/cgen-scache.c
sim/common/cgen-scache.h
sim/common/sim-module.c

index c3c7d3e7b5413716a9072c2663f3b12de79f98f8..c6fa33ce5ee8b635d2bf13d06c54ccd22614843e 100644 (file)
@@ -1,3 +1,10 @@
+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.
index f1c75714840230c85ae5679bf91573f424c1e790..c14d5d22c6d6819f3ec7b4899c4b2c74279a79b8 100644 (file)
@@ -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);
index b197922bbc07b32f8dd66b8c2e657fe1f7530849..b43528101abec6641ae3465e8d8d1aca4c2b2fca 100644 (file)
@@ -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.  */
index 120785e769067a0334dd29b01127bd66a1720df5..d2b220ab3fb2bce9933549e451a077f7ef33a0d2 100644 (file)
@@ -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);
 
This page took 0.028795 seconds and 4 git commands to generate.