aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sim/microblaze/ChangeLog6
-rw-r--r--sim/microblaze/interp.c2
-rw-r--r--sim/microblaze/microblaze.isa1
3 files changed, 9 insertions, 0 deletions
diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog
index 8300491..c78e896 100644
--- a/sim/microblaze/ChangeLog
+++ b/sim/microblaze/ChangeLog
@@ -1,5 +1,11 @@
2021-05-04 Mike Frysinger <vapier@gentoo.org>
+ * interp.c (sim_engine_run): Call TRACE_INSN.
+ (INSTRUCTION): Likewise.
+ * microblaze.isa (addi): Call TRACE_REGISTER.
+
+2021-05-04 Mike Frysinger <vapier@gentoo.org>
+
* interp.c: Include sim-syscall.h.
(sim_engine_run): Call sim_syscall for brki instructions.
diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c
index 1292918..bff7327 100644
--- a/sim/microblaze/interp.c
+++ b/sim/microblaze/interp.c
@@ -168,6 +168,7 @@ sim_engine_run (SIM_DESC sd,
{
insts += 1;
bonus_cycles++;
+ TRACE_INSN (cpu, "HALT (%i)", RETREG);
sim_engine_halt (sd, NULL, NULL, NULL_CIA, sim_exited, RETREG);
}
else
@@ -176,6 +177,7 @@ sim_engine_run (SIM_DESC sd,
{
#define INSTRUCTION(NAME, OPCODE, TYPE, ACTION) \
case NAME: \
+ TRACE_INSN (cpu, #NAME); \
ACTION; \
break;
#include "microblaze.isa"
diff --git a/sim/microblaze/microblaze.isa b/sim/microblaze/microblaze.isa
index a7ac0d4..1d96e8f 100644
--- a/sim/microblaze/microblaze.isa
+++ b/sim/microblaze/microblaze.isa
@@ -110,6 +110,7 @@ INSTRUCTION(addi,
INST_TYPE_RD_RA_IMM,
CARRY = C_calc(RA, IMM, 0);
RD = RA + IMM;
+ TRACE_REGISTER (cpu, "r%i = r%i + %i", rd, ra, IMM);
C_wr(CARRY);
PC += INST_SIZE)