PCode,
Operands,
Record,
+ Section,
SVP64Record,
Walker,
)
yield node
+class SectionVisitor(InstructionVisitor):
+ @mdis.dispatcher.Hook(Section.Path)
+ @contextlib.contextmanager
+ def dispatch_path(self, node):
+ print("path", node)
+ yield node
+
+ @mdis.dispatcher.Hook(Section.BitSel)
+ @contextlib.contextmanager
+ def dispatch_bitsel(self, node):
+ print("bitsel", node)
+ yield node
+
+ @mdis.dispatcher.Hook(Section.Suffix)
+ @contextlib.contextmanager
+ def dispatch_suffix(self, node):
+ print("suffix", node)
+ yield node
+
+ @mdis.dispatcher.Hook(Section.Mode)
+ @contextlib.contextmanager
+ def dispatch_mode(self, node):
+ print("mode", node)
+ yield node
+
+ @mdis.dispatcher.Hook(Section.Opcode)
+ @contextlib.contextmanager
+ def dispatch_opcode(self, node):
+ print("opcode", int(node))
+ yield node
+
+ @mdis.dispatcher.Hook(Section.Priority)
+ @contextlib.contextmanager
+ def dispatch_priority(self, node):
+ print("priority", node)
+ yield node
+
+
class ExtrasVisitor(SVP64InstructionVisitor, SelectorsVisitor):
@mdis.dispatcher.Hook(SVP64Record.ExtraMap)
@contextlib.contextmanager
PTypeVisitor,
"print instruction ptype",
),
+ "section": (
+ SectionVisitor,
+ "print instruction section",
+ ),
"extras": (
ExtrasVisitor,
"print instruction extras (SVP64)",