From: Christian Gmeiner Date: Mon, 28 Aug 2023 14:40:16 +0000 (+0200) Subject: isaspec: Add method to get all instrustions X-Git-Tag: upstream/23.3.3~1361 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=eb87ae42865014d00c78b5a100e88f52f5342b28;p=platform%2Fupstream%2Fmesa.git isaspec: Add method to get all instrustions Signed-off-by: Christian Gmeiner Reviewed-by: Rob Clark Part-of: --- diff --git a/src/compiler/isaspec/isa.py b/src/compiler/isaspec/isa.py index 67fae5e..27e9794 100644 --- a/src/compiler/isaspec/isa.py +++ b/src/compiler/isaspec/isa.py @@ -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