aboutsummaryrefslogtreecommitdiff
path: root/sim/common/cgen-scache.c
diff options
context:
space:
mode:
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);