unsigned int sv_proc_t::pred_remap(reg_t reg, int bit)
{
- reg_spec_t rs = {reg, &bit};
+ int ignore_subvl = 0; // predication does not use subvl
+ reg_spec_t rs = {reg, &bit, &ignore_subvl};
return remap(rs, true);
}
unsigned int sv_proc_t::remap(reg_spec_t const& spec, bool pred)
{
unsigned int offs = *spec.offset;
+ unsigned int subo = *spec.suboff;
+ // this is where (after all the fuss, passing info around) the actual
+ // register offset is computed. if subvl is active, it's a multiplier
+ //fprintf(stderr, "remap %ld subvl %ld offs %ld subo %ld\n",
+ // spec.reg, p->get_state()->sv().subvl, offs, subo);
+ offs = offs * p->get_state()->sv().subvl + subo;
sv_shape_t *shape = p->get_state()->get_shape(spec.reg, pred);
if (shape == NULL) {
return offs;
sv_reg_t sv_proc_t::get_rvc_sp()
{
- return get_intreg({X_SP, _insn->get_sp_offs()});
+ return get_intreg({X_SP, _insn->get_sp_offs(), _insn->get_sp_subo()});
}
#define GET_FPREG(name, getter) \