move sv_insn_t constructor to c file
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Oct 2018 07:53:58 +0000 (08:53 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Sun, 21 Oct 2018 07:53:58 +0000 (08:53 +0100)
riscv/sv.cc
riscv/sv_decode.h

index f1a302dedf0d609574fecbc6a06bd4fc646eace6..9d6a637ea09b53170bccc7d005fee45f8d836c8b 100644 (file)
@@ -2,6 +2,22 @@
 #include "sv_decode.h"
 #include "processor.h"
 
+sv_insn_t::sv_insn_t(processor_t *pr, bool _sv_enabled,
+            insn_bits_t bits, unsigned int f,
+            uint64_t &p_rd, uint64_t &p_rs1, uint64_t &p_rs2, uint64_t &p_rs3,
+            uint64_t &p_sp, uint64_t *p_im,
+            int *o_rd, int *o_rs1, int *o_rs2, int *o_rs3, int *o_sp,
+            int *o_imm) :
+            insn_t(bits), p(pr), sv_enabled(_sv_enabled), vloop_continue(false),
+            at_least_one_reg_vectorised(false), fimap(f),
+            offs_rd(o_rd), offs_rs1(o_rs1), offs_rs2(o_rs2), offs_rs3(o_rs3),
+            offs_sp(o_sp),
+            offs_imm(o_imm),
+            prd(p_rd), prs1(p_rs1), prs2(p_rs2), prs3(p_rs3), psp(p_sp),
+            save_branch_addr(0)
+{
+}
+
 sv_pred_entry* sv_insn_t::get_predentry(uint64_t reg, bool intreg)
 {
   // okaay so first determine which map to use.  intreg is passed
index c1e3854387df475a077488fc6c59d7f01cfa0257..9dfb890b9c35c640793a54e8518f699ff8bc6744 100644 (file)
@@ -29,14 +29,7 @@ public:
             uint64_t &p_rd, uint64_t &p_rs1, uint64_t &p_rs2, uint64_t &p_rs3,
             uint64_t &p_sp, uint64_t *p_im,
             int *o_rd, int *o_rs1, int *o_rs2, int *o_rs3, int *o_sp,
-            int *o_imm) :
-            insn_t(bits), p(pr), sv_enabled(_sv_enabled), vloop_continue(false),
-            at_least_one_reg_vectorised(false), fimap(f),
-            offs_rd(o_rd), offs_rs1(o_rs1), offs_rs2(o_rs2), offs_rs3(o_rs3),
-            offs_sp(o_sp),
-            offs_imm(o_imm),
-            prd(p_rd), prs1(p_rs1), prs2(p_rs2), prs3(p_rs3), psp(p_sp),
-            save_branch_addr(0) {}
+            int *o_imm);
 
   uint8_t reg_elwidth(reg_t reg, bool intreg);
   sv_reg_t rvc_addi4spn_imm() { return sv_reg_t(insn_t::rvc_addi4spn_imm()); }