pan/bi: Add packing generator
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Mon, 14 Sep 2020 17:48:28 +0000 (13:48 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 16 Sep 2020 20:05:34 +0000 (20:05 +0000)
commitcf8f79a9fcfcca1e4337ed22c02595516024c22c
tree1cd414edfbcb46a053d6f8f3540afeb2092715db
parent58da316de7a7858eb96a18ee8c1f9d35bf0c2b99
pan/bi: Add packing generator

From the ISA definition, we can generate a function for each instruction
that looks at the bi_instruction in the intermediate representation and
emits a 20- or 23-bit word (for ADD/FMA respectively) containing that
instruction with all of its modifiers.

These will approximate the old packing routines, although the mapping of
bi_instruction to machine instructions will be hardcoded (at least for
now).

Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Reviewed-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6749>
src/panfrost/bifrost/gen_pack.py [new file with mode: 0644]