fix code template for when SPIKE_SIMPLEV is not defined
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 30 Sep 2018 03:25:55 +0000 (04:25 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 30 Sep 2018 03:25:55 +0000 (04:25 +0100)
riscv/insn_template.cc

index 61ec15f0097a3cc5e22e9c29010be97db802e6a5..ebfc02af4eca1fa242a63bf2f20c77d18bf5bad8 100644 (file)
@@ -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