From: Luke Kenneth Casson Leighton Date: Mon, 15 Oct 2018 09:26:14 +0000 (+0100) Subject: whoops deref null pointer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2b0d56d5a10453ae1756e99adb1dc41f0b889ce7;p=riscv-isa-sim.git whoops deref null pointer --- diff --git a/riscv/insn_template_sv.cc b/riscv/insn_template_sv.cc index d301b05..07be017 100644 --- a/riscv/insn_template_sv.cc +++ b/riscv/insn_template_sv.cc @@ -140,7 +140,7 @@ reg_t sv_proc_t::FN(processor_t* p, insn_t s_insn, reg_t pc) insn.reset_vloop_check(); #ifdef INSN_C_BEQZ fprintf(stderr, "pre twin reg %s src %d dest %d pred %lx %lx\n", - xstr(INSN), *target_reg, *dest_offs, target_pred, dest_pred); + xstr(INSN), _target_reg, *dest_offs, target_pred, dest_pred); #endif #ifdef INSN_CATEGORY_TWINPREDICATION if (*src_offs >= vlen) { @@ -199,7 +199,7 @@ reg_t sv_proc_t::FN(processor_t* p, insn_t s_insn, reg_t pc) #ifdef INSN_C_BEQZ fprintf(stderr, "pre %s %x vloop %d %d %d" \ "vlen %d stop %d pred %lx rdv %lx rvc_rs1 %d\n", - xstr(INSN), INSNCODE, voffs, *target_reg, *dest_offs, + xstr(INSN), INSNCODE, voffs, _target_reg, *dest_offs, vlen, insn.stop_vloop(), dest_pred & (1<