[prev in list] [next in list] [prev in thread] [next in thread]
List: gdb-cvs
Subject: [binutils-gdb] sim: move scache init to dynamic modules.c
From: Michael Frysinger via Gdb-cvs <gdb-cvs () sourceware ! org>
Date: 2021-06-30 16:42:14
Message-ID: 20210630164214.2071138515E5 () sourceware ! org
[Download RAW message or body]
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6cf75d895ad992f4f99f94bdcf469afe0482f8fa
commit 6cf75d895ad992f4f99f94bdcf469afe0482f8fa
Author: Mike Frysinger <vapier@gentoo.org>
Date: Sun Jun 13 22:45:02 2021 -0400
sim: move scache init to dynamic modules.c
Use the new modules.c framework to find & initialize this module.
Diff:
---
sim/common/ChangeLog | 7 +++++++
sim/common/cgen-scache.c | 6 +++++-
sim/common/cgen-scache.h | 3 ---
sim/common/sim-module.c | 3 ---
4 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index c3c7d3e7b54..c6fa33ce5ee 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -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.
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
index f1c75714840..c14d5d22c6d 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 b197922bbc0..b43528101ab 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 120785e7690..d2b220ab3fb 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);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic