Line 107... |
Line 107... |
int sbuf_wait_cyc = 0;
|
int sbuf_wait_cyc = 0;
|
|
|
/* Number of total store cycles */
|
/* Number of total store cycles */
|
int sbuf_total_cyc = 0;
|
int sbuf_total_cyc = 0;
|
|
|
|
/* Whether we are doing statistical analysis */
|
|
int do_stats = 0;
|
|
|
/* Local data needed for execution. */
|
/* Local data needed for execution. */
|
static int next_delay_insn;
|
static int next_delay_insn;
|
static int breakpoint;
|
static int breakpoint;
|
static unsigned long *op;
|
static unsigned long *op;
|
static int num_op;
|
static int num_op;
|
Line 515... |
Line 518... |
/* History of execution */
|
/* History of execution */
|
for (i = HISTEXEC_LEN - 1; i; i--)
|
for (i = HISTEXEC_LEN - 1; i; i--)
|
histexec[i] = histexec[i - 1];
|
histexec[i] = histexec[i - 1];
|
histexec[0] = icomplet[0].insn_addr; /* add last insn */
|
histexec[0] = icomplet[0].insn_addr; /* add last insn */
|
}
|
}
|
|
|
|
if (config.sim.exe_log) dump_exe_log();
|
}
|
}
|
|
|
/* Store buffer analysis - stores are accumulated and commited when IO is idle */
|
/* Store buffer analysis - stores are accumulated and commited when IO is idle */
|
static inline sbuf_store (int cyc) {
|
static inline sbuf_store (int cyc) {
|
int delta = cycles - sbuf_prev_cycles;
|
int delta = cycles - sbuf_prev_cycles;
|
Line 606... |
Line 611... |
break;
|
break;
|
case EXE_LOG_SIMPLE:
|
case EXE_LOG_SIMPLE:
|
case EXE_LOG_SOFTWARE:
|
case EXE_LOG_SOFTWARE:
|
{
|
{
|
extern char *disassembled;
|
extern char *disassembled;
|
int labels = 0;
|
|
disassemble_index (iqueue[0].insn, iqueue[0].insn_index);
|
disassemble_index (iqueue[0].insn, iqueue[0].insn_index);
|
if (verify_memoryarea(i)) {
|
{
|
struct label_entry *entry;
|
struct label_entry *entry;
|
entry = get_label(i);
|
entry = get_label(i);
|
if (entry) {
|
if (entry)
|
fprintf (runtime.sim.fexe_log, "%s: ", entry->name);
|
fprintf (runtime.sim.fexe_log, "%s:\n", entry->name);
|
labels++;
|
|
}
|
}
|
} else {
|
|
fprintf (runtime.sim.fexe_log, "<invalid addr>: ");
|
|
labels++;
|
|
}
|
|
|
|
if (labels) fprintf (runtime.sim.fexe_log, "\n");
|
|
|
|
if (config.sim.exe_log_type == EXE_LOG_SOFTWARE) {
|
if (config.sim.exe_log_type == EXE_LOG_SOFTWARE) {
|
int i;
|
int i;
|
for (i = 0; i < num_op; i++)
|
for (i = 0; i < num_op; i++)
|
if (op[i + MAX_OPERANDS] & OPTYPE_DIS) {
|
if (op[i + MAX_OPERANDS] & OPTYPE_DIS) {
|
Line 634... |
Line 631... |
} else
|
} else
|
fprintf (runtime.sim.fexe_log, " ");
|
fprintf (runtime.sim.fexe_log, " ");
|
for (; i < 3; i++)
|
for (; i < 3; i++)
|
fprintf (runtime.sim.fexe_log, " ");
|
fprintf (runtime.sim.fexe_log, " ");
|
}
|
}
|
|
|
fprintf (runtime.sim.fexe_log, "%.8lx ", i);
|
fprintf (runtime.sim.fexe_log, "%.8lx ", i);
|
fprintf (runtime.sim.fexe_log, "%s\n", disassembled);
|
fprintf (runtime.sim.fexe_log, "%s\n", disassembled);
|
}
|
}
|
}
|
}
|
}
|
}
|
Line 754... |
Line 750... |
cont_run = 0; /* memory breakpoint encountered */
|
cont_run = 0; /* memory breakpoint encountered */
|
return 1;
|
return 1;
|
}
|
}
|
decode_execute_wrapper (&iqueue[0]);
|
decode_execute_wrapper (&iqueue[0]);
|
update_pc();
|
update_pc();
|
analysis(&iqueue[0]);
|
if (do_stats) analysis(&iqueue[0]);
|
if (config.sim.exe_log) dump_exe_log();
|
|
return 0;
|
return 0;
|
}
|
}
|
|
|
/* If decoding cannot be found, call this function */
|
/* If decoding cannot be found, call this function */
|
void l_invalid () {
|
void l_invalid () {
|