diff options
author | Mike Frysinger <vapier@gentoo.org> | 2021-06-28 22:39:16 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2021-06-30 13:33:18 -0400 |
commit | b79efe264f9d2d4fc5b0491acd3258063b309723 (patch) | |
tree | 75808110808964a8813af7df9a5e8cf03b547dc7 /sim/common | |
parent | e7954ef5e5ed90fb7d28c013518f4c2e6bcd20a1 (diff) | |
download | gdb-b79efe264f9d2d4fc5b0491acd3258063b309723.zip gdb-b79efe264f9d2d4fc5b0491acd3258063b309723.tar.gz gdb-b79efe264f9d2d4fc5b0491acd3258063b309723.tar.bz2 |
sim: unify scache settings
The cgen scache module is enabled by every cgen port, and with the
same default value of 16k (which matches the common default value).
Let's pull this option out of the individual ports (via CPPFLAGS)
and into the common code (via config.h).
The object itself is compiled only for cgen ports atm, so that part
doesn't change. The scache code is initialized dynamically via the
modules.c logic. That's why the profile code needs an additional
CGEN_ARCH check.
This will allow us to collapse arch configure files more. Merging
the source files will require more future work, but integrating the
cgen & non-cgen worlds itself will take a lot.
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 6 | ||||
-rw-r--r-- | sim/common/Make-common.in | 2 | ||||
-rw-r--r-- | sim/common/cgen-scache.h | 4 | ||||
-rw-r--r-- | sim/common/sim-profile.c | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index c6fa33c..5b167eb 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,11 @@ 2021-06-30 Mike Frysinger <vapier@gentoo.org> + * Make-common.in (SIM_SCACHE): Delete. + * cgen-scache.h (WITH_SCACHE): Delete. + * sim-profile.c (profile_info): Check CGEN_ARCH. + +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. diff --git a/sim/common/Make-common.in b/sim/common/Make-common.in index 992fd7f..e7c1cce 100644 --- a/sim/common/Make-common.in +++ b/sim/common/Make-common.in @@ -75,7 +75,6 @@ SHELL = @SHELL@ SIM_BITSIZE = @sim_bitsize@ SIM_FLOAT = @sim_float@ SIM_RESERVED_BITS = @sim_reserved_bits@ -SIM_SCACHE = @sim_scache@ SIM_WARN_CFLAGS = $(WARN_CFLAGS) SIM_WERROR_CFLAGS = $(WERROR_CFLAGS) @@ -199,7 +198,6 @@ CONFIG_CFLAGS = \ $(SIM_HW_CFLAGS) \ $(SIM_INLINE) \ $(SIM_RESERVED_BITS) \ - $(SIM_SCACHE) \ $(SIM_WARN_CFLAGS) \ $(SIM_WERROR_CFLAGS) \ $(SIM_HARDWARE) diff --git a/sim/common/cgen-scache.h b/sim/common/cgen-scache.h index b435281..70ea090 100644 --- a/sim/common/cgen-scache.h +++ b/sim/common/cgen-scache.h @@ -20,10 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ #ifndef CGEN_SCACHE_H #define CGEN_SCACHE_H -#ifndef WITH_SCACHE -#define WITH_SCACHE 0 -#endif - /* When caching bb's, instructions are extracted into "chains". SCACHE_MAP is a hash table into these chains. */ diff --git a/sim/common/sim-profile.c b/sim/common/sim-profile.c index 3a8ed1f..1459ae7 100644 --- a/sim/common/sim-profile.c +++ b/sim/common/sim-profile.c @@ -1152,7 +1152,7 @@ profile_info (SIM_DESC sd, int verbose) #if WITH_PROFILE_MODEL_P || PROFILE_FLAGS (data) [PROFILE_MODEL_IDX] #endif -#if WITH_PROFILE_SCACHE_P && WITH_SCACHE +#if WITH_PROFILE_SCACHE_P && WITH_SCACHE && defined(CGEN_ARCH) || PROFILE_FLAGS (data) [PROFILE_SCACHE_IDX] #endif #if WITH_PROFILE_PC_P @@ -1190,7 +1190,7 @@ profile_info (SIM_DESC sd, int verbose) profile_print_model (cpu, verbose); #endif -#if WITH_PROFILE_SCACHE_P && WITH_SCACHE +#if WITH_PROFILE_SCACHE_P && WITH_SCACHE && defined(CGEN_ARCH) if (PROFILE_FLAGS (data) [PROFILE_SCACHE_IDX]) scache_print_profile (cpu, verbose); #endif |