uint8_t b[sizeof(freg_t)*8];
};
+unsigned int sv_proc_t::remap(reg_spec_t const& spec)
+{
+ unsigned int offs = *spec.offset;
+ sv_shape_t *shape = p->get_state()->get_shape(spec.reg);
+ if (shape == NULL) {
+ return offs;
+ }
+ return offs; // XXX TODO
+}
+
void (sv_proc_t::DO_WRITE_FREG)(reg_spec_t const& spec, sv_freg_t const& value)
{
int regflen = sizeof(freg_t) * 8; // FLEN (not specified in spike)
unsigned int offs = 0;
if (spec.offset != NULL) {
unsigned int nbytes = flen / bitwidth;
- offs = *spec.offset;
+ offs = remap(spec);
shift = offs % nbytes;
offs /= nbytes;
reg += offs;
unsigned int offs = 0;
if (spec.offset != NULL) {
unsigned int nbytes = xlen / bitwidth;
- offs = *spec.offset;
+ offs = remap(spec);
shift = offs % nbytes;
offs /= nbytes;
reg += offs;
if (nbytes == 0) {
nbytes = 1;
}
- offs = *spec.offset;
+ offs = remap(spec);
shift = offs % nbytes;
offs /= nbytes;
reg += offs;
if (nbytes == 0) {
nbytes = 1;
}
- offs = *spec.offset;
+ offs = remap(spec);
shift = offs % nbytes;
offs /= nbytes;
reg += offs;
sv_reg_t to_uint32(sv_freg_t const& reg);
sv_reg_t to_uint32(sv_float32_t const& reg);
+ unsigned int remap(reg_spec_t const& regspec);
+
#include "sv_insn_decl.h"
};