lima/gpir: fix warning in gpir disassembler
authorVasily Khoruzhick <anarsoul@gmail.com>
Sun, 1 Sep 2019 21:38:08 +0000 (14:38 -0700)
committerVasily Khoruzhick <anarsoul@gmail.com>
Mon, 9 Sep 2019 17:25:30 +0000 (10:25 -0700)
commit996f1b61745f9e9f6b32a3602911f77ede377ca3
tree81d7156bcec8b751c6366be2107b9316d53d0a0c
parente6dbf6d9487ad12b44c81b246d0314547e55da98
lima/gpir: fix warning in gpir disassembler

Fixes following warning:

../src/gallium/drivers/lima/ir/gp/disasm.c: In function ‘print_src’:
../src/gallium/drivers/lima/ir/gp/disasm.c:241:20: warning: array subscript 28 is above array bounds of ‘char[5]’ [-Warray-bounds]
  241 |              "xyzw"[src - gpir_codegen_src_attrib_x]);

Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Erico Nunes <nunes.erico@gmail.com>
Reviewed-by: Andreas Baierl <ichgeh@imkreisrum.de>
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
src/gallium/drivers/lima/ir/gp/disasm.c