#define WRITE_VL(vlnext) (h->get_ct_state()->vl = (vlnext))
#define WRITE_UTIDX(value) (h->get_ct_state()->count = (value))
#define WRITE_VF_PC(pcnext) (h->get_ct_state()->vf_pc = (pcnext))
+#define WRITE_PREC(precision) (h->get_ct_state()->prec = (precision))
#define INSN_RS1 (insn.rs1())
#define INSN_RS2 (insn.rs2())
--- /dev/null
+uint32_t prec = u.r.funct;
+switch (prec) {
+ case 16:
+ case 32:
+ case 64:
+ printf("Precision set to %d bits\n", prec);
+ WRITE_PREC(prec);
+ break;
+
+ default:
+ h->take_exception(HWACHA_CAUSE_ILLEGAL_CFG, 2);
+ break;
+}
DECLARE_INSN(vmsv, 0x200202b, 0xfff0707f)
DECLARE_INSN(vmvv, 0x200002b, 0xfff0707f)
DECLARE_INSN(vsetcfg, 0x200b, 0x7fff)
+DECLARE_INSN(vsetprec, 0x805b, 0xfffff)
DECLARE_INSN(vsetvl, 0x600b, 0xfff0707f)
DECLARE_INSN(vssegb, 0x207b, 0x1ff0707f)
DECLARE_INSN(vssegd, 0x600207b, 0x1ff0707f)