summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nv50/codegen
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2012-01-31 07:01:53 -0700
committerBrian Paul <[email protected]>2012-02-01 07:19:54 -0700
commit541bb2e33f89b07bcbea2e27275df858760c8ec8 (patch)
tree6a356adf5380e2f976c550e52653f57245be0e4a /src/gallium/drivers/nv50/codegen
parenta1471e4877515e2ce4fcc129c4ce26f5c306b193 (diff)
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.
Diffstat (limited to 'src/gallium/drivers/nv50/codegen')
-rw-r--r--src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
index fc025d8767e..fb4041f0b88 100644
--- a/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
+++ b/src/gallium/drivers/nv50/codegen/nv50_ir_peephole.cpp
@@ -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