It's not ideal, because it requires modifying tracer.h. A more general
facility would allow overriding the instruction execution function for
a given opcode dynamically.
int xlen = 32;
reg_t npc = sext_xlen(pc + insn_length(OPCODE));
#include "insns/NAME.h"
+ trace_opcode(p, OPCODE, insn);
return npc;
}
int xlen = 64;
reg_t npc = sext_xlen(pc + insn_length(OPCODE));
#include "insns/NAME.h"
+ trace_opcode(p, OPCODE, insn);
return npc;
}
#include "mmu.h"
#include "mulhi.h"
#include "softfloat.h"
+#include "tracer.h"
#include "platform.h" // softfloat isNaNF32UI, etc.
#include "internals.h" // ditto
#include <assert.h>
--- /dev/null
+// See LICENSE for license details.
+
+#ifndef _RISCV_TRACER_H
+#define _RISCV_TRACER_H
+
+#include "processor.h"
+
+static inline void trace_opcode(processor_t* p, insn_bits_t opc, insn_t insn) {
+}
+
+#endif