broadcom: Add V3D 3.3 QPU instruction pack, unpack, and disasm.
authorEric Anholt <eric@anholt.net>
Fri, 3 Feb 2017 00:15:18 +0000 (16:15 -0800)
committerEric Anholt <eric@anholt.net>
Tue, 10 Oct 2017 18:42:04 +0000 (11:42 -0700)
commit05c7d9715b8a419fd6fb952715ee8fde9401aacb
tree3061d0f9276f4d9fcf0369f6f4abb6a8511097bc
parent59257c35eb5ce4a58d6cff20ed24a8203b045af8
broadcom: Add V3D 3.3 QPU instruction pack, unpack, and disasm.

Unlike VC4, I've defined an unpacked instruction format with pack/unpack
functions to convert to 64-bit encoded instructions.  This will let us
incrementally put together our instructions and validate them in a more
natural way than the QPU_GET_FIELD/QPU_SET_FIELD used to.

The pack/unpack unfortuantely are written by hand.  While I could define
genxml for parts of it, there are many special cases (like operand order
of commutative binops choosing which binop is being performed!) and it
probably wouldn't come out much cleaner.

The disasm unit test ensures that we have the same assembly format as
Broadcom's internal tools, other than whitespace changes.

v2: Fix automake variable redefinition complaints, add test to .gitignore
12 files changed:
src/broadcom/.gitignore
src/broadcom/Makefile.am
src/broadcom/Makefile.sources
src/broadcom/Makefile.vc5.am [new file with mode: 0644]
src/broadcom/qpu/qpu_disasm.c [new file with mode: 0644]
src/broadcom/qpu/qpu_disasm.h [new file with mode: 0644]
src/broadcom/qpu/qpu_instr.c [new file with mode: 0644]
src/broadcom/qpu/qpu_instr.h [new file with mode: 0644]
src/broadcom/qpu/qpu_pack.c [new file with mode: 0644]
src/broadcom/qpu/qpu_validate.c [new file with mode: 0644]
src/broadcom/qpu/tests/.gitignore [new file with mode: 0644]
src/broadcom/qpu/tests/qpu_disasm.c [new file with mode: 0644]