aboutsummaryrefslogtreecommitdiff
path: root/sim/common/cgen-scache.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2023-12-06 06:39:49 -0700
committerMike Frysinger <vapier@gentoo.org>2023-12-19 05:51:09 -0500
commit715dd70c299d20fe4c494de23c5ecf59fdd03bb2 (patch)
tree80a8d0796afe2616f9360d44e0eff579b0094954 /sim/common/cgen-scache.c
parente9026cfbcfa4769e1c328dd45798d4483e37fc5d (diff)
downloadgdb-715dd70c299d20fe4c494de23c5ecf59fdd03bb2.zip
gdb-715dd70c299d20fe4c494de23c5ecf59fdd03bb2.tar.gz
gdb-715dd70c299d20fe4c494de23c5ecf59fdd03bb2.tar.bz2
sim: common: fix -Wunused-variable warnings
Diffstat (limited to 'sim/common/cgen-scache.c')
-rw-r--r--sim/common/cgen-scache.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sim/common/cgen-scache.c b/sim/common/cgen-scache.c
index c6de30e..46dada7 100644
--- a/sim/common/cgen-scache.c
+++ b/sim/common/cgen-scache.c
@@ -276,7 +276,10 @@ scache_flush (SIM_DESC sd)
void
scache_flush_cpu (SIM_CPU *cpu)
{
- int i,n;
+ int i;
+#if WITH_SCACHE_PBB
+ int n;
+#endif
/* Don't bother if cache not in use. */
if (CPU_SCACHE_SIZE (cpu) == 0)
@@ -426,9 +429,6 @@ scache_print_profile (SIM_CPU *cpu, bool verbose)
unsigned long hits = CPU_SCACHE_HITS (cpu);
unsigned long misses = CPU_SCACHE_MISSES (cpu);
char buf[20];
- unsigned long max_val;
- unsigned long *lengths;
- int i;
if (CPU_SCACHE_SIZE (cpu) == 0)
return;
@@ -460,6 +460,10 @@ scache_print_profile (SIM_CPU *cpu, bool verbose)
if (verbose)
{
+ unsigned long max_val;
+ unsigned long *lengths;
+ int i;
+
sim_io_printf (sd, " Insn chain lengths:\n\n");
max_val = 0;
lengths = CPU_SCACHE_CHAIN_LENGTHS (cpu);