From: Luke Kenneth Casson Leighton Date: Sun, 7 Oct 2018 03:51:10 +0000 (+0100) Subject: add rvc_swsp_imm sv overload, provides vector unit stride now X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f14cdda815e3142bccea710b4e5de9eeb5f6c9c3;p=riscv-isa-sim.git add rvc_swsp_imm sv overload, provides vector unit stride now --- diff --git a/riscv/insn_template_sv.cc b/riscv/insn_template_sv.cc index 5396eaa..f349384 100644 --- a/riscv/insn_template_sv.cc +++ b/riscv/insn_template_sv.cc @@ -37,9 +37,12 @@ reg_t FN(processor_t* p, insn_t s_insn, reg_t pc) xstr(INSN), INSNCODE, p->get_state()->prv, s_insn.rd(), s_insn.rs1(), s_insn.rs2(), vlen); -#if defined(INSN_TYPE_C_STACK_LD) || defined(INSN_TYPE_C_STACK_ST) +#ifdef INSN_TYPE_C_STACK_LD sp = insn._remap(X_SP, true, src_offs); #endif +#ifdef INSN_TYPE_C_STACK_ST + sp = insn._remap(X_SP, true, dest_offs); +#endif #ifdef INSN_CATEGORY_TWINPREDICATION #ifdef INSN_TYPE_C_STACK_LD src_pred = insn.predicate(sp, SRC_PREDINT, zeroingsrc); @@ -81,7 +84,7 @@ reg_t FN(processor_t* p, insn_t s_insn, reg_t pc) if (*dest_offs >= vlen) { break; } -#ifdef INSN_C_LWSP +#ifdef INSN_C_SWSP fprintf(stderr, "pre twin reg %s src %d dest %d pred %lx %lx\n", xstr(INSN), *src_offs, *dest_offs, src_pred, dest_pred); #endif @@ -112,13 +115,13 @@ reg_t FN(processor_t* p, insn_t s_insn, reg_t pc) xstr(INSN), *src_offs, *dest_offs, src_pred, dest_pred); } #endif -#ifdef INSN_C_LWSP +#ifdef INSN_C_SWSP fprintf(stderr, "pre %s %x vloop %d %d %d" \ - "vlen %d stop %d pred %lx rdv %lx rd %d rvc2 %d sp %lx\n", + "vlen %d stop %d pred %lx rdv %lx v %d rvc2 %d sp %lx\n", xstr(INSN), INSNCODE, voffs, *src_offs, *dest_offs, vlen, insn.stop_vloop(), - dest_pred & (1<