mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-04 17:50:11 +01:00
nv50: use larger arrays to silence warnings and fix buffer overflows
The warnings were: nv50_pc_regalloc.c: In function ‘pass_generate_phi_movs’: nv50_pc_regalloc.c:423:41: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp: In member function ‘bool nv50_ir::MemoryOpt::replaceStFromSt(nv50_ir::Instruction*, nv50_ir::MemoryOpt::Record*)’: codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds codegen/nv50_ir_peephole.cpp:1475:18: warning: array subscript is above array bounds And add some assertions to catch this sooner in debug builds.
This commit is contained in:
parent
a1471e4877
commit
541bb2e33f
2 changed files with 2 additions and 2 deletions
|
|
@ -1463,7 +1463,7 @@ MemoryOpt::replaceStFromSt(Instruction *restrict st, Record *rec)
|
|||
st->takeExtraSources(0, extra);
|
||||
|
||||
if (offR < offS) {
|
||||
Value *vals[4];
|
||||
Value *vals[10];
|
||||
int s, n;
|
||||
int k = 0;
|
||||
// get non-replaced sources of ri
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ struct nv_instruction {
|
|||
int serial;
|
||||
struct nv_value *def[4];
|
||||
struct nv_value *flags_def;
|
||||
struct nv_ref *src[5];
|
||||
struct nv_ref *src[6];
|
||||
struct nv_ref *flags_src;
|
||||
struct nv_basic_block *bb;
|
||||
struct nv_basic_block *target; /* target block of control flow insn */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue