}
}
-void processor_t::set_csr(int which, reg_t val)
+reg_t processor_t::set_csr(int which, reg_t val, bool csrrwi)
{
+ reg_t old_val = get_csr(which);
val = _zext_xlen(val);
reg_t delegable_ints = MIP_SSIP | MIP_STIP | MIP_SEIP
| ((ext != NULL) << IRQ_COP);
state.dscratch = val;
break;
}
+ return old_val;
}
reg_t processor_t::get_csr(int which)
void set_histogram(bool value);
void reset();
void step(size_t n); // run for n cycles
- void set_csr(int which, reg_t val);
+ reg_t set_csr(int which, reg_t val, bool immed=false);
reg_t get_csr(int which);
#ifdef SPIKE_SIMPLEV
sv_mmu_t* get_mmu() { return mmu; }