From: Luke Kenneth Casson Leighton Date: Sun, 30 Sep 2018 03:25:55 +0000 (+0100) Subject: fix code template for when SPIKE_SIMPLEV is not defined X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=5a607e9bcd974ce7e554191d88d8d9b9c9f97124;p=riscv-isa-sim.git fix code template for when SPIKE_SIMPLEV is not defined --- 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