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);
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
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<<voffs), READ_REG(insn._rd()),
- insn._rd(), insn.rvc_lwsp_imm(), READ_REG(sp));
+ dest_pred & (1<<voffs), READ_REG(insn._rvc_rs2()),
+ insn._rvc_rs2(), insn.rvc_lwsp_imm(), READ_REG(sp));
#endif
#include INCLUDEFILE
#ifdef DEST_PREDINT
uint64_t _rvc_spoffs_imm(uint64_t elwidth, uint64_t baseoffs);
uint64_t rvc_lwsp_imm() { return _rvc_spoffs_imm(4, insn_t::rvc_lwsp_imm()); }
uint64_t rvc_ldsp_imm() { return _rvc_spoffs_imm(8, insn_t::rvc_ldsp_imm()); }
+ uint64_t rvc_swsp_imm() { return _rvc_spoffs_imm(4, insn_t::rvc_swsp_imm()); }
+ uint64_t rvc_sdsp_imm() { return _rvc_spoffs_imm(8, insn_t::rvc_sdsp_imm()); }
uint64_t rd () { return predicated(_rd (), *offs_rd, prd); }
uint64_t rs1() { return predicated(_rs1(), *offs_rs1, prs1); }
uint64_t rs2() { return predicated(_rs2(), *offs_rs2, prs2); }