on branch, obtain the predicate inversion flag
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 29 Nov 2018 07:10:10 +0000 (07:10 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 29 Nov 2018 07:10:10 +0000 (07:10 +0000)
riscv/insn_template_sv.cc

index 4389fd6e0622b127dd74e83634cb52a52fe92496..a4ebbc4ef345767c9472a9a2968ec46c8ef5bfa4 100644 (file)
@@ -66,6 +66,7 @@ reg_t sv_proc_t::FN(processor_t* p, insn_t s_insn, reg_t pc)
 #ifdef INSN_TYPE_BRANCH
   reg_t target_pred = ~0x0;
   bool zeroingtarg = false;
+  bool invtarg = false;
 #endif
   sv_insn_t insn(p, sv_enabled, bits, floatintmap, xlen,
                  INSN_SRC_FLEN, INSN_DEST_FLEN,
@@ -109,9 +110,9 @@ reg_t sv_proc_t::FN(processor_t* p, insn_t s_insn, reg_t pc)
       _target_reg = r->regidx;
       target_reg = &_target_reg;
 #ifdef INSN_TYPE_C_BRANCH
-      insn.predicate(0, true, zeroingtarg);
+      target_pred = insn.predicate(0, true, zeroingtarg, invtarg);
 #else
-      insn.predicate(s_insn.rs2(), true, zeroingtarg);
+      target_pred = insn.predicate(s_insn.rs2(), true, zeroingtarg, invtarg);
 #endif
       fprintf(stderr, "branch pred reg %ld pred %lx\n",
                        _target_reg, target_pred);