[Libre-soc-bugs] [Bug 917] pysvp64dis: support SVP64 disassembly

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Wed Sep 7 10:55:23 BST 2022


https://bugs.libre-soc.org/show_bug.cgi?id=917

--- Comment #7 from Dmitry Selyutin <ghostmansd at gmail.com> ---
static inline uint64_t
svp64_insn_get_prefix_rm_extra3_idx0(const struct svp64_insn *insn)
{
  uint64_t value = insn->value;
  return (
    (((value >> UINT64_C(43)) & UINT64_C(1)) << UINT64_C(0)) |
    (((value >> UINT64_C(44)) & UINT64_C(1)) << UINT64_C(1)) |
    (((value >> UINT64_C(45)) & UINT64_C(1)) << UINT64_C(2))
  );
}

static inline uint64_t
svp64_insn_get_prefix_rm_extra3_idx1(const struct svp64_insn *insn)
{
  uint64_t value = insn->value;
  return (
    (((value >> UINT64_C(40)) & UINT64_C(1)) << UINT64_C(0)) |
    (((value >> UINT64_C(41)) & UINT64_C(1)) << UINT64_C(1)) |
    (((value >> UINT64_C(42)) & UINT64_C(1)) << UINT64_C(2))
  );
}

Perfect. I guess we have an opportunity to introduce a nice table in binutils
when we're done with disasm (and same for setters).

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list