pan/bi: Use consistent modifier lists in packing

If there are modifiers only used by pseudo instructions, not the real
instructions, bi_packer can get out-of-sync with bi_opcodes, causing
hard-to-debug issues. Do the stupid-simple thing to ensure this doesn't happen.

This may be a temporary issue, depending whether ISA.xml and the IR get split
out for better Valhall support.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15223>
diff --git a/src/panfrost/bifrost/bi_packer.c.py b/src/panfrost/bifrost/bi_packer.c.py
index c014519..601750e 100644
--- a/src/panfrost/bifrost/bi_packer.c.py
+++ b/src/panfrost/bifrost/bi_packer.c.py
@@ -24,9 +24,14 @@
 from bifrost_isa import *
 from mako.template import Template
 
+# Consider pseudo instructions when getting the modifier list
+instructions_with_pseudo = parse_instructions(sys.argv[1], include_pseudo = True)
+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])
 ir_instructions = partition_mnemonics(instructions)
-modifier_lists = order_modifiers(ir_instructions)
 
 # Packs sources into an argument. Offset argument to work around a quirk of our
 # compiler IR when dealing with staging registers (TODO: reorder in the IR to