panfrost: split pseudo instructions from Bifrost and Valhall
Make pseudo instructions for the IR separate from real Bifrost and
Valhall instructions, which are kept in their own ISA.xml files.
Reviewed-by: Mary Guillemard <[email protected]>
Acked-by: Boris Brezillon <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30179>
diff --git a/src/panfrost/compiler/bi_packer.c.py b/src/panfrost/compiler/bi_packer.c.py
index 601750e..c506063 100644
--- a/src/panfrost/compiler/bi_packer.c.py
+++ b/src/panfrost/compiler/bi_packer.c.py
@@ -25,12 +25,16 @@
from mako.template import Template
# Consider pseudo instructions when getting the modifier list
-instructions_with_pseudo = parse_instructions(sys.argv[1], include_pseudo = True)
+instructions_with_pseudo = {}
+for arg in sys.argv[1:]:
+ new_instructions = parse_instructions(arg, include_pseudo = True)
+ instructions_with_pseudo.update(new_instructions)
+
ir_instructions_with_pseudo = partition_mnemonics(instructions_with_pseudo)
modifier_lists = order_modifiers(ir_instructions_with_pseudo)
# ...but strip for packing
-instructions = parse_instructions(sys.argv[1])
+instructions = parse_instructions(sys.argv[2]) # skip the pseudo instructions in sys.argv[1]
ir_instructions = partition_mnemonics(instructions)
# Packs sources into an argument. Offset argument to work around a quirk of our