From 5a607e9bcd974ce7e554191d88d8d9b9c9f97124 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Sun, 30 Sep 2018 04:25:55 +0100 Subject: [PATCH] fix code template for when SPIKE_SIMPLEV is not defined --- riscv/insn_template.cc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/riscv/insn_template.cc b/riscv/insn_template.cc index 61ec15f..ebfc02a 100644 --- a/riscv/insn_template.cc +++ b/riscv/insn_template.cc @@ -18,6 +18,7 @@ * weird macro names is to avoid e.g. #define INSOPCODE OPCODE being * substituted as "#define INSadd add" during the awk/sed processing. */ + #define INSN NAME #define INCLUDEFILE "insns/NAME.h" #define INSNCODE OPCODE @@ -38,20 +39,17 @@ reg_t rv32_NAME(processor_t* p, insn_t insn, reg_t pc) { int xlen = 32; reg_t npc = sext_xlen(pc + insn_length(OPCODE)); - insn_bits_t bits = s_insn.bits(); #include "insns/NAME.h" - trace_opcode(p, OPCODE, s_insn); + trace_opcode(p, OPCODE, insn); return npc; } -reg_t rv64_NAME(processor_t* p, insn_t s_insn, reg_t pc) +reg_t rv64_NAME(processor_t* p, insn_t insn, reg_t pc) { int xlen = 64; reg_t npc = sext_xlen(pc + insn_length(OPCODE)); - insn_bits_t bits = s_insn.bits(); - insn_t insn(bits); #include "insns/NAME.h" - trace_opcode(p, OPCODE, s_insn); + trace_opcode(p, OPCODE, insn); return npc; } #endif -- 2.30.2