Skip to content

freedreno/afuc: Convert to isaspec, initial a7xx support

Connor Abbott requested to merge cwabbott0/mesa:review/afuc-a7xx into main

For a7xx Qualcomm shuffled around many of the ALU opcodes in afuc and added a new compact encoding mode in order to add more ALU opcodes, which would've made support with the old hand-coded encoder/decoder difficult. Instead this MR switches afuc over to using isaspec, which makes adding a7xx support much easier. In order to do that I had to add a number of new features to isaspec:

  • "Absolute" branches as used by call instructions.
  • Understanding and different printing for labels of call instructions. This isn't strictly necessary but is a nice improvement when staring at assembly.
  • Support for naming "entrypoints" (used for naming packet routines).
  • A displayname hack to make writing ALU instruction and branch instruction definitions easier.
  • A way to go from binary to instruction struct, to replace the ad-hoc parsing done in the emulator. This is a bit rough but is good enough for afuc.

After switching over afuc, we then add a7xx support. This includes pipe registers and control registers I've RE'd so far.

Merge request reports