{
return ::f32(x);
}
+
sv_float32_t (sv_proc_t::f32)(sv_reg_t const& v)
{
uint64_t x = v;
// now that the address has been moved on by the modulo-offset,
// get only an elwidth-sized element (if not "default")
- width = get_bitwidth(_insn->reg_elwidth(spec.reg, true), width);
+ uint8_t rwidth = _insn->reg_elwidth(spec.reg, true);
+ width = get_bitwidth(rwidth, width);
fprintf(stderr, "mmu_load wid %ld addr %lx offs %lx\n",
width, (uint64_t)reg, (int64_t)offs);
switch (width)
}
fprintf(stderr, "mmu_load wid %ld addr %lx offs %lx loaded %lx\n",
width, (uint64_t)reg, (int64_t)offs, (uint64_t)v);
+ v.set_elwidth(rwidth);
+ v.set_xlen(xlen);
return v;
}
sv_reg_t sv_reg_uint32(sv_reg_t const&);
sv_reg_t sv_reg_int32(sv_reg_t const&);
+ // used in conversion of regs FRSn
sv_float128_t (f128)(float128_t v);
sv_float64_t (f64)(sv_freg_t v);
+ sv_float32_t (f32)(sv_freg_t v);
+
+ // used in conversion of return result from MMU
sv_float64_t (f64)(sv_reg_t const&v);
sv_float32_t (f32)(sv_reg_t const&v);
- sv_float32_t (f32)(sv_freg_t v);
+
sv_reg_t (f32_classify)(sv_float32_t a);
sv_reg_t (f64_classify)(sv_float64_t a);
sv_reg_t (f128_classify)(sv_float128_t a);
public:
int get_xlen() const { return xlen; }
uint8_t get_elwidth() const { return elwidth; }
+ void set_elwidth(uint8_t w) { elwidth = w; }
+ void set_xlen(int x) { xlen = x; }
int get_bitwidth() const
{
return ::get_bitwidth(elwidth, xlen);