bool zeroingsrc = false;
#endif
sv_insn_t insn(p, bits, floatintmap, PRED_ARGS, OFFS_ARGS);
+ reg_t sp = 0;
if (vlen > 0)
{
fprintf(stderr, "pre-ex reg %s %x %ld rd %ld rs1 %ld rs2 %ld vlen %d\n",
vlen);
#ifdef INSN_CATEGORY_TWINPREDICATION
#ifdef INSN_TYPE_C_STACK_LD
- src_pred = insn.predicate(X_SP, SRC_PREDINT, zeroingsrc);
+ sp = insn._remap(X_SP, true, src_offs);
+ src_pred = insn.predicate(sp, SRC_PREDINT, zeroingsrc);
#else
src_pred = insn.predicate(s_insn.SRC_REG(), SRC_PREDINT, zeroingsrc);
#endif
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(X_SP));
+ insn._rd(), insn.rvc_lwsp_imm(), READ_REG(sp));
#endif
#include INCLUDEFILE
#ifdef DEST_PREDINT
bool stop_vloop(void);
processor_t *p;
+
+ // cached version of remap: if remap is called multiple times
+ // by an emulated instruction it would increment the loop offset
+ // before it's supposed to.
+ uint64_t _remap(uint64_t reg, bool isint, int *offs)
+ {
+ if (sv_check_reg(isint, reg))
+ {
+ vloop_continue = true;
+ }
+ return remap(reg, isint, *offs);
+ }
+
private:
bool vloop_continue;
unsigned int fimap;
// will need to take the current loop index/offset somehow
uint64_t remap(uint64_t reg, bool isint, int offs);
- // cached version of remap: if remap is called multiple times
- // by an emulated instruction it would increment the loop offset
- // before it's supposed to.
- uint64_t _remap(uint64_t reg, bool isint, int *offs)
- {
- if (sv_check_reg(isint, reg))
- {
- vloop_continue = true;
- }
- return remap(reg, isint, *offs);
- }
-
uint64_t predicated(uint64_t reg, int offs, uint64_t pred);
};