freedreno/afuc: Use emulator to extract jmptbl
authorRob Clark <robdclark@chromium.org>
Mon, 24 May 2021 18:00:28 +0000 (11:00 -0700)
committerMarge Bot <eric+marge@anholt.net>
Mon, 31 May 2021 23:34:43 +0000 (23:34 +0000)
commitff5e17f1f85c93aa0c0c1004938a21145b0f8b5d
tree7c015e0e0d15a24b86daee99c32b03e9da1d8f9c
parent2beb5b015ab911f7f757cac5e3e78bdf69e94b5b
freedreno/afuc: Use emulator to extract jmptbl

This runs through the SQE bootstrap code to extract the packet-table,
rather than relying on heuristics.  As a bonus, it can detect the start
of the LPAC fw in a660+ fw so that we can properly decode the LPAC fw
and packet-table.

Note that this decodes the jmptable as normal instructions, which is a
change in behavior from the previous heuristic based jmptbl extraction.
Not sure if that is a good or bad thing.

For a5xx, for now the legacy heuristic based jmptable decoding is
preserved, at least until enough control regs are figured out.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10944>
src/freedreno/.gitlab-ci/reference/afuc_test.asm
src/freedreno/afuc/disasm.c