isaspec: Add method to get all instrustions

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25451>
This commit is contained in:
Christian Gmeiner
2023-08-28 16:40:16 +02:00
committed by Marge Bot
parent ef602e77f6
commit eb87ae4286

View File

@@ -624,3 +624,15 @@ class ISA(object):
display_string = display_string.replace("{" + m + "}", self.templates[m].display)
return display_string
def instructions(self):
instr = []
for _, root in self.roots.items():
for _, leafs in self.leafs.items():
for leaf in leafs:
if leaf.get_root() == root:
if not leaf.get_c_name().startswith('__'):
instr.append(leaf)
return instr