reg_t _target_reg = 0;
reg_t *target_reg = NULL;
#endif
- reg_spec_t sp = {0, insn.get_sp_offs()};
+ reg_spec_t sp = {0, NULL};
if (vlen > 0)
{
fprintf(stderr, "pre-ex reg %s %x %ld rd %ld rs1 %ld rs2 %ld vlen %d\n",
// aaand now, as it's a "vector", FINALLY we can pass the loop-offset
spec.reg = reg; //+ *voffs;
spec.offset = voffs;
+ spec.isvec = r->isvec;
return spec;
}
fprintf(stderr, "predication %ld %d %lx\n", spec.reg, (*spec.offset), pred);
res.reg = 0;
res.offset = 0;
+ res.isvec = false;
return res;
}
// STATE.XPR.write(reg, value);
//}
+//#define OFFSDIV
+
void (sv_proc_t::DO_WRITE_FREG)(reg_spec_t const& spec, freg_t const& value)
{
//WRITE_REG( reg, value ); // XXX TODO: replace properly
STATE.XPR.write(reg, value);
}
-//void (sv_proc_t::WRITE_REG)(reg_t reg, uint64_t value)
-//{
-// //WRITE_REG( reg, value ); // XXX TODO: replace properly
-// STATE.XPR.write(reg, value);
-//}
-
-/*
-void (sv_proc_t::WRITE_RD)(int_fast64_t value)
-{
- WRITE_REG( _insn->rd(), value ); // XXX TODO: replace properly
-}
-
-void (sv_proc_t::WRITE_RD)(uint_fast64_t value)
-{
- WRITE_REG( _insn->rd(), value ); // XXX TODO: replace properly
-}
-*/
-
freg_t (sv_proc_t::READ_FREG)(reg_spec_t const& spec)
{
reg_t reg = spec.reg;
uint8_t elwidth = _insn->reg_elwidth(reg, true);
- if (spec.offset && spec.reg != 2) {
+ if (spec.offset) {
reg += *spec.offset;
}
return _insn->p->get_state()->FPR[reg]; // XXX TODO: offset
{
reg_t reg = spec.reg;
uint8_t elwidth = _insn->reg_elwidth(reg, true);
- if (spec.offset && spec.reg != 2) {
+ if (spec.offset && spec.reg != 2) { // XXX HACK on spec.reg != 2
reg += *spec.offset;
}
return _insn->p->get_state()->XPR[reg]; // XXX TODO: offset