diff options
Diffstat (limited to 'spike_main')
-rw-r--r-- | spike_main/disasm.cc | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/spike_main/disasm.cc b/spike_main/disasm.cc index bae3d51..e62c985 100644 --- a/spike_main/disasm.cc +++ b/spike_main/disasm.cc @@ -1,6 +1,7 @@ // See LICENSE for license details. #include "disasm.h" +#include "assert.h" #include <string> #include <vector> #include <cstdarg> @@ -322,8 +323,27 @@ struct : public arg_t { auto vta = insn.v_vta() == 1 ? "ta" : "tu"; auto vma = insn.v_vma() == 1 ? "ma" : "mu"; s << "e" << sew; - if (lmul != 1) - s << ",m" << lmul; + if (lmul != 1) { + if(insn.v_frac_lmul()) { + std::string lmul_str = ""; + switch(lmul){ + case 2: + lmul_str = "f2"; + break; + case 4: + lmul_str = "f4"; + break; + case 8: + lmul_str = "f8"; + break; + default: + assert(true && "unsupport fractional LMUL"); + } + s << ", m" << lmul_str; + } else { + s << ", m" << lmul; + } + } s << ", " << vta << ", " << vma; return s.str(); } |