aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/lima
diff options
context:
space:
mode:
authorVasily Khoruzhick <[email protected]>2019-09-01 14:38:08 -0700
committerVasily Khoruzhick <[email protected]>2019-09-09 10:25:30 -0700
commit996f1b61745f9e9f6b32a3602911f77ede377ca3 (patch)
tree81d7156bcec8b751c6366be2107b9316d53d0a0c /src/gallium/drivers/lima
parente6dbf6d9487ad12b44c81b246d0314547e55da98 (diff)
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 <[email protected]> Reviewed-by: Erico Nunes <[email protected]> Reviewed-by: Andreas Baierl <[email protected]> Signed-off-by: Vasily Khoruzhick <[email protected]>
Diffstat (limited to 'src/gallium/drivers/lima')
-rw-r--r--src/gallium/drivers/lima/ir/gp/disasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/lima/ir/gp/disasm.c b/src/gallium/drivers/lima/ir/gp/disasm.c
index 41a04942ec9..6b5186fa633 100644
--- a/src/gallium/drivers/lima/ir/gp/disasm.c
+++ b/src/gallium/drivers/lima/ir/gp/disasm.c
@@ -238,7 +238,7 @@ print_src(gpir_codegen_src src, gp_unit unit, unsigned unit_src_num,
case gpir_codegen_src_p1_attrib_w:
printf("%c%d.%c", prev_instr->register0_attribute ? 'a' : '$',
prev_instr->register0_addr,
- "xyzw"[src - gpir_codegen_src_attrib_x]);
+ "xyzw"[src - gpir_codegen_src_p1_attrib_x]);
break;
}
}