intel: Add support for labels to assembler and disassembler

Merged Danylo Piliaiev requested to merge GL/mesa:feature/intel-assembler-labels-v2 into master

Assembly example:

(+f0.0) if(8)   JIP: LABEL1        UIP: LABEL0            { align1 1Q };
   END B0 ->B1 ->B2
   START B1 <-B0 (61 cycles)
mul(8)          g9<1>F          g6<8,8,1>F      g4.5<0,1,0>F    { align1 1Q compacted };
else(8)         JIP: LABEL0        UIP: LABEL0            { align1 1Q };
   END B1 ->B2 ->B3
   START B2 <-B0 <-B1 (2 cycles)

mov(8)          g60<1>UD        g5<8,8,1>UD                     { align1 1Q compacted };
   END B2 ->B3
   START B3 <-B2 <-B1 (24 cycles)

endif(8)        JIP: LABEL2                                     { align1 1Q };

add(8)          g5<1>D          g2<8,8,1>D      1D              { align1 1Q compacted };

Patches 1-3 are initially from Toni Lönnberg, they add labels to the disassembler Patch 4 is mine and adds labels support to the assembler

  • Gen6+ - uses only labels since raw jump offsets aren't found useful.
  • Pre-gen6 - uses offsets as before.

The tests for gen6+ assembler are updated to use labels.

Edited by Danylo Piliaiev

Merge request reports