From: Mike Frysinger Date: Tue, 27 Apr 2021 03:17:15 +0000 (-0400) Subject: sim: microblaze: enable some basic trace points X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4d47dcfcf1cf8fa34df057b0d5accf7ab91b6b47;p=binutils-gdb.git sim: microblaze: enable some basic trace points This isn't super complete, but it's useful enough as-is. --- diff --git a/sim/microblaze/ChangeLog b/sim/microblaze/ChangeLog index 8300491731d..c78e896f4c7 100644 --- a/sim/microblaze/ChangeLog +++ b/sim/microblaze/ChangeLog @@ -1,3 +1,9 @@ +2021-05-04 Mike Frysinger + + * interp.c (sim_engine_run): Call TRACE_INSN. + (INSTRUCTION): Likewise. + * microblaze.isa (addi): Call TRACE_REGISTER. + 2021-05-04 Mike Frysinger * interp.c: Include sim-syscall.h. diff --git a/sim/microblaze/interp.c b/sim/microblaze/interp.c index 129291895d1..bff73279d26 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 a7ac0d4562b..1d96e8fc1c7 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)